> ## 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.

# Firebase API reference

> API reference for the Firebase plugin in Corsair: every `firebase.api.*` operation with its input and output types, taken from the plugin's 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).

## App Check

### apps.appAttestConfig.batchGet

`appCheck.apps.appAttestConfig.batchGet`

Atomically gets the AppAttestConfigs for the specified list of apps

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.appAttestConfig.batchGet({
	parent: 'projects/demo-project',
	names: ['projects/demo-project/apps/1:1234567890:web:abc123/appAttestConfig'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent project name shared by all AppAttestConfigs being retrieved, in the format `projects/{project_number}` The parent collection in the `name` field of any resource being retrieved must match this field, or the entire batch fails. Format: `projects/<id>`. |
| `names` | `string[]` | Yes | Required. The relative resource names of the AppAttestConfigs to retrieve, in the format `projects/{project_number}/apps/{app_id}/appAttestConfig` A maximum of 100 objects can be retrieved in a batch. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `configs` | `object[] \| null` | No | AppAttestConfigs retrieved. |

> [accordion] configs full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   tokenTtl?: string | null
> }[] | null
> ```

***

### apps.appAttestConfig.get

`appCheck.apps.appAttestConfig.get`

Gets the AppAttestConfig for the specified app

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.appAttestConfig.get({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/appAttestConfig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The relative resource name of the AppAttestConfig, in the format: `projects/{project_number}/apps/{app_id}/appAttestConfig` Format: `projects/<id>/apps/<id>/appAttestConfig`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Required. The relative resource name of the App Attest configuration object, in the format: `projects/{project_number}/apps/{app_id}/appAttestConfig` |
| `tokenTtl` | `string \| null` | No | Specifies the duration for which App Check tokens exchanged from App Attest artifacts will be valid. If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. |

***

### apps.appAttestConfig.patch

`appCheck.apps.appAttestConfig.patch`

Updates the AppAttestConfig for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange AppAttest tokens for App Check tokens

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.appAttestConfig.patch({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/appAttestConfig', updateMask: 'tokenTtl', tokenTtl: '3600s' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The relative resource name of the App Attest configuration object, in the format: `projects/{project_number}/apps/{app_id}/appAttestConfig` Format: `projects/<id>/apps/<id>/appAttestConfig`. |
| `updateMask` | `string` | Yes | Required. A comma-separated list of names of fields in the AppAttestConfig to update. Example: `token_ttl`. |
| `body_name` | `string` | No | Required. The relative resource name of the App Attest configuration object, in the format: `projects/{project_number}/apps/{app_id}/appAttestConfig` |
| `tokenTtl` | `string` | No | Specifies the duration for which App Check tokens exchanged from App Attest artifacts will be valid. If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Required. The relative resource name of the App Attest configuration object, in the format: `projects/{project_number}/apps/{app_id}/appAttestConfig` |
| `tokenTtl` | `string \| null` | No | Specifies the duration for which App Check tokens exchanged from App Attest artifacts will be valid. If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. |

***

### apps.debugTokens.create

`appCheck.apps.debugTokens.create`

Creates a new DebugToken for the specified app. For security reasons, after the creation operation completes, the `token` field cannot be updated or retrieved, but you can revoke the debug token using DeleteDebugToken

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.debugTokens.create({ parent: 'projects/demo-project/apps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The relative resource name of the parent app in which the specified DebugToken will be created, in the format: `projects/{project_number}/apps/{app_id}` Format: `projects/<id>/apps/<id>`. |
| `displayName` | `string` | No | Required. A human readable display name used to identify this debug token. |
| `name` | `string` | No | Required. The relative resource name of the debug token, in the format: `projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id}` |
| `token` | `string` | No | Required. Input only. Immutable. The secret token itself. Must be provided during creation, and must be a UUID4, case insensitive. This field is immutable once set, and cannot be provided during a UpdateDebugToken request. You can, however, delete this debug token using DeleteDebugToken to revoke it. For security reasons, this field will never be populated in any response. |
| `etag` | `string` | No | Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | Required. A human readable display name used to identify this debug token. |
| `name` | `string \| null` | No | Required. The relative resource name of the debug token, in the format: `projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id}` |
| `token` | `string \| null` | No | Required. Input only. Immutable. The secret token itself. Must be provided during creation, and must be a UUID4, case insensitive. This field is immutable once set, and cannot be provided during a UpdateDebugToken request. You can, however, delete this debug token using DeleteDebugToken to revoke it. For security reasons, this field will never be populated in any response. |
| `etag` | `string \| null` | No | Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. |
| `updateTime` | `string \| null` | No | Output only. Timestamp when this debug token was most recently updated. |

***

### apps.debugTokens.delete

`appCheck.apps.debugTokens.delete`

Deletes the specified DebugToken. A deleted debug token cannot be used to exchange for an App Check token

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.appCheck.apps.debugTokens.delete({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/debugTokens/dt-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The relative resource name of the DebugToken to delete, in the format: `projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id}` Format: `projects/<id>/apps/<id>/debugTokens/<id>`. |
| `etag` | `string` | No | Optional. The checksum to be validated against the current DebugToken, to ensure the client has an up-to-date value before proceeding. This checksum is computed by the server based on the values of fields in the DebugToken object, and can be obtained from the DebugToken object received from the last CreateDebugToken, GetDebugToken, ListDebugTokens, or UpdateDebugToken call. This etag is strongly validated as defined by RFC 7232. |

**Output:** *empty object*

***

### apps.debugTokens.get

`appCheck.apps.debugTokens.get`

Gets the specified DebugToken. For security reasons, the `token` field is never populated in the response

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.debugTokens.get({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/debugTokens/dt-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The relative resource name of the debug token, in the format: `projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id}` Format: `projects/<id>/apps/<id>/debugTokens/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | Required. A human readable display name used to identify this debug token. |
| `name` | `string \| null` | No | Required. The relative resource name of the debug token, in the format: `projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id}` |
| `token` | `string \| null` | No | Required. Input only. Immutable. The secret token itself. Must be provided during creation, and must be a UUID4, case insensitive. This field is immutable once set, and cannot be provided during a UpdateDebugToken request. You can, however, delete this debug token using DeleteDebugToken to revoke it. For security reasons, this field will never be populated in any response. |
| `etag` | `string \| null` | No | Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. |
| `updateTime` | `string \| null` | No | Output only. Timestamp when this debug token was most recently updated. |

***

### apps.debugTokens.list

`appCheck.apps.debugTokens.list`

Lists all DebugTokens for the specified app. For security reasons, the `token` field is never populated in the response (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.debugTokens.list({ parent: 'projects/demo-project/apps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The relative resource name of the parent app for which to list each associated DebugToken, in the format: `projects/{project_number}/apps/{app_id}` Format: `projects/<id>/apps/<id>`. |
| `pageToken` | `string` | No | Token returned from a previous call to ListDebugTokens indicating where in the set of DebugTokens to resume listing. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListDebugTokens must match the call that provided the page token; if they do not match, the result is undefined. |
| `pageSize` | `number` | No | The maximum number of DebugTokens to return in the response. Note that an app can have at most 20 debug tokens. The server may return fewer than this at its own discretion. If no value is specified (or too large a value is specified), the server will impose its own limit. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `debugTokens` | `object[] \| null` | No | The DebugTokens retrieved. |
| `nextPageToken` | `string \| null` | No | If the result list is too large to fit in a single response, then a token is returned. If the string is empty or omitted, then this response is the last page of results. This token can be used in a subsequent call to ListDebugTokens to find the next group of DebugTokens. Page tokens are short-lived and should not be persisted. |

> [accordion] debugTokens full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   name?: string | null,
>   token?: string | null,
>   etag?: string | null,
>   updateTime?: string | null
> }[] | null
> ```

***

### apps.debugTokens.patch

`appCheck.apps.debugTokens.patch`

Updates the specified DebugToken. For security reasons, the `token` field cannot be updated, nor will it be populated in the response, but you can revoke the debug token using DeleteDebugToken

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.debugTokens.patch({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/debugTokens/dt-1', updateMask: 'displayName' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The relative resource name of the debug token, in the format: `projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id}` Format: `projects/<id>/apps/<id>/debugTokens/<id>`. |
| `updateMask` | `string` | Yes | Required. A comma-separated list of names of fields in the DebugToken to update. Example: `display_name`. |
| `displayName` | `string` | No | Required. A human readable display name used to identify this debug token. |
| `body_name` | `string` | No | Required. The relative resource name of the debug token, in the format: `projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id}` |
| `token` | `string` | No | Required. Input only. Immutable. The secret token itself. Must be provided during creation, and must be a UUID4, case insensitive. This field is immutable once set, and cannot be provided during a UpdateDebugToken request. You can, however, delete this debug token using DeleteDebugToken to revoke it. For security reasons, this field will never be populated in any response. |
| `etag` | `string` | No | Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | Required. A human readable display name used to identify this debug token. |
| `name` | `string \| null` | No | Required. The relative resource name of the debug token, in the format: `projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id}` |
| `token` | `string \| null` | No | Required. Input only. Immutable. The secret token itself. Must be provided during creation, and must be a UUID4, case insensitive. This field is immutable once set, and cannot be provided during a UpdateDebugToken request. You can, however, delete this debug token using DeleteDebugToken to revoke it. For security reasons, this field will never be populated in any response. |
| `etag` | `string \| null` | No | Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. |
| `updateTime` | `string \| null` | No | Output only. Timestamp when this debug token was most recently updated. |

***

### apps.deviceCheckConfig.batchGet

`appCheck.apps.deviceCheckConfig.batchGet`

Atomically gets the DeviceCheckConfigs for the specified list of apps. For security reasons, the `private_key` field is never populated in the response

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.deviceCheckConfig.batchGet({
	parent: 'projects/demo-project',
	names: ['projects/demo-project/apps/1:1234567890:web:abc123/deviceCheckConfig'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `names` | `string[]` | Yes | Required. The relative resource names of the DeviceCheckConfigs to retrieve, in the format `projects/{project_number}/apps/{app_id}/deviceCheckConfig` A maximum of 100 objects can be retrieved in a batch. |
| `parent` | `string` | Yes | Required. The parent project name shared by all DeviceCheckConfigs being retrieved, in the format `projects/{project_number}` The parent collection in the `name` field of any resource being retrieved must match this field, or the entire batch fails. Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `configs` | `object[] \| null` | No | DeviceCheckConfigs retrieved. |

> [accordion] configs full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   keyId?: string | null,
>   tokenTtl?: string | null,
>   privateKeySet?: boolean | null,
>   privateKey?: string | null
> }[] | null
> ```

***

### apps.deviceCheckConfig.get

`appCheck.apps.deviceCheckConfig.get`

Gets the DeviceCheckConfig for the specified app. For security reasons, the `private_key` field is never populated in the response

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.deviceCheckConfig.get({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/deviceCheckConfig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The relative resource name of the DeviceCheckConfig, in the format: `projects/{project_number}/apps/{app_id}/deviceCheckConfig` Format: `projects/<id>/apps/<id>/deviceCheckConfig`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Required. The relative resource name of the DeviceCheck configuration object, in the format: `projects/{project_number}/apps/{app_id}/deviceCheckConfig` |
| `keyId` | `string \| null` | No | Required. The key identifier of a private key enabled with DeviceCheck, created in your Apple Developer account. |
| `tokenTtl` | `string \| null` | No | Specifies the duration for which App Check tokens exchanged from DeviceCheck tokens will be valid. If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. |
| `privateKeySet` | `boolean \| null` | No | Output only. Whether the `private_key` field was previously set. Since we will never return the `private_key` field, this field is the only way to find out whether it was previously set. |
| `privateKey` | `string \| null` | No | Required. Input only. The contents of the private key (`.p8`) file associated with the key specified by `key_id`. For security reasons, this field will never be populated in any response. |

***

### apps.deviceCheckConfig.patch

`appCheck.apps.deviceCheckConfig.patch`

Updates the DeviceCheckConfig for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange DeviceCheck tokens for App Check tokens

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.deviceCheckConfig.patch({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/deviceCheckConfig', updateMask: 'tokenTtl', tokenTtl: '3600s' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | Yes | Required. A comma-separated list of names of fields in the DeviceCheckConfig to update. Example: `key_id,private_key`. |
| `name` | `string` | Yes | Required. The relative resource name of the DeviceCheck configuration object, in the format: `projects/{project_number}/apps/{app_id}/deviceCheckConfig` Format: `projects/<id>/apps/<id>/deviceCheckConfig`. |
| `body_name` | `string` | No | Required. The relative resource name of the DeviceCheck configuration object, in the format: `projects/{project_number}/apps/{app_id}/deviceCheckConfig` |
| `keyId` | `string` | No | Required. The key identifier of a private key enabled with DeviceCheck, created in your Apple Developer account. |
| `tokenTtl` | `string` | No | Specifies the duration for which App Check tokens exchanged from DeviceCheck tokens will be valid. If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. |
| `privateKey` | `string` | No | Required. Input only. The contents of the private key (`.p8`) file associated with the key specified by `key_id`. For security reasons, this field will never be populated in any response. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Required. The relative resource name of the DeviceCheck configuration object, in the format: `projects/{project_number}/apps/{app_id}/deviceCheckConfig` |
| `keyId` | `string \| null` | No | Required. The key identifier of a private key enabled with DeviceCheck, created in your Apple Developer account. |
| `tokenTtl` | `string \| null` | No | Specifies the duration for which App Check tokens exchanged from DeviceCheck tokens will be valid. If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. |
| `privateKeySet` | `boolean \| null` | No | Output only. Whether the `private_key` field was previously set. Since we will never return the `private_key` field, this field is the only way to find out whether it was previously set. |
| `privateKey` | `string \| null` | No | Required. Input only. The contents of the private key (`.p8`) file associated with the key specified by `key_id`. For security reasons, this field will never be populated in any response. |

***

### apps.exchangeAppAttestAssertion

`appCheck.apps.exchangeAppAttestAssertion`

Accepts an App Attest assertion and an artifact previously obtained from ExchangeAppAttestAttestation and verifies those with Apple. If valid, returns an AppCheckToken

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.exchangeAppAttestAssertion({ app: 'projects/demo-project/apps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `app` | `string` | Yes | Required. The relative resource name of the iOS app, in the format: `projects/{project_number}/apps/{app_id}` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Format: `projects/<id>/apps/<id>`. |
| `challenge` | `string` | No | Required. A one-time challenge returned by an immediately prior call to GenerateAppAttestChallenge. (base64) |
| `limitedUse` | `boolean` | No | Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. |
| `assertion` | `string` | No | Required. The CBOR-encoded assertion returned by the client-side App Attest API. (base64) |
| `artifact` | `string` | No | Required. The artifact returned by a previous call to ExchangeAppAttestAttestation. (base64) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ttl` | `string \| null` | No | The duration from the time this token is minted until its expiration. This field is intended to ease client-side token management, since the client may have clock skew, but is still able to accurately measure a duration. |
| `token` | `string \| null` | No | The App Check token. App Check tokens are signed [JWTs](https://www.rfc-editor.org/info/rfc7519/) containing claims that identify the attested app and GCP project. This token is used to access Google services protected by App Check. These tokens can also be [verified by your own custom backends](https://firebase.google.com/docs/app-check/custom-resource-backend) using the Firebase Admin SDK or third-party libraries. |

***

### apps.exchangeAppAttestAttestation

`appCheck.apps.exchangeAppAttestAttestation`

Accepts an App Attest CBOR attestation and verifies it with Apple using your preconfigured team and bundle IDs. If valid, returns an attestation artifact that can later be exchanged for an AppCheckToken using ExchangeAppAttestAssertion

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.exchangeAppAttestAttestation({ app: 'projects/demo-project/apps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `app` | `string` | Yes | Required. The relative resource name of the iOS app, in the format: `projects/{project_number}/apps/{app_id}` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Format: `projects/<id>/apps/<id>`. |
| `limitedUse` | `boolean` | No | Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. |
| `keyId` | `string` | No | Required. The key ID generated by App Attest for the client app. (base64) |
| `attestationStatement` | `string` | No | Required. The App Attest statement returned by the client-side App Attest API. This is a base64url encoded CBOR object in the JSON response. (base64) |
| `challenge` | `string` | No | Required. A one-time challenge returned by an immediately prior call to GenerateAppAttestChallenge. (base64) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `artifact` | `string \| null` | No | An artifact that can be used in future calls to ExchangeAppAttestAssertion. (base64) |
| `appCheckToken` | `object \| null` | No | Encapsulates an *App Check token*, which are used to access backend services protected by App Check. |

> [accordion] appCheckToken full type
>
> ```ts theme={null}
> {
>   ttl?: string | null,
>   token?: string | null
> } | null
> ```

***

### apps.exchangeCustomToken

`appCheck.apps.exchangeCustomToken`

Validates a custom token signed using your project's Admin SDK service account credentials. If valid, returns an AppCheckToken

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.exchangeCustomToken({ app: 'projects/demo-project/apps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `app` | `string` | Yes | Required. The relative resource name of the app, in the format: `projects/{project_number}/apps/{app_id}` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Format: `projects/<id>/apps/<id>`. |
| `limitedUse` | `boolean` | No | Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. |
| `customToken` | `string` | No | Required. A custom token signed using your project's Admin SDK service account credentials. |
| `jti` | `string` | No | Optional. When `limited_use` is set to `true`, this field specifies the desired `jti` claim (Section 4.1.7 of RFC 7519) in the returned App Check token. *Limited use* App Check tokens with the same `jti` will be counted as the same token for the purposes of replay protection. An error is returned if this field is specified without setting `limited_use` to `true`. The size of this field is limited to 250 bytes. If specified, its length must be at least 16 bytes. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ttl` | `string \| null` | No | The duration from the time this token is minted until its expiration. This field is intended to ease client-side token management, since the client may have clock skew, but is still able to accurately measure a duration. |
| `token` | `string \| null` | No | The App Check token. App Check tokens are signed [JWTs](https://www.rfc-editor.org/info/rfc7519/) containing claims that identify the attested app and GCP project. This token is used to access Google services protected by App Check. These tokens can also be [verified by your own custom backends](https://firebase.google.com/docs/app-check/custom-resource-backend) using the Firebase Admin SDK or third-party libraries. |

***

### apps.exchangeDebugToken

`appCheck.apps.exchangeDebugToken`

Validates a debug token secret that you have previously created using CreateDebugToken. If valid, returns an AppCheckToken

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.exchangeDebugToken({ app: 'projects/demo-project/apps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `app` | `string` | Yes | Required. The relative resource name of the app, in the format: `projects/{project_number}/apps/{app_id}` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Format: `projects/<id>/apps/<id>`. |
| `debugToken` | `string` | No | Required. A debug token secret. This string must match a debug token secret previously created using CreateDebugToken. |
| `limitedUse` | `boolean` | No | Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ttl` | `string \| null` | No | The duration from the time this token is minted until its expiration. This field is intended to ease client-side token management, since the client may have clock skew, but is still able to accurately measure a duration. |
| `token` | `string \| null` | No | The App Check token. App Check tokens are signed [JWTs](https://www.rfc-editor.org/info/rfc7519/) containing claims that identify the attested app and GCP project. This token is used to access Google services protected by App Check. These tokens can also be [verified by your own custom backends](https://firebase.google.com/docs/app-check/custom-resource-backend) using the Firebase Admin SDK or third-party libraries. |

***

### apps.exchangeDeviceCheckToken

`appCheck.apps.exchangeDeviceCheckToken`

Accepts a [`device_token`](https://developer.apple.com/documentation/devicecheck/dcdevice) issued by DeviceCheck, and attempts to validate it with Apple. If valid, returns an AppCheckToken

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.exchangeDeviceCheckToken({ app: 'projects/demo-project/apps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `app` | `string` | Yes | Required. The relative resource name of the iOS app, in the format: `projects/{project_number}/apps/{app_id}` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Format: `projects/<id>/apps/<id>`. |
| `deviceToken` | `string` | No | Required. The `device_token` as returned by Apple's client-side [DeviceCheck API](https://developer.apple.com/documentation/devicecheck/dcdevice). This is the base64 encoded `Data` (Swift) or `NSData` (ObjC) object. |
| `limitedUse` | `boolean` | No | Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ttl` | `string \| null` | No | The duration from the time this token is minted until its expiration. This field is intended to ease client-side token management, since the client may have clock skew, but is still able to accurately measure a duration. |
| `token` | `string \| null` | No | The App Check token. App Check tokens are signed [JWTs](https://www.rfc-editor.org/info/rfc7519/) containing claims that identify the attested app and GCP project. This token is used to access Google services protected by App Check. These tokens can also be [verified by your own custom backends](https://firebase.google.com/docs/app-check/custom-resource-backend) using the Firebase Admin SDK or third-party libraries. |

***

### apps.exchangePlayIntegrityToken

`appCheck.apps.exchangePlayIntegrityToken`

Validates an [integrity verdict response token from Play Integrity](https://developer.android.com/google/play/integrity/verdict#decrypt-verify). If valid, returns an AppCheckToken

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.exchangePlayIntegrityToken({ app: 'projects/demo-project/apps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `app` | `string` | Yes | Required. The relative resource name of the Android app, in the format: `projects/{project_number}/apps/{app_id}` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Format: `projects/<id>/apps/<id>`. |
| `playIntegrityToken` | `string` | No | Required. The [integrity verdict response token from Play Integrity](https://developer.android.com/google/play/integrity/verdict#decrypt-verify) issued to your app. |
| `limitedUse` | `boolean` | No | Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ttl` | `string \| null` | No | The duration from the time this token is minted until its expiration. This field is intended to ease client-side token management, since the client may have clock skew, but is still able to accurately measure a duration. |
| `token` | `string \| null` | No | The App Check token. App Check tokens are signed [JWTs](https://www.rfc-editor.org/info/rfc7519/) containing claims that identify the attested app and GCP project. This token is used to access Google services protected by App Check. These tokens can also be [verified by your own custom backends](https://firebase.google.com/docs/app-check/custom-resource-backend) using the Firebase Admin SDK or third-party libraries. |

***

### apps.exchangeRecaptchaEnterpriseToken

`appCheck.apps.exchangeRecaptchaEnterpriseToken`

Validates a [reCAPTCHA Enterprise response token](https://cloud.google.com/recaptcha-enterprise/docs/create-assessment#retrieve_token). If valid, returns an AppCheckToken

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.exchangeRecaptchaEnterpriseToken({ app: 'projects/demo-project/apps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `app` | `string` | Yes | Required. The relative resource name of the web app, in the format: `projects/{project_number}/apps/{app_id}` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Format: `projects/<id>/apps/<id>`. |
| `recaptchaEnterpriseToken` | `string` | No | Required. The reCAPTCHA token as returned by the [reCAPTCHA Enterprise JavaScript API](https://cloud.google.com/recaptcha-enterprise/docs/instrument-web-pages). |
| `limitedUse` | `boolean` | No | Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ttl` | `string \| null` | No | The duration from the time this token is minted until its expiration. This field is intended to ease client-side token management, since the client may have clock skew, but is still able to accurately measure a duration. |
| `token` | `string \| null` | No | The App Check token. App Check tokens are signed [JWTs](https://www.rfc-editor.org/info/rfc7519/) containing claims that identify the attested app and GCP project. This token is used to access Google services protected by App Check. These tokens can also be [verified by your own custom backends](https://firebase.google.com/docs/app-check/custom-resource-backend) using the Firebase Admin SDK or third-party libraries. |

***

### apps.exchangeRecaptchaV3Token

`appCheck.apps.exchangeRecaptchaV3Token`

Validates a [reCAPTCHA v3 response token](https://developers.google.com/recaptcha/docs/v3). If valid, returns an AppCheckToken

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.exchangeRecaptchaV3Token({ app: 'projects/demo-project/apps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `app` | `string` | Yes | Required. The relative resource name of the web app, in the format: `projects/{project_number}/apps/{app_id}` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Format: `projects/<id>/apps/<id>`. |
| `recaptchaV3Token` | `string` | No | Required. The reCAPTCHA token as returned by the [reCAPTCHA v3 JavaScript API](https://developers.google.com/recaptcha/docs/v3). |
| `limitedUse` | `boolean` | No | Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ttl` | `string \| null` | No | The duration from the time this token is minted until its expiration. This field is intended to ease client-side token management, since the client may have clock skew, but is still able to accurately measure a duration. |
| `token` | `string \| null` | No | The App Check token. App Check tokens are signed [JWTs](https://www.rfc-editor.org/info/rfc7519/) containing claims that identify the attested app and GCP project. This token is used to access Google services protected by App Check. These tokens can also be [verified by your own custom backends](https://firebase.google.com/docs/app-check/custom-resource-backend) using the Firebase Admin SDK or third-party libraries. |

***

### apps.generateAppAttestChallenge

`appCheck.apps.generateAppAttestChallenge`

Generates a challenge that protects the integrity of an immediately following call to ExchangeAppAttestAttestation or ExchangeAppAttestAssertion. A challenge should not be reused for multiple calls

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.generateAppAttestChallenge({ app: 'projects/demo-project/apps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `app` | `string` | Yes | Required. The relative resource name of the iOS app, in the format: `projects/{project_number}/apps/{app_id}` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Format: `projects/<id>/apps/<id>`. |
| `body` | `object` | No | Request message for the GenerateAppAttestChallenge method. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ttl` | `string \| null` | No | The duration from the time this challenge is minted until its expiration. This field is intended to ease client-side token management, since the client may have clock skew, but is still able to accurately measure a duration. |
| `challenge` | `string \| null` | No | A one-time use challenge for the client to pass to the App Attest API. (base64) |

***

### apps.generatePlayIntegrityChallenge

`appCheck.apps.generatePlayIntegrityChallenge`

Generates a challenge that protects the integrity of an immediately following integrity verdict request to the Play Integrity API. The next call to ExchangePlayIntegrityToken using the resulting integrity token will verify the presence and validity of the challenge

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.generatePlayIntegrityChallenge({ app: 'projects/demo-project/apps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `app` | `string` | Yes | Required. The relative resource name of the app, in the format: `projects/{project_number}/apps/{app_id}` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Format: `projects/<id>/apps/<id>`. |
| `body` | `object` | No | Request message for the GeneratePlayIntegrityChallenge method. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ttl` | `string \| null` | No | The duration from the time this challenge is minted until its expiration. This field is intended to ease client-side token management, since the client may have clock skew, but is still able to accurately measure a duration. |
| `challenge` | `string \| null` | No | A one-time use [challenge](https://developer.android.com/google/play/integrity/verdict#protect-against-replay-attacks) for the client to pass to the Play Integrity API. |

***

### apps.mintAppCheckToken

`appCheck.apps.mintAppCheckToken`

Mints a new App Check token for the specified Firebase App. This method is intended to be called from a privileged environment where the caller can be authorized via Cloud IAM; for example, using a service account

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.mintAppCheckToken({ app: 'projects/demo-project/apps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `app` | `string` | Yes | Required. The relative resource name of the app, in the format: `projects/{project_number}/apps/{app_id}` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Format: `projects/<id>/apps/<id>`. |
| `limitedUseConfig` | `object` | No | Configuration for a limited-use App Check token. |
| `tokenTtl` | `string` | No | Optional. If specified, the returned App Check token will be a session token, valid for the specified duration. Must be between 30 minutes and 7 days, inclusive. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `token` | `string \| null` | No | The App Check token, used to access backend services protected by App Check. App Check tokens are signed [JWTs](https://tools.ietf.org/html/rfc7519) containing claims that identify the attested app and GCP project. This token is used to access Google services protected by App Check. These tokens can also be [verified by your own custom backends](https://firebase.google.com/docs/app-check/custom-resource-backend) using the Firebase Admin SDK or third-party libraries. |
| `ttl` | `string \| null` | No | The duration from the time this token is minted until its expiration. This field is intended to ease client-side token management, since the client may have clock skew, but is still able to accurately measure a duration. |

***

### apps.playIntegrityConfig.batchGet

`appCheck.apps.playIntegrityConfig.batchGet`

Atomically gets the PlayIntegrityConfigs for the specified list of apps

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.playIntegrityConfig.batchGet({
	parent: 'projects/demo-project',
	names: ['projects/demo-project/apps/1:1234567890:web:abc123/playIntegrityConfig'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `names` | `string[]` | Yes | Required. The relative resource names of the PlayIntegrityConfigs to retrieve, in the format `projects/{project_number}/apps/{app_id}/playIntegrityConfig` A maximum of 100 objects can be retrieved in a batch. |
| `parent` | `string` | Yes | Required. The parent project name shared by all PlayIntegrityConfigs being retrieved, in the format `projects/{project_number}` The parent collection in the `name` field of any resource being retrieved must match this field, or the entire batch fails. Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `configs` | `object[] \| null` | No | PlayIntegrityConfigs retrieved. |

> [accordion] configs full type
>
> ```ts theme={null}
> {
>   tokenTtl?: string | null,
>   appIntegrity?: {
>     allowUnrecognizedVersion?: boolean | null
>   } | null,
>   accountDetails?: {
>     requireLicensed?: boolean | null
>   } | null,
>   deviceIntegrity?: {
>     minDeviceRecognitionLevel?: string | null
>   } | null,
>   name?: string | null
> }[] | null
> ```

***

### apps.playIntegrityConfig.get

`appCheck.apps.playIntegrityConfig.get`

Gets the PlayIntegrityConfig for the specified app

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.playIntegrityConfig.get({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/playIntegrityConfig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The relative resource name of the PlayIntegrityConfig, in the format: `projects/{project_number}/apps/{app_id}/playIntegrityConfig` Format: `projects/<id>/apps/<id>/playIntegrityConfig`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tokenTtl` | `string \| null` | No | Specifies the duration for which App Check tokens exchanged from Play Integrity tokens will be valid. If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. |
| `appIntegrity` | `object \| null` | No | A settings object specifying application integrity requirements for Android devices running your app. These settings correspond to requirements on the [**application integrity** field](https://developer.android.com/google/play/integrity/verdicts#application-integrity-field) obtained from the Play Integrity API. See the [default responses table](https://developer.android.com/google/play/integrity/setup#default) for a quick summary. The default values for these settings work for most apps, and are recommended. |
| `accountDetails` | `object \| null` | No | A settings object specifying account requirements for Android devices running your app. These settings correspond to requirements on the [**account details** field](https://developer.android.com/google/play/integrity/verdicts#account-details-field) obtained from the Play Integrity API. See the [default responses table](https://developer.android.com/google/play/integrity/setup#default) for a quick summary. The default values for these settings work for most apps, and are recommended. |
| `deviceIntegrity` | `object \| null` | No | A settings object specifying device integrity requirements for Android devices running your app. These settings correspond to requirements on the [**device integrity** field](https://developer.android.com/google/play/integrity/verdicts#device-integrity-field) obtained from the Play Integrity API. See the [default responses table](https://developer.android.com/google/play/integrity/setup#default) for a quick summary. |
| `name` | `string \| null` | No | Required. The relative resource name of the Play Integrity configuration object, in the format: `projects/{project_number}/apps/{app_id}/playIntegrityConfig` |

> [accordion] appIntegrity full type
>
> ```ts theme={null}
> {
>   allowUnrecognizedVersion?: boolean | null
> } | null
> ```

> [accordion] accountDetails full type
>
> ```ts theme={null}
> {
>   requireLicensed?: boolean | null
> } | null
> ```

> [accordion] deviceIntegrity full type
>
> ```ts theme={null}
> {
>   minDeviceRecognitionLevel?: string | null
> } | null
> ```

***

### apps.playIntegrityConfig.patch

`appCheck.apps.playIntegrityConfig.patch`

Updates the PlayIntegrityConfig for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange Play Integrity tokens for App Check tokens

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.playIntegrityConfig.patch({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/playIntegrityConfig', updateMask: 'tokenTtl', tokenTtl: '3600s' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The relative resource name of the Play Integrity configuration object, in the format: `projects/{project_number}/apps/{app_id}/playIntegrityConfig` Format: `projects/<id>/apps/<id>/playIntegrityConfig`. |
| `updateMask` | `string` | Yes | Required. A comma-separated list of names of fields in the PlayIntegrityConfig to update. Example: `token_ttl`. |
| `tokenTtl` | `string` | No | Specifies the duration for which App Check tokens exchanged from Play Integrity tokens will be valid. If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. |
| `appIntegrity` | `object` | No | A settings object specifying application integrity requirements for Android devices running your app. These settings correspond to requirements on the [**application integrity** field](https://developer.android.com/google/play/integrity/verdicts#application-integrity-field) obtained from the Play Integrity API. See the [default responses table](https://developer.android.com/google/play/integrity/setup#default) for a quick summary. The default values for these settings work for most apps, and are recommended. |
| `accountDetails` | `object` | No | A settings object specifying account requirements for Android devices running your app. These settings correspond to requirements on the [**account details** field](https://developer.android.com/google/play/integrity/verdicts#account-details-field) obtained from the Play Integrity API. See the [default responses table](https://developer.android.com/google/play/integrity/setup#default) for a quick summary. The default values for these settings work for most apps, and are recommended. |
| `deviceIntegrity` | `object` | No | A settings object specifying device integrity requirements for Android devices running your app. These settings correspond to requirements on the [**device integrity** field](https://developer.android.com/google/play/integrity/verdicts#device-integrity-field) obtained from the Play Integrity API. See the [default responses table](https://developer.android.com/google/play/integrity/setup#default) for a quick summary. |
| `body_name` | `string` | No | Required. The relative resource name of the Play Integrity configuration object, in the format: `projects/{project_number}/apps/{app_id}/playIntegrityConfig` |

> [accordion] appIntegrity full type
>
> ```ts theme={null}
> {
>   allowUnrecognizedVersion?: boolean
> }
> ```

> [accordion] accountDetails full type
>
> ```ts theme={null}
> {
>   requireLicensed?: boolean
> }
> ```

> [accordion] deviceIntegrity full type
>
> ```ts theme={null}
> {
>   minDeviceRecognitionLevel?: DEVICE_RECOGNITION_LEVEL_UNSPECIFIED | NO_INTEGRITY | MEETS_BASIC_INTEGRITY | MEETS_DEVICE_INTEGRITY | MEETS_STRONG_INTEGRITY
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tokenTtl` | `string \| null` | No | Specifies the duration for which App Check tokens exchanged from Play Integrity tokens will be valid. If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. |
| `appIntegrity` | `object \| null` | No | A settings object specifying application integrity requirements for Android devices running your app. These settings correspond to requirements on the [**application integrity** field](https://developer.android.com/google/play/integrity/verdicts#application-integrity-field) obtained from the Play Integrity API. See the [default responses table](https://developer.android.com/google/play/integrity/setup#default) for a quick summary. The default values for these settings work for most apps, and are recommended. |
| `accountDetails` | `object \| null` | No | A settings object specifying account requirements for Android devices running your app. These settings correspond to requirements on the [**account details** field](https://developer.android.com/google/play/integrity/verdicts#account-details-field) obtained from the Play Integrity API. See the [default responses table](https://developer.android.com/google/play/integrity/setup#default) for a quick summary. The default values for these settings work for most apps, and are recommended. |
| `deviceIntegrity` | `object \| null` | No | A settings object specifying device integrity requirements for Android devices running your app. These settings correspond to requirements on the [**device integrity** field](https://developer.android.com/google/play/integrity/verdicts#device-integrity-field) obtained from the Play Integrity API. See the [default responses table](https://developer.android.com/google/play/integrity/setup#default) for a quick summary. |
| `name` | `string \| null` | No | Required. The relative resource name of the Play Integrity configuration object, in the format: `projects/{project_number}/apps/{app_id}/playIntegrityConfig` |

> [accordion] appIntegrity full type
>
> ```ts theme={null}
> {
>   allowUnrecognizedVersion?: boolean | null
> } | null
> ```

> [accordion] accountDetails full type
>
> ```ts theme={null}
> {
>   requireLicensed?: boolean | null
> } | null
> ```

> [accordion] deviceIntegrity full type
>
> ```ts theme={null}
> {
>   minDeviceRecognitionLevel?: string | null
> } | null
> ```

***

### apps.recaptchaEnterpriseConfig.batchGet

`appCheck.apps.recaptchaEnterpriseConfig.batchGet`

Atomically gets the RecaptchaEnterpriseConfigs for the specified list of apps

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.recaptchaEnterpriseConfig.batchGet({
	parent: 'projects/demo-project',
	names: ['projects/demo-project/apps/1:1234567890:web:abc123/recaptchaEnterpriseConfig'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent project name shared by all RecaptchaEnterpriseConfigs being retrieved, in the format `projects/{project_number}` The parent collection in the `name` field of any resource being retrieved must match this field, or the entire batch fails. Format: `projects/<id>`. |
| `names` | `string[]` | Yes | Required. The relative resource names of the RecaptchaEnterpriseConfigs to retrieve, in the format: `projects/{project_number}/apps/{app_id}/recaptchaEnterpriseConfig` A maximum of 100 objects can be retrieved in a batch. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `configs` | `object[] \| null` | No | RecaptchaEnterpriseConfigs retrieved. |

> [accordion] configs full type
>
> ```ts theme={null}
> {
>   riskAnalysis?: {
>     minValidScore?: number | null
>   } | null,
>   siteKey?: string | null,
>   tokenTtl?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### apps.recaptchaEnterpriseConfig.get

`appCheck.apps.recaptchaEnterpriseConfig.get`

Gets the RecaptchaEnterpriseConfig for the specified app

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.recaptchaEnterpriseConfig.get({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/recaptchaEnterpriseConfig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The relative resource name of the RecaptchaEnterpriseConfig, in the format: `projects/{project_number}/apps/{app_id}/recaptchaEnterpriseConfig` Format: `projects/<id>/apps/<id>/recaptchaEnterpriseConfig`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `riskAnalysis` | `object \| null` | No | A settings object specifying risk tolerance and requirements for your application. These settings correspond to requirements on the [**`riskAnalysis`**](https://cloud.google.com/recaptcha/docs/interpret-assessment-website#interpret_assessment) tuple in the assessment obtained from reCAPTCHA Enterprise. The default values for these settings work for most apps, and are recommended. |
| `siteKey` | `string \| null` | No | The score-based site key [created in reCAPTCHA Enterprise](https://cloud.google.com/recaptcha-enterprise/docs/create-key#creating_a_site_key) used to [invoke reCAPTCHA and generate the reCAPTCHA tokens](https://cloud.google.com/recaptcha-enterprise/docs/instrument-web-pages) for your application. Important: This is *not* the `site_secret` (as it is in reCAPTCHA v3), but rather your score-based reCAPTCHA Enterprise site key. |
| `tokenTtl` | `string \| null` | No | Specifies the duration for which App Check tokens exchanged from reCAPTCHA Enterprise tokens will be valid. If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. |
| `name` | `string \| null` | No | Required. The relative resource name of the reCAPTCHA Enterprise configuration object, in the format: `projects/{project_number}/apps/{app_id}/recaptchaEnterpriseConfig` |

> [accordion] riskAnalysis full type
>
> ```ts theme={null}
> {
>   minValidScore?: number | null
> } | null
> ```

***

### apps.recaptchaEnterpriseConfig.patch

`appCheck.apps.recaptchaEnterpriseConfig.patch`

Updates the RecaptchaEnterpriseConfig for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange reCAPTCHA Enterprise tokens for App Check tokens

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.recaptchaEnterpriseConfig.patch({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/recaptchaEnterpriseConfig', updateMask: 'tokenTtl', tokenTtl: '3600s' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The relative resource name of the reCAPTCHA Enterprise configuration object, in the format: `projects/{project_number}/apps/{app_id}/recaptchaEnterpriseConfig` Format: `projects/<id>/apps/<id>/recaptchaEnterpriseConfig`. |
| `updateMask` | `string` | Yes | Required. A comma-separated list of names of fields in the RecaptchaEnterpriseConfig to update. Example: `site_key`. |
| `riskAnalysis` | `object` | No | A settings object specifying risk tolerance and requirements for your application. These settings correspond to requirements on the [**`riskAnalysis`**](https://cloud.google.com/recaptcha/docs/interpret-assessment-website#interpret_assessment) tuple in the assessment obtained from reCAPTCHA Enterprise. The default values for these settings work for most apps, and are recommended. |
| `siteKey` | `string` | No | The score-based site key [created in reCAPTCHA Enterprise](https://cloud.google.com/recaptcha-enterprise/docs/create-key#creating_a_site_key) used to [invoke reCAPTCHA and generate the reCAPTCHA tokens](https://cloud.google.com/recaptcha-enterprise/docs/instrument-web-pages) for your application. Important: This is *not* the `site_secret` (as it is in reCAPTCHA v3), but rather your score-based reCAPTCHA Enterprise site key. |
| `tokenTtl` | `string` | No | Specifies the duration for which App Check tokens exchanged from reCAPTCHA Enterprise tokens will be valid. If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. |
| `body_name` | `string` | No | Required. The relative resource name of the reCAPTCHA Enterprise configuration object, in the format: `projects/{project_number}/apps/{app_id}/recaptchaEnterpriseConfig` |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `riskAnalysis` | `object \| null` | No | A settings object specifying risk tolerance and requirements for your application. These settings correspond to requirements on the [**`riskAnalysis`**](https://cloud.google.com/recaptcha/docs/interpret-assessment-website#interpret_assessment) tuple in the assessment obtained from reCAPTCHA Enterprise. The default values for these settings work for most apps, and are recommended. |
| `siteKey` | `string \| null` | No | The score-based site key [created in reCAPTCHA Enterprise](https://cloud.google.com/recaptcha-enterprise/docs/create-key#creating_a_site_key) used to [invoke reCAPTCHA and generate the reCAPTCHA tokens](https://cloud.google.com/recaptcha-enterprise/docs/instrument-web-pages) for your application. Important: This is *not* the `site_secret` (as it is in reCAPTCHA v3), but rather your score-based reCAPTCHA Enterprise site key. |
| `tokenTtl` | `string \| null` | No | Specifies the duration for which App Check tokens exchanged from reCAPTCHA Enterprise tokens will be valid. If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. |
| `name` | `string \| null` | No | Required. The relative resource name of the reCAPTCHA Enterprise configuration object, in the format: `projects/{project_number}/apps/{app_id}/recaptchaEnterpriseConfig` |

> [accordion] riskAnalysis full type
>
> ```ts theme={null}
> {
>   minValidScore?: number | null
> } | null
> ```

***

### apps.recaptchaV3Config.batchGet

`appCheck.apps.recaptchaV3Config.batchGet`

Atomically gets the RecaptchaV3Configs for the specified list of apps. For security reasons, the `site_secret` field is never populated in the response

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.recaptchaV3Config.batchGet({
	parent: 'projects/demo-project',
	names: ['projects/demo-project/apps/1:1234567890:web:abc123/recaptchaV3Config'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `names` | `string[]` | Yes | Required. The relative resource names of the RecaptchaV3Configs to retrieve, in the format: `projects/{project_number}/apps/{app_id}/recaptchaV3Config` A maximum of 100 objects can be retrieved in a batch. |
| `parent` | `string` | Yes | Required. The parent project name shared by all RecaptchaV3Configs being retrieved, in the format `projects/{project_number}` The parent collection in the `name` field of any resource being retrieved must match this field, or the entire batch fails. Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `configs` | `object[] \| null` | No | RecaptchaV3Configs retrieved. |

> [accordion] configs full type
>
> ```ts theme={null}
> {
>   tokenTtl?: string | null,
>   siteSecret?: string | null,
>   siteSecretSet?: boolean | null,
>   minValidScore?: number | null,
>   name?: string | null
> }[] | null
> ```

***

### apps.recaptchaV3Config.get

`appCheck.apps.recaptchaV3Config.get`

Gets the RecaptchaV3Config for the specified app. For security reasons, the `site_secret` field is never populated in the response

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.recaptchaV3Config.get({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/recaptchaV3Config' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The relative resource name of the RecaptchaV3Config, in the format: `projects/{project_number}/apps/{app_id}/recaptchaV3Config` Format: `projects/<id>/apps/<id>/recaptchaV3Config`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tokenTtl` | `string \| null` | No | Specifies the duration for which App Check tokens exchanged from reCAPTCHA tokens will be valid. If unset, a default value of 1 day is assumed. Must be between 30 minutes and 7 days, inclusive. |
| `siteSecret` | `string \| null` | No | Required. Input only. The site secret used to identify your service for reCAPTCHA v3 verification. For security reasons, this field will never be populated in any response. |
| `siteSecretSet` | `boolean \| null` | No | Output only. Whether the `site_secret` field was previously set. Since we will never return the `site_secret` field, this field is the only way to find out whether it was previously set. |
| `minValidScore` | `number \| null` | No | Specifies a minimum score required for a reCAPTCHA token to be considered valid. If its score is greater than or equal to this value, it will be accepted; otherwise, it will be rejected. The value must be between 0.0 and 1.0. The default value is 0.5. |
| `name` | `string \| null` | No | Required. The relative resource name of the reCAPTCHA v3 configuration object, in the format: `projects/{project_number}/apps/{app_id}/recaptchaV3Config` |

***

### apps.recaptchaV3Config.patch

`appCheck.apps.recaptchaV3Config.patch`

Updates the RecaptchaV3Config for the specified app. While this configuration is incomplete or invalid, the app will be unable to exchange reCAPTCHA v3 tokens for App Check tokens

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.apps.recaptchaV3Config.patch({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/recaptchaV3Config', updateMask: 'tokenTtl', tokenTtl: '3600s' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | Yes | Required. A comma-separated list of names of fields in the RecaptchaV3Config to update. Example: `site_secret`. |
| `name` | `string` | Yes | Required. The relative resource name of the reCAPTCHA v3 configuration object, in the format: `projects/{project_number}/apps/{app_id}/recaptchaV3Config` Format: `projects/<id>/apps/<id>/recaptchaV3Config`. |
| `tokenTtl` | `string` | No | Specifies the duration for which App Check tokens exchanged from reCAPTCHA tokens will be valid. If unset, a default value of 1 day is assumed. Must be between 30 minutes and 7 days, inclusive. |
| `siteSecret` | `string` | No | Required. Input only. The site secret used to identify your service for reCAPTCHA v3 verification. For security reasons, this field will never be populated in any response. |
| `minValidScore` | `number` | No | Specifies a minimum score required for a reCAPTCHA token to be considered valid. If its score is greater than or equal to this value, it will be accepted; otherwise, it will be rejected. The value must be between 0.0 and 1.0. The default value is 0.5. |
| `body_name` | `string` | No | Required. The relative resource name of the reCAPTCHA v3 configuration object, in the format: `projects/{project_number}/apps/{app_id}/recaptchaV3Config` |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tokenTtl` | `string \| null` | No | Specifies the duration for which App Check tokens exchanged from reCAPTCHA tokens will be valid. If unset, a default value of 1 day is assumed. Must be between 30 minutes and 7 days, inclusive. |
| `siteSecret` | `string \| null` | No | Required. Input only. The site secret used to identify your service for reCAPTCHA v3 verification. For security reasons, this field will never be populated in any response. |
| `siteSecretSet` | `boolean \| null` | No | Output only. Whether the `site_secret` field was previously set. Since we will never return the `site_secret` field, this field is the only way to find out whether it was previously set. |
| `minValidScore` | `number \| null` | No | Specifies a minimum score required for a reCAPTCHA token to be considered valid. If its score is greater than or equal to this value, it will be accepted; otherwise, it will be rejected. The value must be between 0.0 and 1.0. The default value is 0.5. |
| `name` | `string \| null` | No | Required. The relative resource name of the reCAPTCHA v3 configuration object, in the format: `projects/{project_number}/apps/{app_id}/recaptchaV3Config` |

***

### jwks.get

`appCheck.jwks.get`

Returns a public JWK set as specified by [RFC 7517](https://www.rfc-editor.org/info/rfc7517/) that can be used to verify App Check tokens. Exactly one of the public keys in the returned set will successfully validate any App Check token that is currently valid

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appCheck.jwks.get({ name: 'jwks' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The relative resource name to the public JWK set. Must always be exactly the string `jwks`. Format: `jwks`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `keys` | `object[] \| null` | No | The set of public keys. See [section 5.1 of RFC 7517](https://www.rfc-editor.org/info/rfc7517#section-5). |

> [accordion] keys full type
>
> ```ts theme={null}
> {
>   kty?: string | null,
>   n?: string | null,
>   use?: string | null,
>   e?: string | null,
>   alg?: string | null,
>   kid?: string | null
> }[] | null
> ```

***

### oauthClients.exchangeAppAttestAssertion

`appCheck.oauthClients.exchangeAppAttestAssertion`

Accepts an App Attest assertion and an artifact previously obtained from ExchangeAppAttestAttestation and verifies those with Apple. If valid, returns an AppCheckToken

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.oauthClients.exchangeAppAttestAssertion({ app: 'oauthClients/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `app` | `string` | Yes | Required. The relative resource name of the iOS app, in the format: `projects/{project_number}/apps/{app_id}` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Format: `oauthClients/<id>`. |
| `challenge` | `string` | No | Required. A one-time challenge returned by an immediately prior call to GenerateAppAttestChallenge. (base64) |
| `limitedUse` | `boolean` | No | Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. |
| `assertion` | `string` | No | Required. The CBOR-encoded assertion returned by the client-side App Attest API. (base64) |
| `artifact` | `string` | No | Required. The artifact returned by a previous call to ExchangeAppAttestAttestation. (base64) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ttl` | `string \| null` | No | The duration from the time this token is minted until its expiration. This field is intended to ease client-side token management, since the client may have clock skew, but is still able to accurately measure a duration. |
| `token` | `string \| null` | No | The App Check token. App Check tokens are signed [JWTs](https://www.rfc-editor.org/info/rfc7519/) containing claims that identify the attested app and GCP project. This token is used to access Google services protected by App Check. These tokens can also be [verified by your own custom backends](https://firebase.google.com/docs/app-check/custom-resource-backend) using the Firebase Admin SDK or third-party libraries. |

***

### oauthClients.exchangeAppAttestAttestation

`appCheck.oauthClients.exchangeAppAttestAttestation`

Accepts an App Attest CBOR attestation and verifies it with Apple using your preconfigured team and bundle IDs. If valid, returns an attestation artifact that can later be exchanged for an AppCheckToken using ExchangeAppAttestAssertion

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.oauthClients.exchangeAppAttestAttestation({ app: 'oauthClients/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `app` | `string` | Yes | Required. The relative resource name of the iOS app, in the format: `projects/{project_number}/apps/{app_id}` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Format: `oauthClients/<id>`. |
| `limitedUse` | `boolean` | No | Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. |
| `keyId` | `string` | No | Required. The key ID generated by App Attest for the client app. (base64) |
| `attestationStatement` | `string` | No | Required. The App Attest statement returned by the client-side App Attest API. This is a base64url encoded CBOR object in the JSON response. (base64) |
| `challenge` | `string` | No | Required. A one-time challenge returned by an immediately prior call to GenerateAppAttestChallenge. (base64) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `artifact` | `string \| null` | No | An artifact that can be used in future calls to ExchangeAppAttestAssertion. (base64) |
| `appCheckToken` | `object \| null` | No | Encapsulates an *App Check token*, which are used to access backend services protected by App Check. |

> [accordion] appCheckToken full type
>
> ```ts theme={null}
> {
>   ttl?: string | null,
>   token?: string | null
> } | null
> ```

***

### oauthClients.exchangeDebugToken

`appCheck.oauthClients.exchangeDebugToken`

Validates a debug token secret that you have previously created using CreateDebugToken. If valid, returns an AppCheckToken

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.oauthClients.exchangeDebugToken({ app: 'oauthClients/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `app` | `string` | Yes | Required. The relative resource name of the app, in the format: `projects/{project_number}/apps/{app_id}` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Format: `oauthClients/<id>`. |
| `debugToken` | `string` | No | Required. A debug token secret. This string must match a debug token secret previously created using CreateDebugToken. |
| `limitedUse` | `boolean` | No | Specifies whether this attestation is for use in a *limited use* (`true`) or *session based* (`false`) context. To enable this attestation to be used with the *replay protection* feature, set this to `true`. The default value is `false`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ttl` | `string \| null` | No | The duration from the time this token is minted until its expiration. This field is intended to ease client-side token management, since the client may have clock skew, but is still able to accurately measure a duration. |
| `token` | `string \| null` | No | The App Check token. App Check tokens are signed [JWTs](https://www.rfc-editor.org/info/rfc7519/) containing claims that identify the attested app and GCP project. This token is used to access Google services protected by App Check. These tokens can also be [verified by your own custom backends](https://firebase.google.com/docs/app-check/custom-resource-backend) using the Firebase Admin SDK or third-party libraries. |

***

### oauthClients.generateAppAttestChallenge

`appCheck.oauthClients.generateAppAttestChallenge`

Generates a challenge that protects the integrity of an immediately following call to ExchangeAppAttestAttestation or ExchangeAppAttestAssertion. A challenge should not be reused for multiple calls

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.oauthClients.generateAppAttestChallenge({ app: 'oauthClients/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `app` | `string` | Yes | Required. The relative resource name of the iOS app, in the format: `projects/{project_number}/apps/{app_id}` If necessary, the `project_number` element can be replaced with the project ID of the Firebase project. Learn more about using project identifiers in Google's [AIP 2510](https://google.aip.dev/cloud/2510) standard. Format: `oauthClients/<id>`. |
| `body` | `object` | No | Request message for the GenerateAppAttestChallenge method. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ttl` | `string \| null` | No | The duration from the time this challenge is minted until its expiration. This field is intended to ease client-side token management, since the client may have clock skew, but is still able to accurately measure a duration. |
| `challenge` | `string \| null` | No | A one-time use challenge for the client to pass to the App Attest API. (base64) |

***

### services.batchUpdate

`appCheck.services.batchUpdate`

Atomically updates the specified Service configurations

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.services.batchUpdate({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent project name shared by all Service configurations being updated, in the format `projects/{project_number}` The parent collection in the `name` field of any resource being updated must match this field, or the entire batch fails. Format: `projects/<id>`. |
| `updateMask` | `string` | No | Optional. A comma-separated list of names of fields in the Services to update. Example: `display_name`. If the `update_mask` field is set in both this request and any of the UpdateServiceRequest messages, they must match or the entire batch fails and no updates will be committed. |
| `requests` | `object[]` | No | Required. The request messages specifying the Services to update. A maximum of 100 objects can be updated in a batch. |

> [accordion] requests full type
>
> ```ts theme={null}
> {
>   updateMask?: string,
>   service?: {
>     enforcementMode?: OFF | UNENFORCED | ENFORCED,
>     name?: string,
>     etag?: string,
>     replayProtection?: OFF | UNENFORCED | ENFORCED
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `services` | `object[] \| null` | No | Service objects after the updates have been applied. |

> [accordion] services full type
>
> ```ts theme={null}
> {
>   enforcementMode?: string | null,
>   name?: string | null,
>   etag?: string | null,
>   replayProtection?: string | null,
>   updateTime?: string | null
> }[] | null
> ```

***

### services.get

`appCheck.services.get`

Gets the Service configuration for the specified service name

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appCheck.services.get({ name: 'projects/demo-project/services/firestore.googleapis.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The relative resource name of the Service to retrieve, in the format: `projects/{project_number}/services/{service_id}` Note that the `service_id` element must be a supported service ID. Consult the Service.name field for a list of supported service IDs. Format: `projects/<id>/services/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `enforcementMode` | `string \| null` | No | Required. The baseline protection EnforcementMode for this service. |
| `name` | `string \| null` | No | Required. The relative resource name of the service configuration object, in the format: `projects/{project_number}/services/{service_id}` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported. |
| `etag` | `string \| null` | No | Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. |
| `replayProtection` | `string \| null` | No | Optional. The replay protection EnforcementMode for this service. Note that this field cannot be set to a level higher than that of baseline protection. For example, if the enforcement mode for baseline protection is set to `UNENFORCED`, this field cannot be set to `ENFORCED`. In order to enforce replay protection, you must first enforce App Check's baseline protection. An HTTP 400 error will be returned in this case. By default, this field is set to `OFF`. Setting this field to `UNENFORCED` or `ENFORCED` is considered opting into replay protection. |
| `updateTime` | `string \| null` | No | Output only. Timestamp when this service configuration object was most recently updated. |

***

### services.list

`appCheck.services.list`

Lists all Service configurations for the specified project. Only Services which were explicitly configured using UpdateService or BatchUpdateServices will be returned (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appCheck.services.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The relative resource name of the parent project for which to list each associated Service, in the format: `projects/{project_number}` Format: `projects/<id>`. |
| `pageSize` | `number` | No | The maximum number of Services to return in the response. Only explicitly configured services are returned. The server may return fewer than this at its own discretion. If no value is specified (or too large a value is specified), the server will impose its own limit. |
| `pageToken` | `string` | No | Token returned from a previous call to ListServices indicating where in the set of Services to resume listing. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListServices must match the call that provided the page token; if they do not match, the result is undefined. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `services` | `object[] \| null` | No | The Services retrieved. |
| `nextPageToken` | `string \| null` | No | If the result list is too large to fit in a single response, then a token is returned. If the string is empty or omitted, then this response is the last page of results. This token can be used in a subsequent call to ListServices to find the next group of Services. Page tokens are short-lived and should not be persisted. |

> [accordion] services full type
>
> ```ts theme={null}
> {
>   enforcementMode?: string | null,
>   name?: string | null,
>   etag?: string | null,
>   replayProtection?: string | null,
>   updateTime?: string | null
> }[] | null
> ```

***

### services.patch

`appCheck.services.patch`

Updates the specified Service configuration

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.services.patch({ name: 'projects/demo-project/services/firestore.googleapis.com', updateMask: 'enforcementMode', enforcementMode: 'ENFORCED' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The relative resource name of the service configuration object, in the format: `projects/{project_number}/services/{service_id}` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported. Format: `projects/<id>/services/<id>`. |
| `updateMask` | `string` | Yes | Required. A comma-separated list of names of fields in the Service to update. Example: `enforcement_mode`. |
| `enforcementMode` | `OFF \| UNENFORCED \| ENFORCED` | No | Required. The baseline protection EnforcementMode for this service. |
| `body_name` | `string` | No | Required. The relative resource name of the service configuration object, in the format: `projects/{project_number}/services/{service_id}` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported. |
| `etag` | `string` | No | Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. |
| `replayProtection` | `OFF \| UNENFORCED \| ENFORCED` | No | Optional. The replay protection EnforcementMode for this service. Note that this field cannot be set to a level higher than that of baseline protection. For example, if the enforcement mode for baseline protection is set to `UNENFORCED`, this field cannot be set to `ENFORCED`. In order to enforce replay protection, you must first enforce App Check's baseline protection. An HTTP 400 error will be returned in this case. By default, this field is set to `OFF`. Setting this field to `UNENFORCED` or `ENFORCED` is considered opting into replay protection. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `enforcementMode` | `string \| null` | No | Required. The baseline protection EnforcementMode for this service. |
| `name` | `string \| null` | No | Required. The relative resource name of the service configuration object, in the format: `projects/{project_number}/services/{service_id}` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported. |
| `etag` | `string \| null` | No | Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. |
| `replayProtection` | `string \| null` | No | Optional. The replay protection EnforcementMode for this service. Note that this field cannot be set to a level higher than that of baseline protection. For example, if the enforcement mode for baseline protection is set to `UNENFORCED`, this field cannot be set to `ENFORCED`. In order to enforce replay protection, you must first enforce App Check's baseline protection. An HTTP 400 error will be returned in this case. By default, this field is set to `OFF`. Setting this field to `UNENFORCED` or `ENFORCED` is considered opting into replay protection. |
| `updateTime` | `string \| null` | No | Output only. Timestamp when this service configuration object was most recently updated. |

***

### services.resourcePolicies.batchUpdate

`appCheck.services.resourcePolicies.batchUpdate`

Atomically updates the specified ResourcePolicy configurations

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.services.resourcePolicies.batchUpdate({ parent: 'projects/demo-project/services/firestore.googleapis.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent service name, in the format `projects/{project_number}/services/{service_id}` The parent collection in the `name` field of any resource being updated must match this field, or the entire batch fails. Format: `projects/<id>/services/<id>`. |
| `updateMask` | `string` | No | Optional. A comma-separated list of names of fields in the ResourcePolicy objects to update. Example: `enforcement_mode`. If this field is present, the `update_mask` field in the UpdateResourcePolicyRequest messages must all match this field, or the entire batch fails and no updates will be committed. |
| `requests` | `object[]` | No | Required. The request messages specifying the ResourcePolicy objects to update. A maximum of 100 objects can be updated in a batch. |

> [accordion] requests full type
>
> ```ts theme={null}
> {
>   updateMask?: string,
>   resourcePolicy?: {
>     name?: string,
>     enforcementMode?: OFF | UNENFORCED | ENFORCED,
>     etag?: string,
>     targetResource?: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourcePolicies` | `object[] \| null` | No | ResourcePolicy objects after the updates have been applied. |

> [accordion] resourcePolicies full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   enforcementMode?: string | null,
>   etag?: string | null,
>   updateTime?: string | null,
>   targetResource?: string | null
> }[] | null
> ```

***

### services.resourcePolicies.create

`appCheck.services.resourcePolicies.create`

Creates the specified ResourcePolicy configuration

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.services.resourcePolicies.create({ parent: 'projects/demo-project/services/firestore.googleapis.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The relative resource name of the parent Service in which the specified ResourcePolicy will be created, in the format: `projects/{project_number}/services/{service_id}` Note that the `service_id` element must be a supported service ID. Consult the ResourcePolicy.name field for a list of supported service IDs. Format: `projects/<id>/services/<id>`. |
| `name` | `string` | No | Required. Identifier. The relative name of the resource policy object, in the format: `projects/{project_number}/services/{service_id}/resourcePolicies/{resource_policy_id}` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: \* `oauth2.googleapis.com` (Google Identity for iOS) `resource_policy_id` is a system-generated UID. |
| `enforcementMode` | `OFF \| UNENFORCED \| ENFORCED` | No | Required. The baseline protection EnforcementMode for this resource. This will override the service-level baseline protection EnforcementMode. |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. |
| `targetResource` | `string` | No | Required. Service specific name of the resource object to which this policy applies, in the format: \* **iOS OAuth clients** (Google Identity for iOS): `//oauth2.googleapis.com/projects/{project_number}/oauthClients/{oauth_client_id}` Note that the resource must belong to the service specified in the `name` and be from the same project as this policy, but the resource is allowed to be missing at the time of creation of this policy; in that case, we make a best-effort attempt at respecting this policy, but it may not have any effect until the resource is fully created. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Required. Identifier. The relative name of the resource policy object, in the format: `projects/{project_number}/services/{service_id}/resourcePolicies/{resource_policy_id}` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: \* `oauth2.googleapis.com` (Google Identity for iOS) `resource_policy_id` is a system-generated UID. |
| `enforcementMode` | `string \| null` | No | Required. The baseline protection EnforcementMode for this resource. This will override the service-level baseline protection EnforcementMode. |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. |
| `updateTime` | `string \| null` | No | Output only. Timestamp when this resource policy configuration object was most recently updated. |
| `targetResource` | `string \| null` | No | Required. Service specific name of the resource object to which this policy applies, in the format: \* **iOS OAuth clients** (Google Identity for iOS): `//oauth2.googleapis.com/projects/{project_number}/oauthClients/{oauth_client_id}` Note that the resource must belong to the service specified in the `name` and be from the same project as this policy, but the resource is allowed to be missing at the time of creation of this policy; in that case, we make a best-effort attempt at respecting this policy, but it may not have any effect until the resource is fully created. |

***

### services.resourcePolicies.delete

`appCheck.services.resourcePolicies.delete`

Deletes the specified ResourcePolicy configuration

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.appCheck.services.resourcePolicies.delete({ name: 'projects/demo-project/services/firestore.googleapis.com/resourcePolicies/rp-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string` | No | The checksum to be validated against the current ResourcePolicy, to ensure the client has an up-to-date value before proceeding. This checksum is computed by the server based on the values of fields in the ResourcePolicy object, and can be obtained from the ResourcePolicy object received from the last CreateResourcePolicy, GetResourcePolicy, ListResourcePolicies, UpdateResourcePolicy, or BatchUpdateResourcePolicies call. This etag is strongly validated as defined by RFC 7232. |
| `name` | `string` | Yes | Required. The relative resource name of the ResourcePolicy to delete, in the format: `projects/{project_number}/services/{service_id}/resourcePolicies/{resource_policy_id}` Format: `projects/<id>/services/<id>/resourcePolicies/<id>`. |

**Output:** *empty object*

***

### services.resourcePolicies.get

`appCheck.services.resourcePolicies.get`

Gets the requested ResourcePolicy configuration

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appCheck.services.resourcePolicies.get({ name: 'projects/demo-project/services/firestore.googleapis.com/resourcePolicies/rp-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The relative resource name of the ResourcePolicy to retrieve, in the format: `projects/{project_number}/services/{service_id}/resourcePolicies/{resource_policy_id}` Note that the `service_id` element must be a supported service ID. Consult the ResourcePolicy.name field for a list of supported service IDs. Format: `projects/<id>/services/<id>/resourcePolicies/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Required. Identifier. The relative name of the resource policy object, in the format: `projects/{project_number}/services/{service_id}/resourcePolicies/{resource_policy_id}` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: \* `oauth2.googleapis.com` (Google Identity for iOS) `resource_policy_id` is a system-generated UID. |
| `enforcementMode` | `string \| null` | No | Required. The baseline protection EnforcementMode for this resource. This will override the service-level baseline protection EnforcementMode. |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. |
| `updateTime` | `string \| null` | No | Output only. Timestamp when this resource policy configuration object was most recently updated. |
| `targetResource` | `string \| null` | No | Required. Service specific name of the resource object to which this policy applies, in the format: \* **iOS OAuth clients** (Google Identity for iOS): `//oauth2.googleapis.com/projects/{project_number}/oauthClients/{oauth_client_id}` Note that the resource must belong to the service specified in the `name` and be from the same project as this policy, but the resource is allowed to be missing at the time of creation of this policy; in that case, we make a best-effort attempt at respecting this policy, but it may not have any effect until the resource is fully created. |

***

### services.resourcePolicies.list

`appCheck.services.resourcePolicies.list`

Lists all ResourcePolicy configurations for the specified project and service (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appCheck.services.resourcePolicies.list({ parent: 'projects/demo-project/services/firestore.googleapis.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | Optional. Filters the results by the specified rule. For the exact syntax of this field, please consult the [AIP-160](https://google.aip.dev/160) standard. Currently, since the only fields in the ResourcePolicy resource are the scalar fields `enforcement_mode` and `target_resource`, this method does not support the traversal operator (`.`) or the has operator (`:`). |
| `pageSize` | `number` | No | The maximum number of ResourcePolicy objects to return in the response. The server may return fewer than this at its own discretion. If no value is specified (or too large a value is specified), the server will impose its own limit. |
| `parent` | `string` | Yes | Required. The relative resource name of the parent Service for which to list each associated ResourcePolicy, in the format: `projects/{project_number}/services/{service_id}` Note that the `service_id` element must be a supported service ID. Consult the ResourcePolicy.name field for a list of supported service IDs. Format: `projects/<id>/services/<id>`. |
| `pageToken` | `string` | No | Token returned from a previous call to ListResourcePolicies indicating where in the set of ResourcePolicy objects to resume listing. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListResourcePolicies must match the call that provided the page token; if they do not match, the result is undefined. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `resourcePolicies` | `object[] \| null` | No | The ResourcePolicy objects retrieved. |
| `nextPageToken` | `string \| null` | No | If the result list is too large to fit in a single response, then a token is returned. If the string is empty or omitted, then this response is the last page of results. This token can be used in a subsequent call to ListResourcePolicies to find the next group of ResourcePolicy objects. Page tokens are short-lived and should not be persisted. |

> [accordion] resourcePolicies full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   enforcementMode?: string | null,
>   etag?: string | null,
>   updateTime?: string | null,
>   targetResource?: string | null
> }[] | null
> ```

***

### services.resourcePolicies.patch

`appCheck.services.resourcePolicies.patch`

Updates the specified ResourcePolicy configuration

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appCheck.services.resourcePolicies.patch({ name: 'projects/demo-project/services/oauth2.googleapis.com/resourcePolicies/rp-1', updateMask: 'enforcementMode', enforcementMode: 'UNENFORCED' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Identifier. The relative name of the resource policy object, in the format: `projects/{project_number}/services/{service_id}/resourcePolicies/{resource_policy_id}` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: \* `oauth2.googleapis.com` (Google Identity for iOS) `resource_policy_id` is a system-generated UID. Format: `projects/<id>/services/<id>/resourcePolicies/<id>`. |
| `updateMask` | `string` | Yes | Required. A comma-separated list of names of fields in the ResourcePolicy to update. Example: `enforcement_mode`. |
| `body_name` | `string` | No | Required. Identifier. The relative name of the resource policy object, in the format: `projects/{project_number}/services/{service_id}/resourcePolicies/{resource_policy_id}` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: \* `oauth2.googleapis.com` (Google Identity for iOS) `resource_policy_id` is a system-generated UID. |
| `enforcementMode` | `OFF \| UNENFORCED \| ENFORCED` | No | Required. The baseline protection EnforcementMode for this resource. This will override the service-level baseline protection EnforcementMode. |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. |
| `targetResource` | `string` | No | Required. Service specific name of the resource object to which this policy applies, in the format: \* **iOS OAuth clients** (Google Identity for iOS): `//oauth2.googleapis.com/projects/{project_number}/oauthClients/{oauth_client_id}` Note that the resource must belong to the service specified in the `name` and be from the same project as this policy, but the resource is allowed to be missing at the time of creation of this policy; in that case, we make a best-effort attempt at respecting this policy, but it may not have any effect until the resource is fully created. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Required. Identifier. The relative name of the resource policy object, in the format: `projects/{project_number}/services/{service_id}/resourcePolicies/{resource_policy_id}` Note that the `service_id` element must be a supported service ID. Currently, the following service IDs are supported: \* `oauth2.googleapis.com` (Google Identity for iOS) `resource_policy_id` is a system-generated UID. |
| `enforcementMode` | `string \| null` | No | Required. The baseline protection EnforcementMode for this resource. This will override the service-level baseline protection EnforcementMode. |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. |
| `updateTime` | `string \| null` | No | Output only. Timestamp when this resource policy configuration object was most recently updated. |
| `targetResource` | `string \| null` | No | Required. Service specific name of the resource object to which this policy applies, in the format: \* **iOS OAuth clients** (Google Identity for iOS): `//oauth2.googleapis.com/projects/{project_number}/oauthClients/{oauth_client_id}` Note that the resource must belong to the service specified in the `name` and be from the same project as this policy, but the resource is allowed to be missing at the time of creation of this policy; in that case, we make a best-effort attempt at respecting this policy, but it may not have any effect until the resource is fully created. |

***

## App Distribution

### apps.getAabInfo

`appDistribution.apps.getAabInfo`

Gets Android App Bundle (AAB) information for a Firebase app

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appDistribution.apps.getAabInfo({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/aabInfo' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the `AabInfo` resource to retrieve. Format: `projects/{project_number}/apps/{app}/aabInfo` Format: `projects/<id>/apps/<id>/aabInfo`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The name of the `AabInfo` resource. Format: `projects/{project_number}/apps/{app}/aabInfo` |
| `testCertificate` | `object \| null` | No | App bundle test certificate |
| `integrationState` | `string \| null` | No | App bundle integration state. Only valid for android apps. |

> [accordion] testCertificate full type
>
> ```ts theme={null}
> {
>   hashSha256?: string | null,
>   hashSha1?: string | null,
>   hashMd5?: string | null
> } | null
> ```

***

### apps.releases.batchDelete

`appDistribution.apps.releases.batchDelete`

Deletes releases. A maximum of 100 releases can be deleted per request

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.appDistribution.apps.releases.batchDelete({ parent: 'projects/demo-project/apps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The name of the app resource, which is the parent of the release resources. Format: `projects/{project_number}/apps/{app}` Format: `projects/<id>/apps/<id>`. |
| `names` | `string[]` | No | Required. The names of the release resources to delete. Format: `projects/{project_number}/apps/{app}/releases/{release}` A maximum of 100 releases can be deleted per request. |

**Output:** *empty object*

***

### apps.releases.distribute

`appDistribution.apps.releases.distribute`

Distributes a release to testers. This call does the following: 1

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.appDistribution.apps.releases.distribute({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/releases/r1a2b3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the release resource to distribute. Format: `projects/{project_number}/apps/{app}/releases/{release}` Format: `projects/<id>/apps/<id>/releases/<id>`. |
| `testerEmails` | `string[]` | No | Optional. A list of tester email addresses to be given access to this release. A combined maximum of 999 `testerEmails` and `groupAliases` can be specified in a single request. |
| `groupAliases` | `string[]` | No | Optional. A list of group aliases (IDs) to be given access to this release. A combined maximum of 999 `testerEmails` and `groupAliases` can be specified in a single request. |

**Output:** *empty object*

***

### apps.releases.feedbackReports.delete

`appDistribution.apps.releases.feedbackReports.delete`

Deletes a feedback report

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.appDistribution.apps.releases.feedbackReports.delete({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/releases/r1a2b3/feedbackReports/fb-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the feedback report to delete. Format: projects/\{project\_number}/apps/\{app}/releases/\{release}/feedbackReports/\{feedback\_report} Format: `projects/<id>/apps/<id>/releases/<id>/feedbackReports/<id>`. |

**Output:** *empty object*

***

### apps.releases.feedbackReports.get

`appDistribution.apps.releases.feedbackReports.get`

Gets a feedback report

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appDistribution.apps.releases.feedbackReports.get({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/releases/r1a2b3/feedbackReports/fb-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the feedback report to retrieve. Format: projects/\{project\_number}/apps/\{app}/releases/\{release}/feedbackReports/\{feedback\_report} Format: `projects/<id>/apps/<id>/releases/<id>/feedbackReports/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tester` | `string \| null` | No | Output only. The resource name of the tester who submitted the feedback report. |
| `text` | `string \| null` | No | Output only. The text of the feedback report. |
| `firebaseConsoleUri` | `string \| null` | No | Output only. A link to the Firebase console displaying the feedback report. |
| `screenshotUri` | `string \| null` | No | Output only. A signed link (which expires in one hour) that lets you directly download the screenshot. |
| `name` | `string \| null` | No | The name of the feedback report resource. Format: `projects/{project_number}/apps/{app}/releases/{release}/feedbackReports/{feedback_report}` |
| `createTime` | `string \| null` | No | Output only. The time when the feedback report was created. |

***

### apps.releases.feedbackReports.list

`appDistribution.apps.releases.feedbackReports.list`

Lists feedback reports. By default, sorts by `createTime` in descending order (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appDistribution.apps.releases.feedbackReports.list({ parent: 'projects/demo-project/apps/1:1234567890:web:abc123/releases/r1a2b3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Output only. A page token, received from a previous `ListFeedbackReports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListFeedbackReports` must match the call that provided the page token. |
| `pageSize` | `number` | No | Output only. The maximum number of feedback reports to return. The service may return fewer than this value. The valid range is \[1-100]; If unspecified (0), at most 25 feedback reports are returned. Values above 100 are coerced to 100. |
| `parent` | `string` | Yes | Required. The name of the release resource, which is the parent of the feedback report resources. Format: `projects/{project_number}/apps/{app}/releases/{release}` Format: `projects/<id>/apps/<id>/releases/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A short-lived token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| `feedbackReports` | `object[] \| null` | No | The feedback reports |

> [accordion] feedbackReports full type
>
> ```ts theme={null}
> {
>   tester?: string | null,
>   text?: string | null,
>   firebaseConsoleUri?: string | null,
>   screenshotUri?: string | null,
>   name?: string | null,
>   createTime?: string | null
> }[] | null
> ```

***

### apps.releases.get

`appDistribution.apps.releases.get`

Gets a release

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appDistribution.apps.releases.get({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/releases/r1a2b3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the release resource to retrieve. Format: projects/\{project\_number}/apps/\{app}/releases/\{release} Format: `projects/<id>/apps/<id>/releases/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expireTime` | `string \| null` | No | Output only. The time the release will expire. |
| `buildVersion` | `string \| null` | No | Output only. Build version of the release. For an Android release, the build version is the `versionCode`. For an iOS release, the build version is the `CFBundleVersion`. |
| `releaseNotes` | `object \| null` | No | Notes that belong to a release. |
| `androidPackageRegistrationState` | `string \| null` | No | Output only. Registration state of the Android package (BinaryType.APK). |
| `feedbackCount` | `number \| null` | No | Output only. Number of feedback reports left by testers. |
| `openInvitationCount` | `number \| null` | No | Output only. Number of testers who were invited (incl. expired invitations), but did not (yet) accept the invitation. |
| `name` | `string \| null` | No | The name of the release resource. Format: `projects/{project_number}/apps/{app}/releases/{release}` |
| `installationCount` | `number \| null` | No | Output only. Number of testers who have downloaded this release. |
| `acceptedInvitationCount` | `number \| null` | No | Output only. Number of testers with accepted invitations. |
| `testState` | `string \| null` | No | Output only. The overall state of tests run on this release |
| `binaryDownloadUri` | `string \| null` | No | Output only. A signed link (which expires in one hour) to directly download the app binary (IPA/APK/AAB) file. |
| `firebaseConsoleUri` | `string \| null` | No | Output only. A link to the Firebase console displaying a single release. |
| `updateTime` | `string \| null` | No | Output only. The time the release was last updated. |
| `displayVersion` | `string \| null` | No | Output only. Display version of the release. For an Android release, the display version is the `versionName`. For an iOS release, the display version is the `CFBundleShortVersionString`. |
| `binaryType` | `string \| null` | No | Output only. Type of binary. |
| `testingUri` | `string \| null` | No | Output only. A link to the release in the tester web clip or Android app that lets testers (which were granted access to the app) view release notes and install the app onto their devices. |
| `createTime` | `string \| null` | No | Output only. The time the release was created. |

> [accordion] releaseNotes full type
>
> ```ts theme={null}
> {
>   text?: string | null
> } | null
> ```

***

### apps.releases.list

`appDistribution.apps.releases.list`

Lists releases. By default, sorts by `createTime` in descending order (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appDistribution.apps.releases.list({ parent: 'projects/demo-project/apps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of releases to return. The service may return fewer than this value. The valid range is \[1-100]; If unspecified (0), at most 25 releases are returned. Values above 100 are coerced to 100. |
| `filter` | `string` | No | Optional. The expression to filter releases listed in the response. To learn more about filtering, refer to the [AIP-160 standard](http://aip.dev/160). Supported fields: - Time fields supporting `<`, `<=`, `>` and `>=`; expecting an RFC-3339 formatted string: - `create_time` (or `createTime`) - `update_time` (or `updateTime`) - `expire_time` (or `expireTime`) - Text fields supporting `=`. |
| `parent` | `string` | Yes | Required. The name of the app resource, which is the parent of the release resources. Format: `projects/{project_number}/apps/{app}` Format: `projects/<id>/apps/<id>`. |
| `orderBy` | `string` | No | Optional. The fields used to order releases. Supported fields: - `create_time` (or `createTime`) - `update_time` (or `updateTime`) - `expire_time` (or `expireTime`) To specify descending order for a field, append a "desc" suffix, for example, `createTime desc`. If this parameter is not set, releases are ordered by `createTime` in descending order. |
| `pageToken` | `string` | No | Optional. A page token, received from a previous `ListReleases` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListReleases` must match the call that provided the page token. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A short-lived token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| `releases` | `object[] \| null` | No | The releases |
| `totalSize` | `number \| null` | No | The total number of releases. |

> [accordion] releases full type
>
> ```ts theme={null}
> {
>   expireTime?: string | null,
>   buildVersion?: string | null,
>   releaseNotes?: {
>     text?: string | null
>   } | null,
>   androidPackageRegistrationState?: string | null,
>   feedbackCount?: number | null,
>   openInvitationCount?: number | null,
>   name?: string | null,
>   installationCount?: number | null,
>   acceptedInvitationCount?: number | null,
>   testState?: string | null,
>   binaryDownloadUri?: string | null,
>   firebaseConsoleUri?: string | null,
>   updateTime?: string | null,
>   displayVersion?: string | null,
>   binaryType?: string | null,
>   testingUri?: string | null,
>   createTime?: string | null
> }[] | null
> ```

***

### apps.releases.operations.cancel

`appDistribution.apps.releases.operations.cancel`

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appDistribution.apps.releases.operations.cancel({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/releases/r1a2b3/operations/op-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource to be cancelled. Format: `projects/<id>/apps/<id>/releases/<id>/operations/<id>`. |
| `body` | `object` | No | The request message for Operations.CancelOperation. |

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

**Output:** *empty object*

***

### apps.releases.operations.delete

`appDistribution.apps.releases.operations.delete`

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.appDistribution.apps.releases.operations.delete({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/releases/r1a2b3/operations/op-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource to be deleted. Format: `projects/<id>/apps/<id>/releases/<id>/operations/<id>`. |

**Output:** *empty object*

***

### apps.releases.operations.get

`appDistribution.apps.releases.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appDistribution.apps.releases.operations.get({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/releases/r1a2b3/operations/op-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `projects/<id>/apps/<id>/releases/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### apps.releases.operations.list

`appDistribution.apps.releases.operations.list`

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appDistribution.apps.releases.operations.list({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/releases/r1a2b3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `returnPartialSuccess` | `boolean` | No | When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `"projects/example/locations/-"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation. |
| `name` | `string` | Yes | The name of the operation's parent resource. Format: `projects/<id>/apps/<id>/releases/<id>`. |
| `pageToken` | `string` | No | The standard list page token. |
| `filter` | `string` | No | The standard list filter. |
| `pageSize` | `number` | No | The standard list page size. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `operations` | `object[] \| null` | No | A list of operations that matches the specified filter in the request. |
| `nextPageToken` | `string \| null` | No | The standard List next-page token. |
| `unreachable` | `string[] \| null` | No | Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations. |

> [accordion] operations full type
>
> ```ts theme={null}
> {
>   metadata?: Record<string, any> | null,
>   name?: string | null,
>   done?: boolean | null,
>   error?: {
>     message?: string | null,
>     code?: number | null,
>     details?: Record<string, any>[] | null
>   } | null,
>   response?: Record<string, any> | null
> }[] | null
> ```

***

### apps.releases.operations.wait

`appDistribution.apps.releases.operations.wait`

Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appDistribution.apps.releases.operations.wait({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/releases/r1a2b3/operations/op-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource to wait on. Format: `projects/<id>/apps/<id>/releases/<id>/operations/<id>`. |
| `timeout` | `string` | No | The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### apps.releases.patch

`appDistribution.apps.releases.patch`

Updates a release

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appDistribution.apps.releases.patch({ name: 'projects/demo-project/apps/1:1234567890:web:abc123/releases/r1a2b3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Optional. The list of fields to update. |
| `name` | `string` | Yes | The name of the release resource. Format: `projects/{project_number}/apps/{app}/releases/{release}` Format: `projects/<id>/apps/<id>/releases/<id>`. |
| `releaseNotes` | `object` | No | Notes that belong to a release. |
| `body_name` | `string` | No | The name of the release resource. Format: `projects/{project_number}/apps/{app}/releases/{release}` |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expireTime` | `string \| null` | No | Output only. The time the release will expire. |
| `buildVersion` | `string \| null` | No | Output only. Build version of the release. For an Android release, the build version is the `versionCode`. For an iOS release, the build version is the `CFBundleVersion`. |
| `releaseNotes` | `object \| null` | No | Notes that belong to a release. |
| `androidPackageRegistrationState` | `string \| null` | No | Output only. Registration state of the Android package (BinaryType.APK). |
| `feedbackCount` | `number \| null` | No | Output only. Number of feedback reports left by testers. |
| `openInvitationCount` | `number \| null` | No | Output only. Number of testers who were invited (incl. expired invitations), but did not (yet) accept the invitation. |
| `name` | `string \| null` | No | The name of the release resource. Format: `projects/{project_number}/apps/{app}/releases/{release}` |
| `installationCount` | `number \| null` | No | Output only. Number of testers who have downloaded this release. |
| `acceptedInvitationCount` | `number \| null` | No | Output only. Number of testers with accepted invitations. |
| `testState` | `string \| null` | No | Output only. The overall state of tests run on this release |
| `binaryDownloadUri` | `string \| null` | No | Output only. A signed link (which expires in one hour) to directly download the app binary (IPA/APK/AAB) file. |
| `firebaseConsoleUri` | `string \| null` | No | Output only. A link to the Firebase console displaying a single release. |
| `updateTime` | `string \| null` | No | Output only. The time the release was last updated. |
| `displayVersion` | `string \| null` | No | Output only. Display version of the release. For an Android release, the display version is the `versionName`. For an iOS release, the display version is the `CFBundleShortVersionString`. |
| `binaryType` | `string \| null` | No | Output only. Type of binary. |
| `testingUri` | `string \| null` | No | Output only. A link to the release in the tester web clip or Android app that lets testers (which were granted access to the app) view release notes and install the app onto their devices. |
| `createTime` | `string \| null` | No | Output only. The time the release was created. |

> [accordion] releaseNotes full type
>
> ```ts theme={null}
> {
>   text?: string | null
> } | null
> ```

***

### groups.batchJoin

`appDistribution.groups.batchJoin`

Batch adds members to a group. The testers will gain access to all releases that the groups have access to

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.appDistribution.groups.batchJoin({ group: 'projects/demo-project/groups/qa-team' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group` | `string` | Yes | Required. The name of the group resource to which testers are added. Format: `projects/{project_number}/groups/{group_alias}` Format: `projects/<id>/groups/<id>`. |
| `createMissingTesters` | `boolean` | No | Indicates whether to create tester resources based on `emails` if they don't exist yet. |
| `emails` | `string[]` | No | Required. The emails of the testers to be added to the group. A maximum of 999 and a minimum of 1 tester can be created in a batch. |

**Output:** *empty object*

***

### groups.batchLeave

`appDistribution.groups.batchLeave`

Batch removed members from a group. The testers will lose access to all releases that the groups have access to

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appDistribution.groups.batchLeave({ group: 'projects/demo-project/groups/qa-team' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group` | `string` | Yes | Required. The name of the group resource from which testers are removed. Format: `projects/{project_number}/groups/{group_alias}` Format: `projects/<id>/groups/<id>`. |
| `emails` | `string[]` | No | Required. The email addresses of the testers to be removed from the group. A maximum of 999 and a minimum of 1 testers can be removed in a batch. |

**Output:** *empty object*

***

### groups.create

`appDistribution.groups.create`

Create a group

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appDistribution.groups.create({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The name of the project resource, which is the parent of the group resource. Format: `projects/{project_number}` Format: `projects/<id>`. |
| `groupId` | `string` | No | Optional. The "alias" to use for the group, which will become the final component of the group's resource name. This value must be unique per project. The field is named `groupId` to comply with AIP guidance for user-specified IDs. This value should be 4-63 characters, and valid characters are `/a-z-/`. If not set, it will be generated based on the display name. |
| `displayName` | `string` | No | Required. The display name of the group. |
| `name` | `string` | No | The name of the group resource. Format: `projects/{project_number}/groups/{group_alias}` |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `testerCount` | `number \| null` | No | Output only. The number of testers who are members of this group. |
| `inviteLinkCount` | `number \| null` | No | Output only. The number of invite links for this group. |
| `displayName` | `string \| null` | No | Required. The display name of the group. |
| `name` | `string \| null` | No | The name of the group resource. Format: `projects/{project_number}/groups/{group_alias}` |
| `releaseCount` | `number \| null` | No | Output only. The number of releases this group is permitted to access. |

***

### groups.delete

`appDistribution.groups.delete`

Delete a group

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.appDistribution.groups.delete({ name: 'projects/demo-project/groups/qa-team' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the group resource. Format: `projects/{project_number}/groups/{group_alias}` Format: `projects/<id>/groups/<id>`. |

**Output:** *empty object*

***

### groups.get

`appDistribution.groups.get`

Get a group

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appDistribution.groups.get({ name: 'projects/demo-project/groups/qa-team' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the group resource to retrieve. Format: `projects/{project_number}/groups/{group_alias}` Format: `projects/<id>/groups/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `testerCount` | `number \| null` | No | Output only. The number of testers who are members of this group. |
| `inviteLinkCount` | `number \| null` | No | Output only. The number of invite links for this group. |
| `displayName` | `string \| null` | No | Required. The display name of the group. |
| `name` | `string \| null` | No | The name of the group resource. Format: `projects/{project_number}/groups/{group_alias}` |
| `releaseCount` | `number \| null` | No | Output only. The number of releases this group is permitted to access. |

***

### groups.list

`appDistribution.groups.list`

List groups (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appDistribution.groups.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The name of the project resource, which is the parent of the group resources. Format: `projects/{project_number}` Format: `projects/<id>`. |
| `pageToken` | `string` | No | Optional. A page token, received from a previous `ListGroups` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListGroups` must match the call that provided the page token. |
| `pageSize` | `number` | No | Optional. The maximum number of groups to return. The service may return fewer than this value. The valid range is \[1-1000]; If unspecified (0), at most 25 groups are returned. Values above 1000 are coerced to 1000. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A short-lived token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| `groups` | `object[] \| null` | No | The groups listed. |

> [accordion] groups full type
>
> ```ts theme={null}
> {
>   testerCount?: number | null,
>   inviteLinkCount?: number | null,
>   displayName?: string | null,
>   name?: string | null,
>   releaseCount?: number | null
> }[] | null
> ```

***

### groups.patch

`appDistribution.groups.patch`

Update a group

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appDistribution.groups.patch({ name: 'projects/demo-project/groups/qa-team' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the group resource. Format: `projects/{project_number}/groups/{group_alias}` Format: `projects/<id>/groups/<id>`. |
| `updateMask` | `string` | No | Optional. The list of fields to update. |
| `displayName` | `string` | No | Required. The display name of the group. |
| `body_name` | `string` | No | The name of the group resource. Format: `projects/{project_number}/groups/{group_alias}` |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `testerCount` | `number \| null` | No | Output only. The number of testers who are members of this group. |
| `inviteLinkCount` | `number \| null` | No | Output only. The number of invite links for this group. |
| `displayName` | `string \| null` | No | Required. The display name of the group. |
| `name` | `string \| null` | No | The name of the group resource. Format: `projects/{project_number}/groups/{group_alias}` |
| `releaseCount` | `number \| null` | No | Output only. The number of releases this group is permitted to access. |

***

### media.upload

`appDistribution.media.upload`

Uploads a binary. Uploading a binary can result in a new release being created, an update to an existing release, or a no-op if a release with the same binary already exists; pass `file` to upload the bytes

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appDistribution.media.upload({ app: 'projects/demo-project/apps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `app` | `string` | Yes | Required. The name of the app resource. Format: `projects/{project_number}/apps/{app}` Format: `projects/<id>/apps/<id>`. |
| `blob` | `object` | No | A reference to data stored on the filesystem, on GFS or in blobstore. |
| `file` | `string \| object \| custom` | No | The bytes to upload (a URL, `{ base64 }` or a Blob). Without it the call sends only the JSON metadata. |

> [accordion] blob full type
>
> ```ts theme={null}
> {
>   inline?: string,
>   diffUploadRequest?: {
>     objectVersion?: string,
>     checksumsInfo?: {
>       md5Hash?: string,
>       cosmoBinaryReference?: string,
>       crc32cHash?: number,
>       blobRef?: string,
>       referenceType?: PATH | BLOB_REF | INLINE | BIGSTORE_REF | COSMO_BINARY_REFERENCE,
>       objectId?: {
>         objectName?: string,
>         generation?: string | number,
>         bucketName?: string
>       },
>       path?: string,
>       length?: string | number,
>       sha1Hash?: string,
>       inline?: string,
>       blobstore2Info?: {
>         blobGeneration?: string | number,
>         blobId?: string,
>         uploadFragmentListCreationInfo?: string,
>         readToken?: string,
>         uploadMetadataContainer?: string,
>         downloadExternalReadToken?: string,
>         downloadReadHandle?: string
>       }
>     },
>     objectInfo?: {
>       md5Hash?: string,
>       cosmoBinaryReference?: string,
>       crc32cHash?: number,
>       blobRef?: string,
>       referenceType?: PATH | BLOB_REF | INLINE | BIGSTORE_REF | COSMO_BINARY_REFERENCE,
>       objectId?: {
>         objectName?: string,
>         generation?: string | number,
>         bucketName?: string
>       },
>       path?: string,
>       length?: string | number,
>       sha1Hash?: string,
>       inline?: string,
>       blobstore2Info?: {
>         blobGeneration?: string | number,
>         blobId?: string,
>         uploadFragmentListCreationInfo?: string,
>         readToken?: string,
>         uploadMetadataContainer?: string,
>         downloadExternalReadToken?: string,
>         downloadReadHandle?: string
>       }
>     }
>   },
>   timestamp?: string | number,
>   objectId?: {
>     objectName?: string,
>     generation?: string | number,
>     bucketName?: string
>   },
>   sha256Hash?: string,
>   path?: string,
>   blobstore2Info?: {
>     blobGeneration?: string | number,
>     blobId?: string,
>     uploadFragmentListCreationInfo?: string,
>     readToken?: string,
>     uploadMetadataContainer?: string,
>     downloadExternalReadToken?: string,
>     downloadReadHandle?: string
>   },
>   diffChecksumsResponse?: {
>     objectLocation?: {
>       md5Hash?: string,
>       cosmoBinaryReference?: string,
>       crc32cHash?: number,
>       blobRef?: string,
>       referenceType?: PATH | BLOB_REF | INLINE | BIGSTORE_REF | COSMO_BINARY_REFERENCE,
>       objectId?: {
>         objectName?: string,
>         generation?: string | number,
>         bucketName?: string
>       },
>       path?: string,
>       length?: string | number,
>       sha1Hash?: string,
>       inline?: string,
>       blobstore2Info?: {
>         blobGeneration?: string | number,
>         blobId?: string,
>         uploadFragmentListCreationInfo?: string,
>         readToken?: string,
>         uploadMetadataContainer?: string,
>         downloadExternalReadToken?: string,
>         downloadReadHandle?: string
>       }
>     },
>     checksumsLocation?: {
>       md5Hash?: string,
>       cosmoBinaryReference?: string,
>       crc32cHash?: number,
>       blobRef?: string,
>       referenceType?: PATH | BLOB_REF | INLINE | BIGSTORE_REF | COSMO_BINARY_REFERENCE,
>       objectId?: {
>         objectName?: string,
>         generation?: string | number,
>         bucketName?: string
>       },
>       path?: string,
>       length?: string | number,
>       sha1Hash?: string,
>       inline?: string,
>       blobstore2Info?: {
>         blobGeneration?: string | number,
>         blobId?: string,
>         uploadFragmentListCreationInfo?: string,
>         readToken?: string,
>         uploadMetadataContainer?: string,
>         downloadExternalReadToken?: string,
>         downloadReadHandle?: string
>       }
>     },
>     chunkSizeBytes?: string | number,
>     objectSizeBytes?: string | number,
>     objectVersion?: string
>   },
>   md5Hash?: string,
>   sha1Hash?: string,
>   token?: string,
>   isPotentialRetry?: boolean,
>   cosmoBinaryReference?: string,
>   length?: string | number,
>   blobRef?: string,
>   filename?: string,
>   diffDownloadResponse?: {
>     objectLocation?: {
>       md5Hash?: string,
>       cosmoBinaryReference?: string,
>       crc32cHash?: number,
>       blobRef?: string,
>       referenceType?: PATH | BLOB_REF | INLINE | BIGSTORE_REF | COSMO_BINARY_REFERENCE,
>       objectId?: {
>         objectName?: string,
>         generation?: string | number,
>         bucketName?: string
>       },
>       path?: string,
>       length?: string | number,
>       sha1Hash?: string,
>       inline?: string,
>       blobstore2Info?: {
>         blobGeneration?: string | number,
>         blobId?: string,
>         uploadFragmentListCreationInfo?: string,
>         readToken?: string,
>         uploadMetadataContainer?: string,
>         downloadExternalReadToken?: string,
>         downloadReadHandle?: string
>       }
>     }
>   },
>   contentTypeInfo?: {
>     fromUrlPath?: string,
>     fusionIdDetectionMetadata?: string,
>     bestGuess?: string,
>     fromFusionId?: string,
>     fromHeader?: string,
>     fromBytes?: string,
>     fromFileName?: string
>   },
>   contentType?: string,
>   hashVerified?: boolean,
>   bigstoreObjectRef?: string,
>   downloadParameters?: {
>     allowGzipCompression?: boolean,
>     ignoreRange?: boolean
>   },
>   sha512Hash?: string,
>   referenceType?: PATH | BLOB_REF | INLINE | GET_MEDIA | COMPOSITE_MEDIA | BIGSTORE_REF | DIFF_VERSION_RESPONSE | DIFF_CHECKSUMS_RESPONSE | DIFF_DOWNLOAD_RESPONSE | DIFF_UPLOAD_REQUEST | DIFF_UPLOAD_RESPONSE | COSMO_BINARY_REFERENCE | ARBITRARY_BYTES,
>   hash?: string,
>   mediaId?: string,
>   crc32cHash?: number,
>   diffVersionResponse?: {
>     objectVersion?: string,
>     objectSizeBytes?: string | number
>   },
>   diffUploadResponse?: {
>     objectVersion?: string,
>     originalObject?: {
>       md5Hash?: string,
>       cosmoBinaryReference?: string,
>       crc32cHash?: number,
>       blobRef?: string,
>       referenceType?: PATH | BLOB_REF | INLINE | BIGSTORE_REF | COSMO_BINARY_REFERENCE,
>       objectId?: {
>         objectName?: string,
>         generation?: string | number,
>         bucketName?: string
>       },
>       path?: string,
>       length?: string | number,
>       sha1Hash?: string,
>       inline?: string,
>       blobstore2Info?: {
>         blobGeneration?: string | number,
>         blobId?: string,
>         uploadFragmentListCreationInfo?: string,
>         readToken?: string,
>         uploadMetadataContainer?: string,
>         downloadExternalReadToken?: string,
>         downloadReadHandle?: string
>       }
>     }
>   },
>   compositeMedia?: {
>     md5Hash?: string,
>     cosmoBinaryReference?: string,
>     crc32cHash?: number,
>     blobRef?: string,
>     referenceType?: PATH | BLOB_REF | INLINE | BIGSTORE_REF | COSMO_BINARY_REFERENCE,
>     objectId?: {
>       objectName?: string,
>       generation?: string | number,
>       bucketName?: string
>     },
>     path?: string,
>     length?: string | number,
>     sha1Hash?: string,
>     inline?: string,
>     blobstore2Info?: {
>       blobGeneration?: string | number,
>       blobId?: string,
>       uploadFragmentListCreationInfo?: string,
>       readToken?: string,
>       uploadMetadataContainer?: string,
>       downloadExternalReadToken?: string,
>       downloadReadHandle?: string
>     }
>   }[],
>   algorithm?: string
> }
> ```

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   code?: number | null,
>   details?: Record<string, any>[] | null
> } | null
> ```

***

### testers.batchAdd

`appDistribution.testers.batchAdd`

Batch adds testers. This call adds testers for the specified emails if they don't already exist

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.appDistribution.testers.batchAdd({ project: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Required. The name of the project resource. Format: `projects/{project_number}` Format: `projects/<id>`. |
| `emails` | `string[]` | No | Required. The email addresses of the tester resources to create. A maximum of 999 and a minimum of 1 tester can be created in a batch. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `testers` | `object[] \| null` | No | The testers which are created and/or already exist |

> [accordion] testers full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   groups?: string[] | null,
>   name?: string | null,
>   lastActivityTime?: string | null
> }[] | null
> ```

***

### testers.batchRemove

`appDistribution.testers.batchRemove`

Batch removes testers. If found, this call deletes testers for the specified emails

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appDistribution.testers.batchRemove({ project: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Required. The name of the project resource. Format: `projects/{project_number}` Format: `projects/<id>`. |
| `emails` | `string[]` | No | Required. The email addresses of the tester resources to removed. A maximum of 999 and a minimum of 1 testers can be deleted in a batch. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `emails` | `string[] \| null` | No | List of deleted tester emails |

***

### testers.list

`appDistribution.testers.list`

Lists testers and their resource ids (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.appDistribution.testers.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | Optional. The expression to filter testers listed in the response. To learn more about filtering, refer to [Google's AIP-160 standard](http://aip.dev/160). Supported fields: - `name` - `displayName` - `groups` Example: - `name = "projects/-/testers/*@example.com"` - `displayName = "Joe Sixpack"` - `groups = "projects/*/groups/qa-team"` |
| `pageSize` | `number` | No | Optional. The maximum number of testers to return. The service may return fewer than this value. The valid range is \[1-1000]; If unspecified (0), at most 10 testers are returned. Values above 1000 are coerced to 1000. |
| `parent` | `string` | Yes | Required. The name of the project resource, which is the parent of the tester resources. Format: `projects/{project_number}` Format: `projects/<id>`. |
| `pageToken` | `string` | No | Optional. A page token, received from a previous `ListTesters` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTesters` must match the call that provided the page token. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `testers` | `object[] \| null` | No | The testers listed. |
| `nextPageToken` | `string \| null` | No | A short-lived token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |

> [accordion] testers full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   groups?: string[] | null,
>   name?: string | null,
>   lastActivityTime?: string | null
> }[] | null
> ```

***

### testers.patch

`appDistribution.testers.patch`

Update a tester. If the testers joins a group they gain access to all releases that the group has access to

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.appDistribution.testers.patch({ name: 'projects/demo-project/testers/ada@example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the tester resource. Format: `projects/{project_number}/testers/{email_address}` Format: `projects/<id>/testers/<id>`. |
| `updateMask` | `string` | No | Optional. The list of fields to update. |
| `displayName` | `string` | No | The name of the tester associated with the Google account used to accept the tester invitation. |
| `groups` | `string[]` | No | The resource names of the groups this tester belongs to. |
| `body_name` | `string` | No | The name of the tester resource. Format: `projects/{project_number}/testers/{email_address}` |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | The name of the tester associated with the Google account used to accept the tester invitation. |
| `groups` | `string[] \| null` | No | The resource names of the groups this tester belongs to. |
| `name` | `string \| null` | No | The name of the tester resource. Format: `projects/{project_number}/testers/{email_address}` |
| `lastActivityTime` | `string \| null` | No | Output only. The time the tester was last active. This is the most recent time the tester installed one of the apps. If they've never installed one or if the release no longer exists, this is the time the tester was added to the project. |

***

## Auth

### accounts.createAuthUri

`auth.accounts.createAuthUri`

If an email identifier is specified, checks and returns if any user account is registered with the email. If there is a registered account, fetches all providers associated with the account's email

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.auth.accounts.createAuthUri({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `hostedDomain` | `string` | No | Used for the Google provider. The G Suite hosted domain of the user in order to restrict sign-in to users at that domain. |
| `continueUri` | `string` | No | A valid URL for the IdP to redirect the user back to. The URL cannot contain fragments or the reserved `state` query parameter. |
| `oauthScope` | `string` | No | Additional space-delimited OAuth 2.0 scopes specifying the scope of the authentication request with the IdP. Used for OAuth 2.0 IdPs. For the Google provider, the authorization code flow will be used if this field is set. |
| `appId` | `string` | No | — |
| `tenantId` | `string` | No | The ID of the Identity Platform tenant to create an authorization URI or lookup an email identifier for. If not set, the operation will be performed in the default Identity Platform instance in the project. |
| `otaApp` | `string` | No | — |
| `authFlowType` | `string` | No | Used for the Google provider. The type of the authentication flow to be used. If present, this should be `CODE_FLOW` to specify the authorization code flow. Otherwise, the default ID Token flow will be used. |
| `sessionId` | `string` | No | A session ID that can be verified against in SignInWithIdp to prevent session fixation attacks. If absent, a random string will be generated and returned as the session ID. |
| `oauthConsumerKey` | `string` | No | — |
| `providerId` | `string` | No | The provider ID of the IdP for the user to sign in with. This should be a provider ID enabled for sign-in, which is either from the list of [default supported IdPs](https://cloud.google.com/identity-platform/docs/reference/rest/v2/defaultSupportedIdps/list), or of the format `oidc.*` or `saml.*`. Some examples are `google.com`, `facebook.com`, `oidc.testapp`, and `saml.testapp`. At least one of the fields `identifier` and `provider_id` must be set. |
| `context` | `string` | No | An opaque string used to maintain contextual information between the authentication request and the callback from the IdP. |
| `identifier` | `string` | No | The email identifier of the user account to fetch associated providers for. At least one of the fields `identifier` and `provider_id` must be set. The length of the email address should be less than 256 characters and in the format of `name@domain.tld`. The email address should also match the [RFC 822](https://tools.ietf.org/html/rfc822) addr-spec production. |
| `openidRealm` | `string` | No | — |
| `customParameter` | `Record<string, string>` | No | Additional customized query parameters to be added to the authorization URI. The following parameters are reserved and cannot be added: `client_id`, `response_type`, `scope`, `redirect_uri`, `state`. For the Microsoft provider, the Azure AD tenant to sign-in to can be specified in the `tenant` custom parameter. |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `providerId` | `string \| null` | No | The provider ID from the request, if provided. |
| `allProviders` | `string[] \| null` | No | — |
| `forExistingProvider` | `boolean \| null` | No | Whether the user has previously signed in with the provider ID in the request. Present only when a registered email identifier is set in the request. |
| `authUri` | `string \| null` | No | The authorization URI for the requested provider. Present only when a provider ID is set in the request. |
| `registered` | `boolean \| null` | No | Whether the email identifier represents an existing account. Present only when an email identifier is set in the request. |
| `signinMethods` | `string[] \| null` | No | The list of sign-in methods that the user has previously used. Each element is one of `password`, `emailLink`, or the provider ID of an IdP. Present only when a registered email identifier is set in the request. If [email enumeration protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled, this method returns an empty list. |
| `captchaRequired` | `boolean \| null` | No | Whether a CAPTCHA is needed because there have been too many failed login attempts by the user. Present only when a registered email identifier is set in the request. |
| `sessionId` | `string \| null` | No | The session ID from the request, or a random string generated by CreateAuthUri if absent. It is used to prevent session fixation attacks. |
| `kind` | `string \| null` | No | — |

***

### accounts.delete

`auth.accounts.delete`

Deletes a user's account

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.auth.accounts.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `delegatedProjectNumber` | `string \| number` | No | — |
| `targetProjectId` | `string` | No | The ID of the project which the account belongs to. Should only be specified in authenticated requests that specify local\_id of an account. |
| `idToken` | `string` | No | The Identity Platform ID token of the account to delete. Require to be specified for requests from end users that lack Google OAuth 2.0 credential. Authenticated requests bearing a Google OAuth2 credential with proper permissions may pass local\_id to specify the account to delete alternatively. |
| `tenantId` | `string` | No | The ID of the tenant that the account belongs to, if applicable. Only require to be specified for authenticated requests bearing a Google OAuth 2.0 credential that specify local\_id of an account that belongs to an Identity Platform tenant. |
| `localId` | `string` | No | The ID of user account to delete. Specifying this field requires a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). Requests from users lacking the credential should pass an ID token instead. |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | — |

***

### accounts.issueSamlResponse

`auth.accounts.issueSamlResponse`

Experimental

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.auth.accounts.issueSamlResponse({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `idToken` | `string` | No | The Identity Platform ID token. It will be verified and then converted to a new SAMLResponse. |
| `samlAppEntityId` | `string` | No | SAML app entity id specified in Google Admin Console for each app. If developers want to redirect to a third-party app rather than a G Suite app, they'll probably they need this. When it's used, we'll return a RelayState. This includes a SAMLRequest, which can be used to trigger a SP-initiated SAML flow to redirect to the real app. |
| `rpId` | `string` | No | Relying Party identifier, which is the audience of issued SAMLResponse. |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `firstName` | `string \| null` | No | First name of the user. |
| `samlResponse` | `string \| null` | No | Signed SAMLResponse created for the Relying Party. |
| `lastName` | `string \| null` | No | Last name of the user. |
| `email` | `string \| null` | No | Email of the user. |
| `relayState` | `string \| null` | No | Generated RelayState. |
| `isNewUser` | `boolean \| null` | No | Whether the logged in user was created by this request. |
| `acsEndpoint` | `string \| null` | No | The ACS endpoint which consumes the returned SAMLResponse. |

***

### accounts.lookup

`auth.accounts.lookup`

Gets account information for all matched accounts. For an end user request, retrieves the account of the end user

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.auth.accounts.lookup({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `phoneNumber` | `string[]` | No | The phone number of one or more accounts to fetch. Should only be specified by authenticated requests from a developer and should be in E.164 format, for example, +15555555555. |
| `tenantId` | `string` | No | The ID of the tenant that the account belongs to. Should only be specified by authenticated requests from a developer. |
| `initialEmail` | `string[]` | No | The initial email of one or more accounts to fetch. The length of email should be less than 256 characters and in the format of `name@domain.tld`. The email should also match the [RFC 822](https://tools.ietf.org/html/rfc822) addr-spec production. Should only be specified by authenticated requests from a developer. |
| `targetProjectId` | `string` | No | The ID of the Google Cloud project that the account or the Identity Platform tenant specified by `tenant_id` belongs to. Should only be specified by authenticated requests bearing a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `email` | `string[]` | No | The email address of one or more accounts to fetch. The length of email should be less than 256 characters and in the format of `name@domain.tld`. The email should also match the [RFC 822](https://tools.ietf.org/html/rfc822) addr-spec production. Should only be specified by authenticated requests from a developer. |
| `delegatedProjectNumber` | `string \| number` | No | — |
| `localId` | `string[]` | No | The ID of one or more accounts to fetch. Should only be specified by authenticated requests bearing a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `idToken` | `string` | No | The Identity Platform ID token of the account to fetch. Require to be specified for requests from end users. |
| `federatedUserId` | `object[]` | No | The federated user identifier of one or more accounts to fetch. Should only be specified by authenticated requests bearing a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |

> [accordion] federatedUserId full type
>
> ```ts theme={null}
> {
>   rawId?: string,
>   providerId?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | — |
| `users` | `object[] \| null` | No | The information of specific user account(s) matching the parameters in the request. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   screenName?: string | null,
>   passwordUpdatedAt?: number | null,
>   dateOfBirth?: string | null,
>   salt?: string | null,
>   phoneNumber?: string | null,
>   photoUrl?: string | null,
>   mfaInfo?: {
>     displayName?: string | null,
>     phoneInfo?: string | null,
>     emailInfo?: {
>       emailAddress?: string | null
>     } | null,
>     totpInfo?: {
>     } | null,
>     unobfuscatedPhoneInfo?: string | null,
>     enrolledAt?: string | null,
>     mfaEnrollmentId?: string | null
>   }[] | null,
>   emailVerified?: boolean | null,
>   localId?: string | null,
>   email?: string | null,
>   rawPassword?: string | null,
>   customAttributes?: string | null,
>   lastLoginAt?: string | number | null,
>   tenantId?: string | null,
>   displayName?: string | null,
>   initialEmail?: string | null,
>   timeZone?: string | null,
>   language?: string | null,
>   createdAt?: string | number | null,
>   version?: number | null,
>   lastRefreshAt?: string | null,
>   emailLinkSignin?: boolean | null,
>   validSince?: string | number | null,
>   customAuth?: boolean | null,
>   providerUserInfo?: {
>     providerId?: string | null,
>     phoneNumber?: string | null,
>     email?: string | null,
>     federatedId?: string | null,
>     rawId?: string | null,
>     screenName?: string | null,
>     photoUrl?: string | null,
>     displayName?: string | null
>   }[] | null,
>   disabled?: boolean | null,
>   passwordHash?: string | null
> }[] | null
> ```

***

### accounts.resetPassword

`auth.accounts.resetPassword`

Resets the password of an account either using an out-of-band code generated by sendOobCode or by specifying the email and password of the account to be modified. Can also check the purpose of an out-of-band code without consuming it

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.auth.accounts.resetPassword({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `oobCode` | `string` | No | An out-of-band (OOB) code generated by GetOobCode request. Specify only this parameter (or only this parameter and a tenant ID) to get the out-of-band code's type in the response without mutating the account's state. Only a PASSWORD\_RESET out-of-band code can be consumed via this method. |
| `newPassword` | `string` | No | The new password to be set for this account. Specifying this field will result in a change to the account and consume the out-of-band code if one was specified and it was of type PASSWORD\_RESET. |
| `oldPassword` | `string` | No | The current password of the account to be modified. Specify this and email to change an account's password without using an out-of-band code. |
| `email` | `string` | No | Optional. The email of the account to be modified. Specify this and the old password in order to change an account's password without using an out-of-band code. |
| `tenantId` | `string` | No | Optional. The tenant ID of the Identity Platform tenant the account belongs to. |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `requestType` | `string \| null` | No | — |
| `kind` | `string \| null` | No | — |
| `mfaInfo` | `object \| null` | No | Information on which multi-factor authentication (MFA) providers are enabled for an account. |
| `email` | `string \| null` | No | The email associated with the out-of-band code that was used. |
| `newEmail` | `string \| null` | No | — |

> [accordion] mfaInfo full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   phoneInfo?: string | null,
>   emailInfo?: {
>     emailAddress?: string | null
>   } | null,
>   totpInfo?: {
>   } | null,
>   unobfuscatedPhoneInfo?: string | null,
>   enrolledAt?: string | null,
>   mfaEnrollmentId?: string | null
> } | null
> ```

***

### accounts.sendOobCode

`auth.accounts.sendOobCode`

Sends an out-of-band confirmation code for an account. Requests from a authenticated request can optionally return a link including the OOB code instead of sending it

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.auth.accounts.sendOobCode({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `captchaResp` | `string` | No | For a PASSWORD\_RESET request, a reCaptcha response is required when the system detects possible abuse activity. In those cases, this is the response from the reCaptcha challenge used to verify the caller. |
| `email` | `string` | No | The account's email address to send the OOB code to, and generally the email address of the account that needs to be updated. Required for PASSWORD\_RESET, EMAIL\_SIGNIN, and VERIFY\_EMAIL. Only required for VERIFY\_AND\_CHANGE\_EMAIL requests when return\_oob\_link is set to true. In this case, it is the original email of the user. |
| `clientType` | `CLIENT_TYPE_UNSPECIFIED \| CLIENT_TYPE_WEB \| CLIENT_TYPE_ANDROID \| CLIENT_TYPE_IOS` | No | The client type: web, Android or iOS. Required when reCAPTCHA Enterprise protection is enabled. |
| `targetProjectId` | `string` | No | The Project ID of the Identity Platform project which the account belongs to. To specify this field, it requires a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `continueUrl` | `string` | No | The Url to continue after user clicks the link sent in email. This is the url that will allow the web widget to handle the OOB code. |
| `tenantId` | `string` | No | The tenant ID of the Identity Platform tenant the account belongs to. |
| `androidMinimumVersion` | `string` | No | If an associated android app can handle the OOB code, the minimum version of the app. If the version on the device is lower than this version then the user is taken to Google Play Store to upgrade the app. |
| `dynamicLinkDomain` | `string` | No | In order to ensure that the url used can be easily opened up in iOS or android, we create a [Firebase Dynamic Link](https://firebase.google.com/docs/dynamic-links). Most Identity Platform projects will only have one Dynamic Link domain enabled, and can leave this field blank. This field contains a specified Dynamic Link domain for projects that have multiple enabled. |
| `idToken` | `string` | No | An ID token for the account. It is required for VERIFY\_AND\_CHANGE\_EMAIL and VERIFY\_EMAIL requests unless return\_oob\_link is set to true. |
| `challenge` | `string` | No | — |
| `requestType` | `OOB_REQ_TYPE_UNSPECIFIED \| PASSWORD_RESET \| OLD_EMAIL_AGREE \| NEW_EMAIL_ACCEPT \| VERIFY_EMAIL \| RECOVER_EMAIL \| EMAIL_SIGNIN \| VERIFY_AND_CHANGE_EMAIL \| REVERT_SECOND_FACTOR_ADDITION` | No | Required. The type of out-of-band (OOB) code to send. Depending on this value, other fields in this request will be required and/or have different meanings. There are 4 different OOB codes that can be sent: \* PASSWORD\_RESET \* EMAIL\_SIGNIN \* VERIFY\_EMAIL \* VERIFY\_AND\_CHANGE\_EMAIL |
| `canHandleCodeInApp` | `boolean` | No | When set to true, the OOB code link will be be sent as a Universal Link or an Android App Link and will be opened by the corresponding app if installed. If not set, or set to false, the OOB code will be sent to the web widget first and then on continue will redirect to the app if installed. |
| `newEmail` | `string` | No | The email address the account is being updated to. Required only for VERIFY\_AND\_CHANGE\_EMAIL requests. |
| `iOSBundleId` | `string` | No | If an associated iOS app can handle the OOB code, the iOS bundle id of this app. This will allow the correct app to open if it is already installed. |
| `iOSAppStoreId` | `string` | No | If an associated iOS app can handle the OOB code, the App Store id of this app. This will allow App Store to open to the correct app if the app is not yet installed. |
| `recaptchaVersion` | `RECAPTCHA_VERSION_UNSPECIFIED \| RECAPTCHA_ENTERPRISE` | No | The reCAPTCHA version of the reCAPTCHA token in the captcha\_response. |
| `androidPackageName` | `string` | No | If an associated android app can handle the OOB code, the Android package name of the android app that will handle the callback when this OOB code is used. This will allow the correct app to open if it is already installed, or allow Google Play Store to open to the correct app if it is not yet installed. |
| `userIp` | `string` | No | The IP address of the caller. Required only for PASSWORD\_RESET requests. |
| `linkDomain` | `string` | No | Optional. In order to ensure that the url used can be easily opened in iOS or Android, we create a Hosting link '/\_\_/auth/links'. This optional field contains the domain to use when constructing a Hosting link. If not set, '.firebaseapp.com' domain will be used. |
| `androidInstallApp` | `boolean` | No | If an associated android app can handle the OOB code, whether or not to install the android app on the device where the link is opened if the app is not already installed. |
| `returnOobLink` | `boolean` | No | Whether the confirmation link containing the OOB code should be returned in the response (no email is sent). Used when a developer wants to construct the email template and send it on their own. By default this is false; to specify this field, and to set it to true, it requires a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control) |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | — |
| `email` | `string \| null` | No | If return\_oob\_link is false in the request, the email address the verification was sent to. |
| `oobLink` | `string \| null` | No | If return\_oob\_link is true in the request, the OOB link to be sent to the user. This returns the constructed link including [Firebase Dynamic Link](https://firebase.google.com/docs/dynamic-links) related parameters. |
| `oobCode` | `string \| null` | No | If return\_oob\_link is true in the request, the OOB code to send. |

***

### accounts.sendVerificationCode

`auth.accounts.sendVerificationCode`

Sends a SMS verification code for phone number sign-in. To localize the text of the SMS sent to the user, set the HTTP header `X-Firebase-Locale` to the language code that corresponds with the user's locale

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.auth.accounts.sendVerificationCode({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `recaptchaVersion` | `RECAPTCHA_VERSION_UNSPECIFIED \| RECAPTCHA_ENTERPRISE` | No | Optional. The reCAPTCHA version of the reCAPTCHA token in the captcha\_response. Required when reCAPTCHA Enterprise is enabled. |
| `playIntegrityToken` | `string` | No | Android only. Used to assert application identity in place of a recaptcha token (and safety\_net\_token). At least one of (`ios_receipt` and `ios_secret`), `recaptcha_token`, , or `play_integrity_token` must be specified to verify the verification code is being sent on behalf of a real app and not an emulator, if 'captcha\_response' is not used (reCAPTCHA enterprise is not enabled). A Play Integrity Token can be generated via the [PlayIntegrity API](https://developer.android.com/google/play/integrity) with applying SHA256 to the `phone_number` field as the nonce. |
| `autoRetrievalInfo` | `object` | No | The information required to auto-retrieve an SMS. |
| `captchaResponse` | `string` | No | Optional. The reCAPTCHA Enterprise token provided by the reCAPTCHA client-side integration. Required when reCAPTCHA enterprise is enabled. |
| `recaptchaToken` | `string` | No | Recaptcha token for app verification. At least one of (`ios_receipt` and `ios_secret`), `recaptcha_token`, or `play_integrity_token` must be specified to verify the verification code is being sent on behalf of a real app and not an emulator, if 'captcha\_response' is not used (reCAPTCHA enterprise is not enabled). The recaptcha should be generated by calling getRecaptchaParams and the recaptcha token will be generated on user completion of the recaptcha challenge. |
| `phoneNumber` | `string` | No | The phone number to send the verification code to in E.164 format. |
| `iosReceipt` | `string` | No | Receipt of successful iOS app token validation. At least one of (`ios_receipt` and `ios_secret`), `recaptcha_token`, or `play_integrity_token` must be specified to verify the verification code is being sent on behalf of a real app and not an emulator, if 'captcha\_response' is not used (reCAPTCHA enterprise is not enabled). This should come from the response of verifyIosClient. If present, the caller should also provide the `ios_secret`, as well as a bundle ID in the `x-ios-bundle-identifier` header, which must match the bundle ID from the verifyIosClient request. |
| `clientType` | `CLIENT_TYPE_UNSPECIFIED \| CLIENT_TYPE_WEB \| CLIENT_TYPE_ANDROID \| CLIENT_TYPE_IOS` | No | Optional. The client type, web, android or ios. Required when reCAPTCHA Enterprise is enabled. |
| `safetyNetToken` | `string` | No | Android only. Safety Net has been deprecated. Use play\_integrity\_token instead. |
| `tenantId` | `string` | No | Tenant ID of the Identity Platform tenant the user is signing in to. |
| `iosSecret` | `string` | No | Secret delivered to iOS app as a push notification. Should be passed with an `ios_receipt` as well as the `x-ios-bundle-identifier` header. |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |
| `iosBundleId` | `string` | No | The iOS app's bundle id (X-Ios-Bundle-Identifier); needed when verifying with an iOS receipt. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `sessionInfo` | `string \| null` | No | Encrypted session information. This can be used in signInWithPhoneNumber to authenticate the phone number. |

***

### accounts.signInWithCustomToken

`auth.accounts.signInWithCustomToken`

Signs in or signs up a user by exchanging a custom Auth token. Upon a successful sign-in or sign-up, a new Identity Platform ID token and refresh token are issued for the user

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.auth.accounts.signInWithCustomToken({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `tenantId` | `string` | No | The ID of the Identity Platform tenant the user is signing in to. If present, the ID should match the tenant\_id in the token. |
| `returnSecureToken` | `boolean` | No | Should always be true. |
| `instanceId` | `string` | No | — |
| `delegatedProjectNumber` | `string \| number` | No | — |
| `token` | `string` | No | Required. The custom Auth token asserted by the developer. The token should be a [JSON Web Token (JWT)](https://tools.ietf.org/html/rfc7519) that includes the claims listed in the [API reference](https://cloud.google.com/identity-platform/docs/reference/rest/client/) under the "Custom Token Claims" section. |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expiresIn` | `string \| number \| null` | No | The number of seconds until the ID token expires. |
| `isNewUser` | `boolean \| null` | No | Whether the authenticated user was created by this request. |
| `idToken` | `string \| null` | No | An Identity Platform ID token for the authenticated user. |
| `kind` | `string \| null` | No | — |
| `refreshToken` | `string \| null` | No | An Identity Platform refresh token for the authenticated user. |

***

### accounts.signInWithEmailLink

`auth.accounts.signInWithEmailLink`

Signs in or signs up a user with a out-of-band code from an email link. If a user does not exist with the given email address, a user record will be created

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.auth.accounts.signInWithEmailLink({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | No | Required. The email address the sign-in link was sent to. The length of email should be less than 256 characters and in the format of `name@domain.tld`. The email should also match the [RFC 822](https://tools.ietf.org/html/rfc822) addr-spec production. |
| `oobCode` | `string` | No | Required. The out-of-band code from the email link. |
| `tenantId` | `string` | No | The ID of the Identity Platform tenant the user is signing in to. If not set, the user will sign in to the default Identity Platform project. |
| `idToken` | `string` | No | A valid ID token for an Identity Platform account. If passed, this request will link the email address to the user represented by this ID token and enable sign-in with email link on the account for the future. |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `mfaInfo` | `object[] \| null` | No | Info on which multi-factor authentication providers are enabled. Present if the user needs to complete the sign-in using multi-factor authentication. |
| `refreshToken` | `string \| null` | No | Refresh token for the authenticated user. |
| `mfaPendingCredential` | `string \| null` | No | An opaque string that functions as proof that the user has successfully passed the first factor check. |
| `localId` | `string \| null` | No | The ID of the authenticated user. Always present in the response. |
| `email` | `string \| null` | No | The email the user signed in with. Always present in the response. |
| `idToken` | `string \| null` | No | An Identity Platform ID token for the authenticated user. |
| `kind` | `string \| null` | No | — |
| `expiresIn` | `string \| number \| null` | No | The number of seconds until the ID token expires. |
| `isNewUser` | `boolean \| null` | No | Whether the authenticated user was created by this request. |

> [accordion] mfaInfo full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   phoneInfo?: string | null,
>   emailInfo?: {
>     emailAddress?: string | null
>   } | null,
>   totpInfo?: {
>   } | null,
>   unobfuscatedPhoneInfo?: string | null,
>   enrolledAt?: string | null,
>   mfaEnrollmentId?: string | null
> }[] | null
> ```

***

### accounts.signInWithGameCenter

`auth.accounts.signInWithGameCenter`

Signs in or signs up a user with iOS Game Center credentials. If the sign-in succeeds, a new Identity Platform ID token and refresh token are issued for the authenticated user

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.auth.accounts.signInWithGameCenter({ iosBundleId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `salt` | `string` | No | Required. A random string used to generate the given signature. |
| `timestamp` | `string \| number` | No | Required. The time when the signature was created by Apple, in milliseconds since the epoch. |
| `tenantId` | `string` | No | The ID of the Identity Platform tenant the user is signing in to. |
| `signature` | `string` | No | Required. The verification signature data generated by Apple. |
| `publicKeyUrl` | `string` | No | Required. The URL to fetch the Apple public key in order to verify the given signature is signed by Apple. |
| `idToken` | `string` | No | A valid ID token for an Identity Platform account. If present, this request will link the Game Center player ID to the account represented by this ID token. |
| `playerId` | `string` | No | Required. The user's Game Center player ID. Deprecated by Apple. Pass `playerID` along with `gamePlayerID` and `teamPlayerID` to initiate the migration of a user's Game Center player ID to `gamePlayerID`. |
| `gamePlayerId` | `string` | No | The user's Game Center game player ID. A unique identifier for a player of the game. [https://developer.apple.com/documentation/gamekit/gkplayer/3113960-gameplayerid](https://developer.apple.com/documentation/gamekit/gkplayer/3113960-gameplayerid) |
| `displayName` | `string` | No | The user's Game Center display name. |
| `teamPlayerId` | `string` | No | The user's Game Center team player ID. A unique identifier for a player of all the games that you distribute using your developer account. [https://developer.apple.com/documentation/gamekit/gkplayer/3174857-teamplayerid](https://developer.apple.com/documentation/gamekit/gkplayer/3174857-teamplayerid) |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |
| `iosBundleId` | `string` | Yes | The iOS app's bundle id (X-Ios-Bundle-Identifier). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `teamPlayerId` | `string \| null` | No | The user's Game Center team player ID. A unique identifier for a player of all the games that you distribute using your developer account. [https://developer.apple.com/documentation/gamekit/gkplayer/3174857-teamplayerid](https://developer.apple.com/documentation/gamekit/gkplayer/3174857-teamplayerid) |
| `expiresIn` | `string \| number \| null` | No | The number of seconds until the ID token expires. |
| `isNewUser` | `boolean \| null` | No | Whether the logged in user was created by this request. |
| `gamePlayerId` | `string \| null` | No | The user's Game Center game player ID. A unique identifier for a player of the game. [https://developer.apple.com/documentation/gamekit/gkplayer/3113960-gameplayerid](https://developer.apple.com/documentation/gamekit/gkplayer/3113960-gameplayerid) |
| `playerId` | `string \| null` | No | The user's Game Center player ID. Pass `playerID` along with `gamePlayerID` and `teamPlayerID` to initiate the migration of a user's Game Center player ID to `gamePlayerID`. |
| `localId` | `string \| null` | No | The ID of the authenticated user. Always present in the response. |
| `idToken` | `string \| null` | No | An Identity Platform ID token for the authenticated user. |
| `displayName` | `string \| null` | No | Display name of the authenticated user. |
| `refreshToken` | `string \| null` | No | An Identity Platform refresh token for the authenticated user. |

***

### accounts.signInWithIdp

`auth.accounts.signInWithIdp`

Signs in or signs up a user using credentials from an Identity Provider (IdP). This is done by manually providing an IdP credential, or by providing the authorization response obtained via the authorization request from CreateAuthUri

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.auth.accounts.signInWithIdp({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `idToken` | `string` | No | A valid Identity Platform ID token. If passed, the user's account at the IdP will be linked to the account represented by this ID token. |
| `sessionId` | `string` | No | The session ID returned from a previous CreateAuthUri call. This field is verified against that session ID to prevent session fixation attacks. Required if the user is signing in with an authorization response from a previous CreateAuthUri authorization request. |
| `delegatedProjectNumber` | `string \| number` | No | — |
| `requestUri` | `string` | No | Required. The URL to which the IdP redirects the user back. This can be set to `http://localhost` if the user is signing in with a manually provided IdP credential. |
| `autoCreate` | `boolean` | No | — |
| `postBody` | `string` | No | If the user is signing in with an authorization response obtained via a previous CreateAuthUri authorization request, this is the body of the HTTP POST callback from the IdP, if present. Otherwise, if the user is signing in with a manually provided IdP credential, this should be a URL-encoded form that contains the credential (e.g. an ID token or access token for OAuth 2.0 IdPs) and the provider ID of the IdP that issued the credential. |
| `tenantId` | `string` | No | The ID of the Identity Platform tenant the user is signing in to. If not set, the user will sign in to the default Identity Platform project. |
| `returnSecureToken` | `boolean` | No | Should always be true. |
| `returnIdpCredential` | `boolean` | No | Whether or not to return OAuth credentials from the IdP on the following errors: `FEDERATED_USER_ID_ALREADY_LINKED` and `EMAIL_EXISTS`. |
| `pendingToken` | `string` | No | An opaque string from a previous SignInWithIdp response. If set, it can be used to repeat the sign-in operation from the previous SignInWithIdp operation. This may be present if the user needs to confirm their account information as part of a previous federated login attempt, or perform account linking. |
| `returnRefreshToken` | `boolean` | No | Whether or not to return the OAuth refresh token from the IdP, if available. |
| `pendingIdToken` | `string` | No | — |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string \| null` | No | The email address of the user's account at the IdP. |
| `displayName` | `string \| null` | No | The display name for the user's account at the IdP. |
| `providerId` | `string \| null` | No | The provider ID of the IdP that the user is signing in to. Always present in the response. |
| `rawUserInfo` | `string \| null` | No | The stringified JSON response containing all the data corresponding to the user's account at the IdP. |
| `localId` | `string \| null` | No | The ID of the authenticated Identity Platform user. Always present in the response. |
| `fullName` | `string \| null` | No | The full name for the user's account at the IdP. |
| `tenantId` | `string \| null` | No | The value of the `tenant_id` field in the request. |
| `screenName` | `string \| null` | No | The screen name for the user's account at the Twitter IdP or the login name for the user's account at the GitHub IdP. |
| `lastName` | `string \| null` | No | The last name for the user's account at the IdP. |
| `inputEmail` | `string \| null` | No | — |
| `kind` | `string \| null` | No | — |
| `mfaInfo` | `object[] \| null` | No | Info on which multi-factor authentication providers are enabled for the account. Present if the user needs to complete the sign-in using multi-factor authentication. |
| `context` | `string \| null` | No | The opaque string set in CreateAuthUri that is used to maintain contextual information between the authentication request and the callback from the IdP. |
| `oauthRefreshToken` | `string \| null` | No | The OAuth 2.0 refresh token from the IdP, if available and `return_refresh_token` is set to `true`. |
| `photoUrl` | `string \| null` | No | The URL of the user's profile picture at the IdP. |
| `oauthAccessToken` | `string \| null` | No | The OAuth access token from the IdP, if available. |
| `originalEmail` | `string \| null` | No | The main (top-level) email address of the user's Identity Platform account, if different from the email address at the IdP. Only present if the "One account per email address" setting is enabled. |
| `oauthExpireIn` | `number \| null` | No | The number of seconds until the OAuth access token from the IdP expires. |
| `refreshToken` | `string \| null` | No | An Identity Platform refresh token for the authenticated user. |
| `mfaPendingCredential` | `string \| null` | No | An opaque string that functions as proof that the user has successfully passed the first factor authentication. |
| `emailVerified` | `boolean \| null` | No | Whether the user account's email address is verified. |
| `dateOfBirth` | `string \| null` | No | The date of birth for the user's account at the IdP. |
| `nickName` | `string \| null` | No | The nickname for the user's account at the IdP. |
| `federatedId` | `string \| null` | No | The user's account ID at the IdP. Always present in the response. |
| `oauthAuthorizationCode` | `string \| null` | No | The OAuth 2.0 authorization code, if available. Only present for the Google provider. |
| `needEmail` | `boolean \| null` | No | — |
| `oauthIdToken` | `string \| null` | No | The OpenID Connect ID token from the IdP, if available. |
| `pendingToken` | `string \| null` | No | An opaque string that can be used as a credential from the IdP the user is signing into. The pending token obtained here can be set in a future SignInWithIdp request to sign the same user in with the IdP again. |
| `language` | `string \| null` | No | The language preference for the user's account at the IdP. |
| `timeZone` | `string \| null` | No | The time zone for the user's account at the IdP. |
| `emailRecycled` | `boolean \| null` | No | Whether or not there is an existing Identity Platform user account with the same email address but linked to a different account at the same IdP. Only present if the "One account per email address" setting is enabled and the email address at the IdP is verified. |
| `errorMessage` | `string \| null` | No | The error message returned if `return_idp_credential` is set to `true` and either the `FEDERATED_USER_ID_ALREADY_LINKED` or `EMAIL_EXISTS` error is encountered. This field's value is either `FEDERATED_USER_ID_ALREADY_LINKED` or `EMAIL_EXISTS`. |
| `expiresIn` | `string \| number \| null` | No | The number of seconds until the Identity Platform ID token expires. |
| `isNewUser` | `boolean \| null` | No | Whether or not a new Identity Platform account was created for the authenticated user. |
| `needConfirmation` | `boolean \| null` | No | Whether or not there is an existing Identity Platform user account with the same email address as the current account signed in at the IdP, and the account's email address is not verified at the IdP. The user will need to sign in to the existing Identity Platform account and then link the current credential from the IdP to it. Only present if the "One account per email address" setting is enabled. |
| `idToken` | `string \| null` | No | An Identity Platform ID token for the authenticated user. |
| `verifiedProvider` | `string[] \| null` | No | A list of provider IDs that the user can sign in to in order to resolve a `need_confirmation` error. Only present if `need_confirmation` is set to `true`. |
| `firstName` | `string \| null` | No | The first name for the user's account at the IdP. |
| `oauthTokenSecret` | `string \| null` | No | The OAuth 1.0 token secret from the IdP, if available. Only present for the Twitter provider. |

> [accordion] mfaInfo full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   phoneInfo?: string | null,
>   emailInfo?: {
>     emailAddress?: string | null
>   } | null,
>   totpInfo?: {
>   } | null,
>   unobfuscatedPhoneInfo?: string | null,
>   enrolledAt?: string | null,
>   mfaEnrollmentId?: string | null
> }[] | null
> ```

***

### accounts.signInWithPassword

`auth.accounts.signInWithPassword`

Signs in a user with email and password. If the sign-in succeeds, a new Identity Platform ID token and refresh token are issued for the authenticated user

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.auth.accounts.signInWithPassword({
	apiKey: 'AIzaSyExampleWebApiKey',
	email: 'ada@example.com',
	password: 'correct-horse-battery-staple',
	returnSecureToken: true,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `idToken` | `string` | No | — |
| `captchaChallenge` | `string` | No | — |
| `captchaResponse` | `string` | No | The reCAPTCHA token provided by the reCAPTCHA client-side integration. reCAPTCHA Enterprise uses it for risk assessment. Required when reCAPTCHA Enterprise is enabled. |
| `delegatedProjectNumber` | `string \| number` | No | — |
| `recaptchaVersion` | `RECAPTCHA_VERSION_UNSPECIFIED \| RECAPTCHA_ENTERPRISE` | No | The reCAPTCHA version of the reCAPTCHA token in the captcha\_response. |
| `instanceId` | `string` | No | — |
| `clientType` | `CLIENT_TYPE_UNSPECIFIED \| CLIENT_TYPE_WEB \| CLIENT_TYPE_ANDROID \| CLIENT_TYPE_IOS` | No | The client type, web, android or ios. Required when reCAPTCHA Enterprise is enabled. |
| `email` | `string` | No | Required. The email the user is signing in with. The length of email should be less than 256 characters and in the format of `name@domain.tld`. The email should also match the [RFC 822](https://tools.ietf.org/html/rfc822) addr-spec production. |
| `returnSecureToken` | `boolean` | No | Should always be true. |
| `tenantId` | `string` | No | The ID of the Identity Platform tenant the user is signing in to. If not set, the user will sign in to the default Identity Platform instance in the project. |
| `password` | `string` | No | Required. The password the user provides to sign in to the account. |
| `pendingIdToken` | `string` | No | — |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | The user's display name stored in the account's attributes. |
| `userNotifications` | `object[] \| null` | No | Warning notifications for the user. |
| `mfaInfo` | `object[] \| null` | No | Info on which multi-factor authentication providers are enabled for the account. Present if the user needs to complete the sign-in using multi-factor authentication. |
| `registered` | `boolean \| null` | No | Whether the email is for an existing account. Always true. |
| `email` | `string \| null` | No | The email of the authenticated user. Always present in the response. |
| `refreshToken` | `string \| null` | No | An Identity Platform refresh token for the authenticated user. |
| `oauthExpireIn` | `number \| null` | No | The access token expiration time in seconds. |
| `expiresIn` | `string \| number \| null` | No | The number of seconds until the Identity Platform ID token expires. |
| `oauthAuthorizationCode` | `string \| null` | No | — |
| `idToken` | `string \| null` | No | An Identity Platform ID token for the authenticated user. |
| `profilePicture` | `string \| null` | No | The user's profile picture stored in the account's attributes. |
| `kind` | `string \| null` | No | — |
| `mfaPendingCredential` | `string \| null` | No | An opaque string that functions as proof that the user has successfully passed the first factor authentication. |
| `localId` | `string \| null` | No | The ID of the authenticated user. Always present in the response. |
| `oauthAccessToken` | `string \| null` | No | The OAuth2 access token. |

> [accordion] userNotifications full type
>
> ```ts theme={null}
> {
>   notificationCode?: string | null,
>   notificationMessage?: string | null
> }[] | null
> ```

> [accordion] mfaInfo full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   phoneInfo?: string | null,
>   emailInfo?: {
>     emailAddress?: string | null
>   } | null,
>   totpInfo?: {
>   } | null,
>   unobfuscatedPhoneInfo?: string | null,
>   enrolledAt?: string | null,
>   mfaEnrollmentId?: string | null
> }[] | null
> ```

***

### accounts.signInWithPhoneNumber

`auth.accounts.signInWithPhoneNumber`

Completes a phone number authentication attempt. If a user already exists with the given phone number, an ID token is minted for that user

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.auth.accounts.signInWithPhoneNumber({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sessionInfo` | `string` | No | Encrypted session information from the response of sendVerificationCode. In the case of authenticating with an SMS code this must be specified, but in the case of using a temporary proof it can be unspecified. |
| `verificationProof` | `string` | No | Do not use. |
| `operation` | `VERIFY_OP_UNSPECIFIED \| SIGN_UP_OR_IN \| REAUTH \| UPDATE \| LINK` | No | — |
| `phoneNumber` | `string` | No | The user's phone number to sign in with. This is necessary in the case of uing a temporary proof, in which case it must match the phone number that was authenticated in the request that generated the temporary proof. This field is ignored if a session info is passed. |
| `code` | `string` | No | User-entered verification code from an SMS sent to the user's phone. |
| `idToken` | `string` | No | A valid ID token for an Identity Platform account. If passed, this request will link the phone number to the user represented by this ID token if the phone number is not in use, or will reauthenticate the user if the phone number is already linked to the user. |
| `temporaryProof` | `string` | No | A proof of the phone number verification, provided from a previous signInWithPhoneNumber request. If this is passed, the caller must also pass in the phone\_number field the phone number that was verified in the previous request. |
| `tenantId` | `string` | No | The ID of the Identity Platform tenant the user is signing in to. If not set, the user will sign in to the default Identity Platform project. |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `temporaryProof` | `string \| null` | No | A proof of the phone number verification, provided if a phone authentication is successful but the user operation fails. This happens when the request tries to link a phone number to a user with an ID token or reauthenticate with an ID token but the phone number is linked to a different user. |
| `verificationProofExpiresIn` | `string \| number \| null` | No | Do not use. |
| `verificationProof` | `string \| null` | No | Do not use. |
| `phoneNumber` | `string \| null` | No | Phone number of the authenticated user. Always present in the response. |
| `temporaryProofExpiresIn` | `string \| number \| null` | No | The number of seconds until the temporary proof expires. |
| `idToken` | `string \| null` | No | Identity Platform ID token for the authenticated user. |
| `refreshToken` | `string \| null` | No | Refresh token for the authenticated user. |
| `localId` | `string \| null` | No | The id of the authenticated user. Present in the case of a successful authentication. In the case when the phone could be verified but the account operation could not be performed, a temporary proof will be returned instead. |
| `expiresIn` | `string \| number \| null` | No | The number of seconds until the ID token expires. |
| `isNewUser` | `boolean \| null` | No | Whether the authenticated user was created by this request. |

***

### accounts.signUp

`auth.accounts.signUp`

Signs up a new email and password user or anonymous user, or upgrades an anonymous user to email and password. For an admin request with a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control), creates a new anonymous, email and password, or phone number user

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.auth.accounts.signUp({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | No | The email to assign to the created user. The length of the email should be less than 256 characters and in the format of `name@domain.tld`. The email should also match the [RFC 822](https://tools.ietf.org/html/rfc822) addr-spec production. An anonymous user will be created if not provided. |
| `password` | `string` | No | The password to assign to the created user. The password must be be at least 6 characters long. If set, the `email` field must also be set. |
| `photoUrl` | `string` | No | The profile photo url of the user to create. |
| `instanceId` | `string` | No | — |
| `targetProjectId` | `string` | No | The project ID of the project which the user should belong to. Specifying this field requires a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). If this is not set, the target project is inferred from the scope associated to the Bearer access token. |
| `localId` | `string` | No | The ID of the user to create. The ID must be unique within the project that the user is being created under. Specifying this field requires a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `tenantId` | `string` | No | The ID of the Identity Platform tenant to create a user under. If not set, the user will be created under the default Identity Platform project. |
| `emailVerified` | `boolean` | No | Whether the user's email is verified. Specifying this field requires a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `captchaChallenge` | `string` | No | — |
| `mfaInfo` | `object[]` | No | The multi-factor authentication providers for the user to create. |
| `disabled` | `boolean` | No | Whether the user will be disabled upon creation. Disabled accounts are inaccessible except for requests bearing a Google OAuth2 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `clientType` | `CLIENT_TYPE_UNSPECIFIED \| CLIENT_TYPE_WEB \| CLIENT_TYPE_ANDROID \| CLIENT_TYPE_IOS` | No | The client type: web, Android or iOS. Required when enabling reCAPTCHA enterprise protection. |
| `displayName` | `string` | No | The display name of the user to be created. |
| `idToken` | `string` | No | A valid ID token for an Identity Platform user. If set, this request will link the authentication credential to the user represented by this ID token. For a non-admin request, both the `email` and `password` fields must be set. For an admin request, `local_id` must not be set. |
| `recaptchaVersion` | `RECAPTCHA_VERSION_UNSPECIFIED \| RECAPTCHA_ENTERPRISE` | No | The reCAPTCHA version of the reCAPTCHA token in the captcha\_response. |
| `captchaResponse` | `string` | No | The reCAPTCHA token provided by the reCAPTCHA client-side integration. reCAPTCHA Enterprise uses it for assessment. Required when reCAPTCHA enterprise is enabled. |
| `phoneNumber` | `string` | No | The phone number of the user to create. Specifying this field requires a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |

> [accordion] mfaInfo full type
>
> ```ts theme={null}
> {
>   phoneInfo?: string,
>   displayName?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `localId` | `string \| null` | No | The ID of the created user. Always present in the response. |
| `displayName` | `string \| null` | No | The created user's display name. |
| `expiresIn` | `string \| number \| null` | No | The number of seconds until the ID token expires. |
| `idToken` | `string \| null` | No | An Identity Platform ID token for the created user. This field is only set for non-admin requests. |
| `refreshToken` | `string \| null` | No | An Identity Platform refresh token for the created user. This field is only set for non-admin requests. |
| `email` | `string \| null` | No | The created user's email. |
| `kind` | `string \| null` | No | — |

***

### accounts.update

`auth.accounts.update`

Updates account-related information for the specified user by setting specific fields or applying action codes. Requests from administrators and end users are supported

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.auth.accounts.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `emailVerified` | `boolean` | No | Whether the user's email has been verified. Specifying this field requires a Google OAuth 2.0 credential with proper \[permissions] ([https://cloud.google.com/identity-platform/docs/access-control](https://cloud.google.com/identity-platform/docs/access-control)). |
| `email` | `string` | No | The user's new email to be updated in the account's attributes. The length of email should be less than 256 characters and in the format of `name@domain.tld`. The email should also match the [RFC 822](https://tools.ietf.org/html/rfc822) addr-spec production. If [email enumeration protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled, the email cannot be changed by the user without verifying the email first, but it can be changed by an administrator. |
| `localId` | `string` | No | The ID of the user. Specifying this field requires a Google OAuth 2.0 credential with proper \[permissions] ([https://cloud.google.com/identity-platform/docs/access-control](https://cloud.google.com/identity-platform/docs/access-control)). For requests from end-users, an ID token should be passed instead. |
| `mfa` | `object` | No | Multi-factor authentication related information. |
| `captchaChallenge` | `string` | No | — |
| `phoneNumber` | `string` | No | The phone number to be updated in the account's attributes. |
| `upgradeToFederatedLogin` | `boolean` | No | Whether the account should be restricted to only using federated login. |
| `validSince` | `string \| number` | No | Specifies the minimum timestamp in seconds for an Identity Platform ID token to be considered valid. |
| `lastLoginAt` | `string \| number` | No | The timestamp in milliseconds when the account last logged in. |
| `captchaResponse` | `string` | No | The response from reCaptcha challenge. This is required when the system detects possible abuse activities. |
| `delegatedProjectNumber` | `string \| number` | No | — |
| `createdAt` | `string \| number` | No | The timestamp in milliseconds when the account was created. |
| `customAttributes` | `string` | No | JSON formatted custom attributes to be stored in the Identity Platform ID token. Specifying this field requires a Google OAuth 2.0 credential with proper \[permissions] ([https://cloud.google.com/identity-platform/docs/access-control](https://cloud.google.com/identity-platform/docs/access-control)). |
| `provider` | `string[]` | No | The Identity Providers that the account should be associated with. |
| `tenantId` | `string` | No | The tenant ID of the Identity Platform tenant that the account belongs to. Requests from end users should pass an Identity Platform ID token rather than setting this field. |
| `instanceId` | `string` | No | — |
| `deleteProvider` | `string[]` | No | The Identity Providers to unlink from the user's account. |
| `displayName` | `string` | No | The user's new display name to be updated in the account's attributes. The length of the display name must be less than or equal to 256 characters. |
| `deleteAttribute` | `(USER_ATTRIBUTE_NAME_UNSPECIFIED \| EMAIL \| DISPLAY_NAME \| PROVIDER \| PHOTO_URL \| PASSWORD \| RAW_USER_INFO)[]` | No | The account's attributes to be deleted. |
| `targetProjectId` | `string` | No | The project ID for the project that the account belongs to. Specifying this field requires Google OAuth 2.0 credential with proper \[permissions] ([https://cloud.google.com/identity-platform/docs/access-control](https://cloud.google.com/identity-platform/docs/access-control)). Requests from end users should pass an Identity Platform ID token instead. |
| `oobCode` | `string` | No | The out-of-band code to be applied on the user's account. The following out-of-band code types are supported: \* VERIFY\_EMAIL \* RECOVER\_EMAIL \* REVERT\_SECOND\_FACTOR\_ADDITION \* VERIFY\_AND\_CHANGE\_EMAIL |
| `returnSecureToken` | `boolean` | No | Whether or not to return an ID and refresh token. Should always be true. |
| `password` | `string` | No | The user's new password to be updated in the account's attributes. The password must be at least 6 characters long. |
| `photoUrl` | `string` | No | The user's new photo URL for the account's profile photo to be updated in the account's attributes. The length of the URL must be less than or equal to 2048 characters. |
| `idToken` | `string` | No | A valid Identity Platform ID token. Required when attempting to change user-related information. |
| `linkProviderUserInfo` | `object` | No | Information about the user as provided by various Identity Providers. |
| `disableUser` | `boolean` | No | If true, marks the account as disabled, meaning the user will no longer be able to sign-in. |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |

> [accordion] mfa full type
>
> ```ts theme={null}
> {
>   enrollments?: {
>     displayName?: string,
>     phoneInfo?: string,
>     emailInfo?: {
>       emailAddress?: string
>     },
>     totpInfo?: {
>     },
>     enrolledAt?: string,
>     mfaEnrollmentId?: string
>   }[]
> }
> ```

> [accordion] linkProviderUserInfo full type
>
> ```ts theme={null}
> {
>   providerId?: string,
>   phoneNumber?: string,
>   email?: string,
>   federatedId?: string,
>   rawId?: string,
>   screenName?: string,
>   photoUrl?: string,
>   displayName?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | The account's display name. |
| `passwordHash` | `string \| null` | No | Deprecated. No actual password hash is currently returned. |
| `emailVerified` | `boolean \| null` | No | Whether the account's email has been verified. |
| `email` | `string \| null` | No | The account's email address. |
| `newEmail` | `string \| null` | No | The new email that has been set on the user's account attributes. |
| `expiresIn` | `string \| number \| null` | No | The number of seconds until the Identity Platform ID token expires. |
| `kind` | `string \| null` | No | — |
| `refreshToken` | `string \| null` | No | A refresh token for the account. This is used for legacy user sign up. |
| `photoUrl` | `string \| null` | No | The user's photo URL for the account's profile photo. |
| `localId` | `string \| null` | No | The ID of the authenticated user. |
| `idToken` | `string \| null` | No | An Identity Platform ID token for the account. This is used for legacy user sign up. |
| `providerUserInfo` | `object[] \| null` | No | The linked Identity Providers on the account. |

> [accordion] providerUserInfo full type
>
> ```ts theme={null}
> {
>   providerId?: string | null,
>   phoneNumber?: string | null,
>   email?: string | null,
>   federatedId?: string | null,
>   rawId?: string | null,
>   screenName?: string | null,
>   photoUrl?: string | null,
>   displayName?: string | null
> }[] | null
> ```

***

### accounts.verifyIosClient

`auth.accounts.verifyIosClient`

Verifies an iOS client is a real iOS device. If the request is valid, a receipt will be sent in the response and a secret will be sent via Apple Push Notification Service

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.auth.accounts.verifyIosClient({ iosBundleId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `appToken` | `string` | No | A device token that the iOS client gets after registering to APNs (Apple Push Notification service). |
| `isSandbox` | `boolean` | No | Whether the app token is in the iOS sandbox. If false, the app token is in the production environment. |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |
| `iosBundleId` | `string` | Yes | The iOS app's bundle id (X-Ios-Bundle-Identifier). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `suggestedTimeout` | `string \| number \| null` | No | Suggested time that the client should wait in seconds for delivery of the push notification. |
| `receipt` | `string \| null` | No | Receipt of successful app token validation. |

***

### getProjects

`auth.getProjects`

Gets a project's public Identity Toolkit configuration. (Legacy) This method also supports authenticated calls from a developer to retrieve non-public configuration

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.auth.getProjects({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `firebaseAppId` | `string` | No | The Firebase app ID, for applications that use Firebase. This can be found in the Firebase console for your project. If set, a check will be performed to ensure that the app ID is valid for the retrieved project. If not valid, the request will be rejected with a client error. |
| `clientId` | `string` | No | The RP OAuth client ID. If set, a check will be performed to ensure that the OAuth client is valid for the retrieved project and the request rejected with a client error if not valid. |
| `delegatedProjectNumber` | `string \| number` | No | Project Number of the delegated project request. This field should only be used as part of the Firebase V1 migration. |
| `sha1Cert` | `string` | No | SHA-1 Android application cert hash. If set, a check will be performed to ensure that the cert hash is valid for the retrieved project and android\_package\_name. |
| `iosBundleId` | `string` | No | iOS bundle id to check against the real ios bundle id. If this field is provided, the action will throw an error if this does not match the real iOS bundle id. |
| `androidPackageName` | `string` | No | Android package name to check against the real android package name. If this field is provided, and sha1\_cert\_hash is not provided, the action will throw an error if this does not match the real android package name. |
| `returnDynamicLink` | `boolean` | No | Whether dynamic link should be returned. |
| `projectNumber` | `string \| number` | No | Project number of the configuration to retrieve. This field is deprecated and should not be used by new integrations. |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string \| null` | No | The project id of the retrieved configuration. |
| `apiKey` | `string \| null` | No | Google Cloud API key. This field is only returned for authenticated calls from a developer. |
| `resetPasswordTemplate` | `object \| null` | No | Email template |
| `allowPasswordUser` | `boolean \| null` | No | Whether to allow password account sign up. This field is only returned for authenticated calls from a developer. |
| `legacyResetPasswordTemplate` | `object \| null` | No | Email template |
| `verifyEmailTemplate` | `object \| null` | No | Email template |
| `enableAnonymousUser` | `boolean \| null` | No | Whether anonymous user is enabled. This field is only returned for authenticated calls from a developer. |
| `useEmailSending` | `boolean \| null` | No | Whether to use email sending. This field is only returned for authenticated calls from a developer. |
| `changeEmailTemplate` | `object \| null` | No | Email template |
| `revertSecondFactorAdditionTemplate` | `object \| null` | No | Email template |
| `authorizedDomains` | `string[] \| null` | No | Authorized domains for widget redirect. |
| `dynamicLinksDomain` | `string \| null` | No | The Firebase Dynamic Links domain used to construct links for redirects to native apps. |
| `idpConfig` | `object[] \| null` | No | OAuth2 provider config. This field is only returned for authenticated calls from a developer. |

> [accordion] resetPasswordTemplate full type
>
> ```ts theme={null}
> {
>   customized?: boolean | null,
>   from?: string | null,
>   locale?: string | null,
>   disabled?: boolean | null,
>   fromDisplayName?: string | null,
>   fromLocalPart?: string | null,
>   subject?: string | null,
>   replyTo?: string | null,
>   body?: string | null,
>   format?: string | null
> } | null
> ```

> [accordion] legacyResetPasswordTemplate full type
>
> ```ts theme={null}
> {
>   customized?: boolean | null,
>   from?: string | null,
>   locale?: string | null,
>   disabled?: boolean | null,
>   fromDisplayName?: string | null,
>   fromLocalPart?: string | null,
>   subject?: string | null,
>   replyTo?: string | null,
>   body?: string | null,
>   format?: string | null
> } | null
> ```

> [accordion] verifyEmailTemplate full type
>
> ```ts theme={null}
> {
>   customized?: boolean | null,
>   from?: string | null,
>   locale?: string | null,
>   disabled?: boolean | null,
>   fromDisplayName?: string | null,
>   fromLocalPart?: string | null,
>   subject?: string | null,
>   replyTo?: string | null,
>   body?: string | null,
>   format?: string | null
> } | null
> ```

> [accordion] changeEmailTemplate full type
>
> ```ts theme={null}
> {
>   customized?: boolean | null,
>   from?: string | null,
>   locale?: string | null,
>   disabled?: boolean | null,
>   fromDisplayName?: string | null,
>   fromLocalPart?: string | null,
>   subject?: string | null,
>   replyTo?: string | null,
>   body?: string | null,
>   format?: string | null
> } | null
> ```

> [accordion] revertSecondFactorAdditionTemplate full type
>
> ```ts theme={null}
> {
>   customized?: boolean | null,
>   from?: string | null,
>   locale?: string | null,
>   disabled?: boolean | null,
>   fromDisplayName?: string | null,
>   fromLocalPart?: string | null,
>   subject?: string | null,
>   replyTo?: string | null,
>   body?: string | null,
>   format?: string | null
> } | null
> ```

> [accordion] idpConfig full type
>
> ```ts theme={null}
> {
>   secret?: string | null,
>   experimentPercent?: number | null,
>   enabled?: boolean | null,
>   whitelistedAudiences?: string[] | null,
>   provider?: string | null,
>   clientId?: string | null
> }[] | null
> ```

***

### getPublicKeys

`auth.getPublicKeys`

Retrieves public keys of the legacy Identity Toolkit token signer to enable third parties to verify the legacy ID token. For now the X509 pem cert is the only format supported

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.auth.getPublicKeys({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |

**Output:** `Record<string, string>`

***

### getRecaptchaParams

`auth.getRecaptchaParams`

Gets parameters needed for generating a reCAPTCHA challenge

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.auth.getRecaptchaParams({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | — |
| `producerProjectNumber` | `string \| null` | No | The producer project number used to generate PIA tokens |
| `recaptchaStoken` | `string \| null` | No | — |
| `recaptchaSiteKey` | `string \| null` | No | The reCAPTCHA v2 site key used to invoke the reCAPTCHA service. Always present. |

***

### getSessionCookiePublicKeys

`auth.getSessionCookiePublicKeys`

Retrieves the set of public keys of the session cookie JSON Web Token (JWT) signer that can be used to validate the session cookie created through createSessionCookie

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.auth.getSessionCookiePublicKeys({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `apiKey` | `string` | No | The project's Web API key (Firebase console > Project settings > General). The client sign-in calls need it; with the service account alone Google may refuse them. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `keys` | `object[] \| null` | No | Public keys of the session cookie signer, formatted as [JSON Web Keys (JWK)](https://tools.ietf.org/html/rfc7517). |

> [accordion] keys full type
>
> ```ts theme={null}
> {
>   n?: string | null,
>   e?: string | null,
>   kty?: string | null,
>   kid?: string | null,
>   use?: string | null,
>   alg?: string | null
> }[] | null
> ```

***

### projects.accounts.batchCreate

`auth.projects.accounts.batchCreate`

Uploads multiple accounts into the Google Cloud project. If there is a problem uploading one or more of the accounts, the rest will be uploaded, and a list of the errors will be returned

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.auth.projects.accounts.batchCreate({ targetProjectId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `targetProjectId` | `string` | Yes | The Project ID of the Identity Platform project which the account belongs to. Format: `<id>`. |
| `cpuMemCost` | `number` | No | The CPU memory cost parameter to be used by the STANDARD\_SCRYPT hashing function. This parameter, along with block\_size and cpu\_mem\_cost help tune the resources needed to hash a password, and should be tuned as processor speeds and memory technologies advance. |
| `hashAlgorithm` | `string` | No | Required. The hashing function used to hash the account passwords. Must be one of the following: \* HMAC\_SHA256 \* HMAC\_SHA1 \* HMAC\_MD5 \* SCRYPT \* PBKDF\_SHA1 \* MD5 \* HMAC\_SHA512 \* SHA1 \* BCRYPT \* PBKDF2\_SHA256 \* SHA256 \* SHA512 \* STANDARD\_SCRYPT \* ARGON2 |
| `passwordHashOrder` | `UNSPECIFIED_ORDER \| SALT_AND_PASSWORD \| PASSWORD_AND_SALT` | No | Password and salt order when verify password. |
| `parallelization` | `number` | No | The parallelization cost parameter to be used by the STANDARD\_SCRYPT hashing function. This parameter, along with block\_size and cpu\_mem\_cost help tune the resources needed to hash a password, and should be tuned as processor speeds and memory technologies advance. |
| `dkLen` | `number` | No | The desired key length for the STANDARD\_SCRYPT hashing function. Must be at least 1. |
| `saltSeparator` | `string` | No | One or more bytes to be inserted between the salt and plain text password. For stronger security, this should be a single non-printable character. (base64) |
| `users` | `object[]` | No | A list of accounts to upload. `local_id` is required for each user; everything else is optional. |
| `signerKey` | `string` | No | The signer key used to hash the password. Required for the following hashing functions: \* SCRYPT, \* HMAC\_MD5, \* HMAC\_SHA1, \* HMAC\_SHA256, \* HMAC\_SHA512 (base64) |
| `sanityCheck` | `boolean` | No | If true, the service will do the following list of checks before an account is uploaded: \* Duplicate emails \* Duplicate federated IDs \* Federated ID provider validation If the duplication exists within the list of accounts to be uploaded, it will prevent the entire list from being uploaded. If the email or federated ID is a duplicate of a user already within the project/tenant, the account will not be uploaded, but the rest of the accounts will be unaffected. If false, these checks will be skipped. |
| `rounds` | `number` | No | The number of rounds used for hash calculation. Only required for the following hashing functions: \* MD5 \* SHA1 \* SHA256 \* SHA512 \* PBKDF\_SHA1 \* PBKDF2\_SHA256 \* SCRYPT |
| `tenantId` | `string` | No | The ID of the Identity Platform tenant the account belongs to. |
| `memoryCost` | `number` | No | Memory cost for hash calculation. Only required when the hashing function is SCRYPT. |
| `argon2Parameters` | `object` | No | The parameters for Argon2 hashing algorithm. |
| `blockSize` | `number` | No | The block size parameter used by the STANDARD\_SCRYPT hashing function. This parameter, along with parallelization and cpu\_mem\_cost help tune the resources needed to hash a password, and should be tuned as processor speeds and memory technologies advance. |
| `allowOverwrite` | `boolean` | No | Whether to overwrite an existing account in Identity Platform with a matching `local_id` in the request. If true, the existing account will be overwritten. If false, an error will be returned. |
| `delegatedProjectNumber` | `string \| number` | No | — |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   passwordUpdatedAt?: number,
>   salt?: string,
>   phoneNumber?: string,
>   photoUrl?: string,
>   mfaInfo?: {
>     displayName?: string,
>     phoneInfo?: string,
>     emailInfo?: {
>       emailAddress?: string
>     },
>     totpInfo?: {
>     },
>     enrolledAt?: string,
>     mfaEnrollmentId?: string
>   }[],
>   emailVerified?: boolean,
>   localId?: string,
>   email?: string,
>   rawPassword?: string,
>   customAttributes?: string,
>   lastLoginAt?: string | number,
>   tenantId?: string,
>   displayName?: string,
>   initialEmail?: string,
>   createdAt?: string | number,
>   version?: number,
>   lastRefreshAt?: string,
>   validSince?: string | number,
>   providerUserInfo?: {
>     providerId?: string,
>     phoneNumber?: string,
>     email?: string,
>     federatedId?: string,
>     rawId?: string,
>     screenName?: string,
>     photoUrl?: string,
>     displayName?: string
>   }[],
>   disabled?: boolean,
>   passwordHash?: string
> }[]
> ```

> [accordion] argon2Parameters full type
>
> ```ts theme={null}
> {
>   associatedData?: string,
>   iterations?: number,
>   hashLengthBytes?: number,
>   parallelism?: number,
>   memoryCostKib?: number,
>   version?: VERSION_UNSPECIFIED | VERSION_10 | VERSION_13,
>   hashType?: HASH_TYPE_UNSPECIFIED | ARGON2_D | ARGON2_ID | ARGON2_I
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object[] \| null` | No | Detailed error info for accounts that cannot be uploaded. |
| `kind` | `string \| null` | No | — |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   index?: number | null,
>   message?: string | null
> }[] | null
> ```

***

### projects.accounts.batchDelete

`auth.projects.accounts.batchDelete`

Batch deletes multiple accounts. For accounts that fail to be deleted, error info is contained in the response

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.auth.projects.accounts.batchDelete({ targetProjectId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `targetProjectId` | `string` | Yes | If `tenant_id` is specified, the ID of the Google Cloud project that the Identity Platform tenant belongs to. Otherwise, the ID of the Google Cloud project that accounts belong to. Format: `<id>`. |
| `tenantId` | `string` | No | If the accounts belong to an Identity Platform tenant, the ID of the tenant. If the accounts belong to a default Identity Platform project, the field is not needed. |
| `force` | `boolean` | No | Whether to force deleting accounts that are not in disabled state. If false, only disabled accounts will be deleted, and accounts that are not disabled will be added to the `errors`. |
| `localIds` | `string[]` | No | Required. List of user IDs to be deleted. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `errors` | `object[] \| null` | No | Detailed error info for accounts that cannot be deleted. |

> [accordion] errors full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   localId?: string | null,
>   index?: number | null
> }[] | null
> ```

***

### projects.accounts.batchGet

`auth.projects.accounts.batchGet`

Download account information for all accounts on the project in a paginated manner. To use this method requires a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.auth.projects.accounts.batchGet({ targetProjectId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `tenantId` | `string` | No | The ID of the Identity Platform tenant the accounts belongs to. If not specified, accounts on the Identity Platform project are returned. |
| `maxResults` | `number` | No | The maximum number of results to return. Must be at least 1 and no greater than 1000. By default, it is 20. |
| `nextPageToken` | `string` | No | The pagination token from the response of a previous request. |
| `targetProjectId` | `string` | Yes | If `tenant_id` is specified, the ID of the Google Cloud project that the Identity Platform tenant belongs to. Otherwise, the ID of the Google Cloud project that the accounts belong to. Format: `<id>`. |
| `delegatedProjectNumber` | `string \| number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | — |
| `users` | `object[] \| null` | No | All accounts belonging to the project/tenant limited by max\_results in the request. |
| `nextPageToken` | `string \| null` | No | If there are more accounts to be downloaded, a token that can be passed back to DownloadAccount to get more accounts. Otherwise, this is blank. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   screenName?: string | null,
>   passwordUpdatedAt?: number | null,
>   dateOfBirth?: string | null,
>   salt?: string | null,
>   phoneNumber?: string | null,
>   photoUrl?: string | null,
>   mfaInfo?: {
>     displayName?: string | null,
>     phoneInfo?: string | null,
>     emailInfo?: {
>       emailAddress?: string | null
>     } | null,
>     totpInfo?: {
>     } | null,
>     unobfuscatedPhoneInfo?: string | null,
>     enrolledAt?: string | null,
>     mfaEnrollmentId?: string | null
>   }[] | null,
>   emailVerified?: boolean | null,
>   localId?: string | null,
>   email?: string | null,
>   rawPassword?: string | null,
>   customAttributes?: string | null,
>   lastLoginAt?: string | number | null,
>   tenantId?: string | null,
>   displayName?: string | null,
>   initialEmail?: string | null,
>   timeZone?: string | null,
>   language?: string | null,
>   createdAt?: string | number | null,
>   version?: number | null,
>   lastRefreshAt?: string | null,
>   emailLinkSignin?: boolean | null,
>   validSince?: string | number | null,
>   customAuth?: boolean | null,
>   providerUserInfo?: {
>     providerId?: string | null,
>     phoneNumber?: string | null,
>     email?: string | null,
>     federatedId?: string | null,
>     rawId?: string | null,
>     screenName?: string | null,
>     photoUrl?: string | null,
>     displayName?: string | null
>   }[] | null,
>   disabled?: boolean | null,
>   passwordHash?: string | null
> }[] | null
> ```

***

### projects.accounts.create

`auth.projects.accounts.create`

Signs up a new email and password user or anonymous user, or upgrades an anonymous user to email and password. For an admin request with a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control), creates a new anonymous, email and password, or phone number user

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.auth.projects.accounts.create({ targetProjectId: 'demo-project', email: 'ada@example.com', password: 'correct-horse-battery-staple' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `targetProjectId` | `string` | Yes | The project ID of the project which the user should belong to. Specifying this field requires a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). If this is not set, the target project is inferred from the scope associated to the Bearer access token. Format: `<id>`. |
| `email` | `string` | No | The email to assign to the created user. The length of the email should be less than 256 characters and in the format of `name@domain.tld`. The email should also match the [RFC 822](https://tools.ietf.org/html/rfc822) addr-spec production. An anonymous user will be created if not provided. |
| `password` | `string` | No | The password to assign to the created user. The password must be be at least 6 characters long. If set, the `email` field must also be set. |
| `photoUrl` | `string` | No | The profile photo url of the user to create. |
| `instanceId` | `string` | No | — |
| `body_targetProjectId` | `string` | No | The project ID of the project which the user should belong to. Specifying this field requires a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). If this is not set, the target project is inferred from the scope associated to the Bearer access token. |
| `localId` | `string` | No | The ID of the user to create. The ID must be unique within the project that the user is being created under. Specifying this field requires a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `tenantId` | `string` | No | The ID of the Identity Platform tenant to create a user under. If not set, the user will be created under the default Identity Platform project. |
| `emailVerified` | `boolean` | No | Whether the user's email is verified. Specifying this field requires a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `captchaChallenge` | `string` | No | — |
| `mfaInfo` | `object[]` | No | The multi-factor authentication providers for the user to create. |
| `disabled` | `boolean` | No | Whether the user will be disabled upon creation. Disabled accounts are inaccessible except for requests bearing a Google OAuth2 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `clientType` | `CLIENT_TYPE_UNSPECIFIED \| CLIENT_TYPE_WEB \| CLIENT_TYPE_ANDROID \| CLIENT_TYPE_IOS` | No | The client type: web, Android or iOS. Required when enabling reCAPTCHA enterprise protection. |
| `displayName` | `string` | No | The display name of the user to be created. |
| `idToken` | `string` | No | A valid ID token for an Identity Platform user. If set, this request will link the authentication credential to the user represented by this ID token. For a non-admin request, both the `email` and `password` fields must be set. For an admin request, `local_id` must not be set. |
| `recaptchaVersion` | `RECAPTCHA_VERSION_UNSPECIFIED \| RECAPTCHA_ENTERPRISE` | No | The reCAPTCHA version of the reCAPTCHA token in the captcha\_response. |
| `captchaResponse` | `string` | No | The reCAPTCHA token provided by the reCAPTCHA client-side integration. reCAPTCHA Enterprise uses it for assessment. Required when reCAPTCHA enterprise is enabled. |
| `phoneNumber` | `string` | No | The phone number of the user to create. Specifying this field requires a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |

> [accordion] mfaInfo full type
>
> ```ts theme={null}
> {
>   phoneInfo?: string,
>   displayName?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `localId` | `string \| null` | No | The ID of the created user. Always present in the response. |
| `displayName` | `string \| null` | No | The created user's display name. |
| `expiresIn` | `string \| number \| null` | No | The number of seconds until the ID token expires. |
| `idToken` | `string \| null` | No | An Identity Platform ID token for the created user. This field is only set for non-admin requests. |
| `refreshToken` | `string \| null` | No | An Identity Platform refresh token for the created user. This field is only set for non-admin requests. |
| `email` | `string \| null` | No | The created user's email. |
| `kind` | `string \| null` | No | — |

***

### projects.accounts.delete

`auth.projects.accounts.delete`

Deletes a user's account

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.auth.projects.accounts.delete({ targetProjectId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `targetProjectId` | `string` | Yes | The ID of the project which the account belongs to. Should only be specified in authenticated requests that specify local\_id of an account. Format: `<id>`. |
| `delegatedProjectNumber` | `string \| number` | No | — |
| `body_targetProjectId` | `string` | No | The ID of the project which the account belongs to. Should only be specified in authenticated requests that specify local\_id of an account. |
| `idToken` | `string` | No | The Identity Platform ID token of the account to delete. Require to be specified for requests from end users that lack Google OAuth 2.0 credential. Authenticated requests bearing a Google OAuth2 credential with proper permissions may pass local\_id to specify the account to delete alternatively. |
| `tenantId` | `string` | No | The ID of the tenant that the account belongs to, if applicable. Only require to be specified for authenticated requests bearing a Google OAuth 2.0 credential that specify local\_id of an account that belongs to an Identity Platform tenant. |
| `localId` | `string` | No | The ID of user account to delete. Specifying this field requires a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). Requests from users lacking the credential should pass an ID token instead. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | — |

***

### projects.accounts.lookup

`auth.projects.accounts.lookup`

Gets account information for all matched accounts. For an end user request, retrieves the account of the end user

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.auth.projects.accounts.lookup({ targetProjectId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `targetProjectId` | `string` | Yes | The ID of the Google Cloud project that the account or the Identity Platform tenant specified by `tenant_id` belongs to. Should only be specified by authenticated requests bearing a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). Format: `<id>`. |
| `phoneNumber` | `string[]` | No | The phone number of one or more accounts to fetch. Should only be specified by authenticated requests from a developer and should be in E.164 format, for example, +15555555555. |
| `tenantId` | `string` | No | The ID of the tenant that the account belongs to. Should only be specified by authenticated requests from a developer. |
| `initialEmail` | `string[]` | No | The initial email of one or more accounts to fetch. The length of email should be less than 256 characters and in the format of `name@domain.tld`. The email should also match the [RFC 822](https://tools.ietf.org/html/rfc822) addr-spec production. Should only be specified by authenticated requests from a developer. |
| `body_targetProjectId` | `string` | No | The ID of the Google Cloud project that the account or the Identity Platform tenant specified by `tenant_id` belongs to. Should only be specified by authenticated requests bearing a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `email` | `string[]` | No | The email address of one or more accounts to fetch. The length of email should be less than 256 characters and in the format of `name@domain.tld`. The email should also match the [RFC 822](https://tools.ietf.org/html/rfc822) addr-spec production. Should only be specified by authenticated requests from a developer. |
| `delegatedProjectNumber` | `string \| number` | No | — |
| `localId` | `string[]` | No | The ID of one or more accounts to fetch. Should only be specified by authenticated requests bearing a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `idToken` | `string` | No | The Identity Platform ID token of the account to fetch. Require to be specified for requests from end users. |
| `federatedUserId` | `object[]` | No | The federated user identifier of one or more accounts to fetch. Should only be specified by authenticated requests bearing a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |

> [accordion] federatedUserId full type
>
> ```ts theme={null}
> {
>   rawId?: string,
>   providerId?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | — |
| `users` | `object[] \| null` | No | The information of specific user account(s) matching the parameters in the request. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   screenName?: string | null,
>   passwordUpdatedAt?: number | null,
>   dateOfBirth?: string | null,
>   salt?: string | null,
>   phoneNumber?: string | null,
>   photoUrl?: string | null,
>   mfaInfo?: {
>     displayName?: string | null,
>     phoneInfo?: string | null,
>     emailInfo?: {
>       emailAddress?: string | null
>     } | null,
>     totpInfo?: {
>     } | null,
>     unobfuscatedPhoneInfo?: string | null,
>     enrolledAt?: string | null,
>     mfaEnrollmentId?: string | null
>   }[] | null,
>   emailVerified?: boolean | null,
>   localId?: string | null,
>   email?: string | null,
>   rawPassword?: string | null,
>   customAttributes?: string | null,
>   lastLoginAt?: string | number | null,
>   tenantId?: string | null,
>   displayName?: string | null,
>   initialEmail?: string | null,
>   timeZone?: string | null,
>   language?: string | null,
>   createdAt?: string | number | null,
>   version?: number | null,
>   lastRefreshAt?: string | null,
>   emailLinkSignin?: boolean | null,
>   validSince?: string | number | null,
>   customAuth?: boolean | null,
>   providerUserInfo?: {
>     providerId?: string | null,
>     phoneNumber?: string | null,
>     email?: string | null,
>     federatedId?: string | null,
>     rawId?: string | null,
>     screenName?: string | null,
>     photoUrl?: string | null,
>     displayName?: string | null
>   }[] | null,
>   disabled?: boolean | null,
>   passwordHash?: string | null
> }[] | null
> ```

***

### projects.accounts.query

`auth.projects.accounts.query`

Looks up user accounts within a project or a tenant based on conditions in the request

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.auth.projects.accounts.query({ targetProjectId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `targetProjectId` | `string` | Yes | The ID of the project to which the result is scoped. Format: `<id>`. |
| `returnUserInfo` | `boolean` | No | If `true`, this request will return the accounts matching the query. If `false`, only the **count** of accounts matching the query will be returned. Defaults to `true`. |
| `limit` | `string \| number` | No | The maximum number of accounts to return with an upper limit of **500**. Defaults to *500*. Only valid when `return_user_info` is set to `true`. |
| `sortBy` | `SORT_BY_FIELD_UNSPECIFIED \| USER_ID \| NAME \| CREATED_AT \| LAST_LOGIN_AT \| USER_EMAIL` | No | The field to use for sorting user accounts. Defaults to `USER_ID`. Note: when `phone_number` is specified in `expression`, the result ignores the sorting. Only valid when `return_user_info` is set to `true`. |
| `expression` | `object[]` | No | Query conditions used to filter results. If more than one is passed, only the first SqlExpression is evaluated. |
| `tenantId` | `string` | No | The ID of the tenant to which the result is scoped. |
| `order` | `ORDER_UNSPECIFIED \| ASC \| DESC` | No | The order for sorting query result. Defaults to **ascending** order. Only valid when `return_user_info` is set to `true`. |
| `offset` | `string \| number` | No | The number of accounts to skip from the beginning of matching records. Only valid when `return_user_info` is set to `true`. |

> [accordion] expression full type
>
> ```ts theme={null}
> {
>   userId?: string,
>   phoneNumber?: string,
>   email?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `recordsCount` | `string \| number \| null` | No | If `return_user_info` in the request is true, this is the number of returned accounts in this message. Otherwise, this is the total number of accounts matching the query. |
| `userInfo` | `object[] \| null` | No | If `return_user_info` in the request is true, this is the accounts matching the query. |

> [accordion] userInfo full type
>
> ```ts theme={null}
> {
>   screenName?: string | null,
>   passwordUpdatedAt?: number | null,
>   dateOfBirth?: string | null,
>   salt?: string | null,
>   phoneNumber?: string | null,
>   photoUrl?: string | null,
>   mfaInfo?: {
>     displayName?: string | null,
>     phoneInfo?: string | null,
>     emailInfo?: {
>       emailAddress?: string | null
>     } | null,
>     totpInfo?: {
>     } | null,
>     unobfuscatedPhoneInfo?: string | null,
>     enrolledAt?: string | null,
>     mfaEnrollmentId?: string | null
>   }[] | null,
>   emailVerified?: boolean | null,
>   localId?: string | null,
>   email?: string | null,
>   rawPassword?: string | null,
>   customAttributes?: string | null,
>   lastLoginAt?: string | number | null,
>   tenantId?: string | null,
>   displayName?: string | null,
>   initialEmail?: string | null,
>   timeZone?: string | null,
>   language?: string | null,
>   createdAt?: string | number | null,
>   version?: number | null,
>   lastRefreshAt?: string | null,
>   emailLinkSignin?: boolean | null,
>   validSince?: string | number | null,
>   customAuth?: boolean | null,
>   providerUserInfo?: {
>     providerId?: string | null,
>     phoneNumber?: string | null,
>     email?: string | null,
>     federatedId?: string | null,
>     rawId?: string | null,
>     screenName?: string | null,
>     photoUrl?: string | null,
>     displayName?: string | null
>   }[] | null,
>   disabled?: boolean | null,
>   passwordHash?: string | null
> }[] | null
> ```

***

### projects.accounts.sendOobCode

`auth.projects.accounts.sendOobCode`

Sends an out-of-band confirmation code for an account. Requests from a authenticated request can optionally return a link including the OOB code instead of sending it

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.auth.projects.accounts.sendOobCode({ targetProjectId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `targetProjectId` | `string` | Yes | The Project ID of the Identity Platform project which the account belongs to. To specify this field, it requires a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). Format: `<id>`. |
| `captchaResp` | `string` | No | For a PASSWORD\_RESET request, a reCaptcha response is required when the system detects possible abuse activity. In those cases, this is the response from the reCaptcha challenge used to verify the caller. |
| `email` | `string` | No | The account's email address to send the OOB code to, and generally the email address of the account that needs to be updated. Required for PASSWORD\_RESET, EMAIL\_SIGNIN, and VERIFY\_EMAIL. Only required for VERIFY\_AND\_CHANGE\_EMAIL requests when return\_oob\_link is set to true. In this case, it is the original email of the user. |
| `clientType` | `CLIENT_TYPE_UNSPECIFIED \| CLIENT_TYPE_WEB \| CLIENT_TYPE_ANDROID \| CLIENT_TYPE_IOS` | No | The client type: web, Android or iOS. Required when reCAPTCHA Enterprise protection is enabled. |
| `body_targetProjectId` | `string` | No | The Project ID of the Identity Platform project which the account belongs to. To specify this field, it requires a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `continueUrl` | `string` | No | The Url to continue after user clicks the link sent in email. This is the url that will allow the web widget to handle the OOB code. |
| `tenantId` | `string` | No | The tenant ID of the Identity Platform tenant the account belongs to. |
| `androidMinimumVersion` | `string` | No | If an associated android app can handle the OOB code, the minimum version of the app. If the version on the device is lower than this version then the user is taken to Google Play Store to upgrade the app. |
| `dynamicLinkDomain` | `string` | No | In order to ensure that the url used can be easily opened up in iOS or android, we create a [Firebase Dynamic Link](https://firebase.google.com/docs/dynamic-links). Most Identity Platform projects will only have one Dynamic Link domain enabled, and can leave this field blank. This field contains a specified Dynamic Link domain for projects that have multiple enabled. |
| `idToken` | `string` | No | An ID token for the account. It is required for VERIFY\_AND\_CHANGE\_EMAIL and VERIFY\_EMAIL requests unless return\_oob\_link is set to true. |
| `challenge` | `string` | No | — |
| `requestType` | `OOB_REQ_TYPE_UNSPECIFIED \| PASSWORD_RESET \| OLD_EMAIL_AGREE \| NEW_EMAIL_ACCEPT \| VERIFY_EMAIL \| RECOVER_EMAIL \| EMAIL_SIGNIN \| VERIFY_AND_CHANGE_EMAIL \| REVERT_SECOND_FACTOR_ADDITION` | No | Required. The type of out-of-band (OOB) code to send. Depending on this value, other fields in this request will be required and/or have different meanings. There are 4 different OOB codes that can be sent: \* PASSWORD\_RESET \* EMAIL\_SIGNIN \* VERIFY\_EMAIL \* VERIFY\_AND\_CHANGE\_EMAIL |
| `canHandleCodeInApp` | `boolean` | No | When set to true, the OOB code link will be be sent as a Universal Link or an Android App Link and will be opened by the corresponding app if installed. If not set, or set to false, the OOB code will be sent to the web widget first and then on continue will redirect to the app if installed. |
| `newEmail` | `string` | No | The email address the account is being updated to. Required only for VERIFY\_AND\_CHANGE\_EMAIL requests. |
| `iOSBundleId` | `string` | No | If an associated iOS app can handle the OOB code, the iOS bundle id of this app. This will allow the correct app to open if it is already installed. |
| `iOSAppStoreId` | `string` | No | If an associated iOS app can handle the OOB code, the App Store id of this app. This will allow App Store to open to the correct app if the app is not yet installed. |
| `recaptchaVersion` | `RECAPTCHA_VERSION_UNSPECIFIED \| RECAPTCHA_ENTERPRISE` | No | The reCAPTCHA version of the reCAPTCHA token in the captcha\_response. |
| `androidPackageName` | `string` | No | If an associated android app can handle the OOB code, the Android package name of the android app that will handle the callback when this OOB code is used. This will allow the correct app to open if it is already installed, or allow Google Play Store to open to the correct app if it is not yet installed. |
| `userIp` | `string` | No | The IP address of the caller. Required only for PASSWORD\_RESET requests. |
| `linkDomain` | `string` | No | Optional. In order to ensure that the url used can be easily opened in iOS or Android, we create a Hosting link '/\_\_/auth/links'. This optional field contains the domain to use when constructing a Hosting link. If not set, '.firebaseapp.com' domain will be used. |
| `androidInstallApp` | `boolean` | No | If an associated android app can handle the OOB code, whether or not to install the android app on the device where the link is opened if the app is not already installed. |
| `returnOobLink` | `boolean` | No | Whether the confirmation link containing the OOB code should be returned in the response (no email is sent). Used when a developer wants to construct the email template and send it on their own. By default this is false; to specify this field, and to set it to true, it requires a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | — |
| `email` | `string \| null` | No | If return\_oob\_link is false in the request, the email address the verification was sent to. |
| `oobLink` | `string \| null` | No | If return\_oob\_link is true in the request, the OOB link to be sent to the user. This returns the constructed link including [Firebase Dynamic Link](https://firebase.google.com/docs/dynamic-links) related parameters. |
| `oobCode` | `string \| null` | No | If return\_oob\_link is true in the request, the OOB code to send. |

***

### projects.accounts.update

`auth.projects.accounts.update`

Updates account-related information for the specified user by setting specific fields or applying action codes. Requests from administrators and end users are supported

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.auth.projects.accounts.update({ targetProjectId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `targetProjectId` | `string` | Yes | The project ID for the project that the account belongs to. Specifying this field requires Google OAuth 2.0 credential with proper \[permissions] ([https://cloud.google.com/identity-platform/docs/access-control](https://cloud.google.com/identity-platform/docs/access-control)). Requests from end users should pass an Identity Platform ID token instead. Format: `<id>`. |
| `emailVerified` | `boolean` | No | Whether the user's email has been verified. Specifying this field requires a Google OAuth 2.0 credential with proper \[permissions] ([https://cloud.google.com/identity-platform/docs/access-control](https://cloud.google.com/identity-platform/docs/access-control)). |
| `email` | `string` | No | The user's new email to be updated in the account's attributes. The length of email should be less than 256 characters and in the format of `name@domain.tld`. The email should also match the [RFC 822](https://tools.ietf.org/html/rfc822) addr-spec production. If [email enumeration protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled, the email cannot be changed by the user without verifying the email first, but it can be changed by an administrator. |
| `localId` | `string` | No | The ID of the user. Specifying this field requires a Google OAuth 2.0 credential with proper \[permissions] ([https://cloud.google.com/identity-platform/docs/access-control](https://cloud.google.com/identity-platform/docs/access-control)). For requests from end-users, an ID token should be passed instead. |
| `mfa` | `object` | No | Multi-factor authentication related information. |
| `captchaChallenge` | `string` | No | — |
| `phoneNumber` | `string` | No | The phone number to be updated in the account's attributes. |
| `upgradeToFederatedLogin` | `boolean` | No | Whether the account should be restricted to only using federated login. |
| `validSince` | `string \| number` | No | Specifies the minimum timestamp in seconds for an Identity Platform ID token to be considered valid. |
| `lastLoginAt` | `string \| number` | No | The timestamp in milliseconds when the account last logged in. |
| `captchaResponse` | `string` | No | The response from reCaptcha challenge. This is required when the system detects possible abuse activities. |
| `delegatedProjectNumber` | `string \| number` | No | — |
| `createdAt` | `string \| number` | No | The timestamp in milliseconds when the account was created. |
| `customAttributes` | `string` | No | JSON formatted custom attributes to be stored in the Identity Platform ID token. Specifying this field requires a Google OAuth 2.0 credential with proper \[permissions] ([https://cloud.google.com/identity-platform/docs/access-control](https://cloud.google.com/identity-platform/docs/access-control)). |
| `provider` | `string[]` | No | The Identity Providers that the account should be associated with. |
| `tenantId` | `string` | No | The tenant ID of the Identity Platform tenant that the account belongs to. Requests from end users should pass an Identity Platform ID token rather than setting this field. |
| `instanceId` | `string` | No | — |
| `deleteProvider` | `string[]` | No | The Identity Providers to unlink from the user's account. |
| `displayName` | `string` | No | The user's new display name to be updated in the account's attributes. The length of the display name must be less than or equal to 256 characters. |
| `deleteAttribute` | `(USER_ATTRIBUTE_NAME_UNSPECIFIED \| EMAIL \| DISPLAY_NAME \| PROVIDER \| PHOTO_URL \| PASSWORD \| RAW_USER_INFO)[]` | No | The account's attributes to be deleted. |
| `body_targetProjectId` | `string` | No | The project ID for the project that the account belongs to. Specifying this field requires Google OAuth 2.0 credential with proper \[permissions] ([https://cloud.google.com/identity-platform/docs/access-control](https://cloud.google.com/identity-platform/docs/access-control)). Requests from end users should pass an Identity Platform ID token instead. |
| `oobCode` | `string` | No | The out-of-band code to be applied on the user's account. The following out-of-band code types are supported: \* VERIFY\_EMAIL \* RECOVER\_EMAIL \* REVERT\_SECOND\_FACTOR\_ADDITION \* VERIFY\_AND\_CHANGE\_EMAIL |
| `returnSecureToken` | `boolean` | No | Whether or not to return an ID and refresh token. Should always be true. |
| `password` | `string` | No | The user's new password to be updated in the account's attributes. The password must be at least 6 characters long. |
| `photoUrl` | `string` | No | The user's new photo URL for the account's profile photo to be updated in the account's attributes. The length of the URL must be less than or equal to 2048 characters. |
| `idToken` | `string` | No | A valid Identity Platform ID token. Required when attempting to change user-related information. |
| `linkProviderUserInfo` | `object` | No | Information about the user as provided by various Identity Providers. |
| `disableUser` | `boolean` | No | If true, marks the account as disabled, meaning the user will no longer be able to sign-in. |

> [accordion] mfa full type
>
> ```ts theme={null}
> {
>   enrollments?: {
>     displayName?: string,
>     phoneInfo?: string,
>     emailInfo?: {
>       emailAddress?: string
>     },
>     totpInfo?: {
>     },
>     enrolledAt?: string,
>     mfaEnrollmentId?: string
>   }[]
> }
> ```

> [accordion] linkProviderUserInfo full type
>
> ```ts theme={null}
> {
>   providerId?: string,
>   phoneNumber?: string,
>   email?: string,
>   federatedId?: string,
>   rawId?: string,
>   screenName?: string,
>   photoUrl?: string,
>   displayName?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | The account's display name. |
| `passwordHash` | `string \| null` | No | Deprecated. No actual password hash is currently returned. |
| `emailVerified` | `boolean \| null` | No | Whether the account's email has been verified. |
| `email` | `string \| null` | No | The account's email address. |
| `newEmail` | `string \| null` | No | The new email that has been set on the user's account attributes. |
| `expiresIn` | `string \| number \| null` | No | The number of seconds until the Identity Platform ID token expires. |
| `kind` | `string \| null` | No | — |
| `refreshToken` | `string \| null` | No | A refresh token for the account. This is used for legacy user sign up. |
| `photoUrl` | `string \| null` | No | The user's photo URL for the account's profile photo. |
| `localId` | `string \| null` | No | The ID of the authenticated user. |
| `idToken` | `string \| null` | No | An Identity Platform ID token for the account. This is used for legacy user sign up. |
| `providerUserInfo` | `object[] \| null` | No | The linked Identity Providers on the account. |

> [accordion] providerUserInfo full type
>
> ```ts theme={null}
> {
>   providerId?: string | null,
>   phoneNumber?: string | null,
>   email?: string | null,
>   federatedId?: string | null,
>   rawId?: string | null,
>   screenName?: string | null,
>   photoUrl?: string | null,
>   displayName?: string | null
> }[] | null
> ```

***

### projects.createSessionCookie

`auth.projects.createSessionCookie`

Creates a session cookie for the given Identity Platform ID token. The session cookie is used by the client to preserve the user's login state

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.auth.projects.createSessionCookie({ targetProjectId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `targetProjectId` | `string` | Yes | The ID of the project that the account belongs to. Format: `<id>`. |
| `idToken` | `string` | No | Required. A valid Identity Platform ID token. |
| `validDuration` | `string \| number` | No | The number of seconds until the session cookie expires. Specify a duration in seconds, between five minutes and fourteen days, inclusively. |
| `tenantId` | `string` | No | The tenant ID of the Identity Platform tenant the account belongs to. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `sessionCookie` | `string \| null` | No | The session cookie that has been created from the Identity Platform ID token specified in the request. It is in the form of a JSON Web Token (JWT). Always present. |

***

### projects.queryAccounts

`auth.projects.queryAccounts`

Looks up user accounts within a project or a tenant based on conditions in the request

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.auth.projects.queryAccounts({ targetProjectId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `targetProjectId` | `string` | Yes | The ID of the project to which the result is scoped. Format: `<id>`. |
| `returnUserInfo` | `boolean` | No | If `true`, this request will return the accounts matching the query. If `false`, only the **count** of accounts matching the query will be returned. Defaults to `true`. |
| `limit` | `string \| number` | No | The maximum number of accounts to return with an upper limit of **500**. Defaults to *500*. Only valid when `return_user_info` is set to `true`. |
| `sortBy` | `SORT_BY_FIELD_UNSPECIFIED \| USER_ID \| NAME \| CREATED_AT \| LAST_LOGIN_AT \| USER_EMAIL` | No | The field to use for sorting user accounts. Defaults to `USER_ID`. Note: when `phone_number` is specified in `expression`, the result ignores the sorting. Only valid when `return_user_info` is set to `true`. |
| `expression` | `object[]` | No | Query conditions used to filter results. If more than one is passed, only the first SqlExpression is evaluated. |
| `tenantId` | `string` | No | The ID of the tenant to which the result is scoped. |
| `order` | `ORDER_UNSPECIFIED \| ASC \| DESC` | No | The order for sorting query result. Defaults to **ascending** order. Only valid when `return_user_info` is set to `true`. |
| `offset` | `string \| number` | No | The number of accounts to skip from the beginning of matching records. Only valid when `return_user_info` is set to `true`. |

> [accordion] expression full type
>
> ```ts theme={null}
> {
>   userId?: string,
>   phoneNumber?: string,
>   email?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `recordsCount` | `string \| number \| null` | No | If `return_user_info` in the request is true, this is the number of returned accounts in this message. Otherwise, this is the total number of accounts matching the query. |
| `userInfo` | `object[] \| null` | No | If `return_user_info` in the request is true, this is the accounts matching the query. |

> [accordion] userInfo full type
>
> ```ts theme={null}
> {
>   screenName?: string | null,
>   passwordUpdatedAt?: number | null,
>   dateOfBirth?: string | null,
>   salt?: string | null,
>   phoneNumber?: string | null,
>   photoUrl?: string | null,
>   mfaInfo?: {
>     displayName?: string | null,
>     phoneInfo?: string | null,
>     emailInfo?: {
>       emailAddress?: string | null
>     } | null,
>     totpInfo?: {
>     } | null,
>     unobfuscatedPhoneInfo?: string | null,
>     enrolledAt?: string | null,
>     mfaEnrollmentId?: string | null
>   }[] | null,
>   emailVerified?: boolean | null,
>   localId?: string | null,
>   email?: string | null,
>   rawPassword?: string | null,
>   customAttributes?: string | null,
>   lastLoginAt?: string | number | null,
>   tenantId?: string | null,
>   displayName?: string | null,
>   initialEmail?: string | null,
>   timeZone?: string | null,
>   language?: string | null,
>   createdAt?: string | number | null,
>   version?: number | null,
>   lastRefreshAt?: string | null,
>   emailLinkSignin?: boolean | null,
>   validSince?: string | number | null,
>   customAuth?: boolean | null,
>   providerUserInfo?: {
>     providerId?: string | null,
>     phoneNumber?: string | null,
>     email?: string | null,
>     federatedId?: string | null,
>     rawId?: string | null,
>     screenName?: string | null,
>     photoUrl?: string | null,
>     displayName?: string | null
>   }[] | null,
>   disabled?: boolean | null,
>   passwordHash?: string | null
> }[] | null
> ```

***

### projects.tenants.accounts.batchCreate

`auth.projects.tenants.accounts.batchCreate`

Uploads multiple accounts into the Google Cloud project. If there is a problem uploading one or more of the accounts, the rest will be uploaded, and a list of the errors will be returned

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.auth.projects.tenants.accounts.batchCreate({ tenantId: 'x1', targetProjectId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `tenantId` | `string` | Yes | The ID of the Identity Platform tenant the account belongs to. Format: `<id>`. |
| `targetProjectId` | `string` | Yes | The Project ID of the Identity Platform project which the account belongs to. Format: `<id>`. |
| `cpuMemCost` | `number` | No | The CPU memory cost parameter to be used by the STANDARD\_SCRYPT hashing function. This parameter, along with block\_size and cpu\_mem\_cost help tune the resources needed to hash a password, and should be tuned as processor speeds and memory technologies advance. |
| `hashAlgorithm` | `string` | No | Required. The hashing function used to hash the account passwords. Must be one of the following: \* HMAC\_SHA256 \* HMAC\_SHA1 \* HMAC\_MD5 \* SCRYPT \* PBKDF\_SHA1 \* MD5 \* HMAC\_SHA512 \* SHA1 \* BCRYPT \* PBKDF2\_SHA256 \* SHA256 \* SHA512 \* STANDARD\_SCRYPT \* ARGON2 |
| `passwordHashOrder` | `UNSPECIFIED_ORDER \| SALT_AND_PASSWORD \| PASSWORD_AND_SALT` | No | Password and salt order when verify password. |
| `parallelization` | `number` | No | The parallelization cost parameter to be used by the STANDARD\_SCRYPT hashing function. This parameter, along with block\_size and cpu\_mem\_cost help tune the resources needed to hash a password, and should be tuned as processor speeds and memory technologies advance. |
| `dkLen` | `number` | No | The desired key length for the STANDARD\_SCRYPT hashing function. Must be at least 1. |
| `saltSeparator` | `string` | No | One or more bytes to be inserted between the salt and plain text password. For stronger security, this should be a single non-printable character. (base64) |
| `users` | `object[]` | No | A list of accounts to upload. `local_id` is required for each user; everything else is optional. |
| `signerKey` | `string` | No | The signer key used to hash the password. Required for the following hashing functions: \* SCRYPT, \* HMAC\_MD5, \* HMAC\_SHA1, \* HMAC\_SHA256, \* HMAC\_SHA512 (base64) |
| `sanityCheck` | `boolean` | No | If true, the service will do the following list of checks before an account is uploaded: \* Duplicate emails \* Duplicate federated IDs \* Federated ID provider validation If the duplication exists within the list of accounts to be uploaded, it will prevent the entire list from being uploaded. If the email or federated ID is a duplicate of a user already within the project/tenant, the account will not be uploaded, but the rest of the accounts will be unaffected. If false, these checks will be skipped. |
| `rounds` | `number` | No | The number of rounds used for hash calculation. Only required for the following hashing functions: \* MD5 \* SHA1 \* SHA256 \* SHA512 \* PBKDF\_SHA1 \* PBKDF2\_SHA256 \* SCRYPT |
| `body_tenantId` | `string` | No | The ID of the Identity Platform tenant the account belongs to. |
| `memoryCost` | `number` | No | Memory cost for hash calculation. Only required when the hashing function is SCRYPT. |
| `argon2Parameters` | `object` | No | The parameters for Argon2 hashing algorithm. |
| `blockSize` | `number` | No | The block size parameter used by the STANDARD\_SCRYPT hashing function. This parameter, along with parallelization and cpu\_mem\_cost help tune the resources needed to hash a password, and should be tuned as processor speeds and memory technologies advance. |
| `allowOverwrite` | `boolean` | No | Whether to overwrite an existing account in Identity Platform with a matching `local_id` in the request. If true, the existing account will be overwritten. If false, an error will be returned. |
| `delegatedProjectNumber` | `string \| number` | No | — |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   passwordUpdatedAt?: number,
>   salt?: string,
>   phoneNumber?: string,
>   photoUrl?: string,
>   mfaInfo?: {
>     displayName?: string,
>     phoneInfo?: string,
>     emailInfo?: {
>       emailAddress?: string
>     },
>     totpInfo?: {
>     },
>     enrolledAt?: string,
>     mfaEnrollmentId?: string
>   }[],
>   emailVerified?: boolean,
>   localId?: string,
>   email?: string,
>   rawPassword?: string,
>   customAttributes?: string,
>   lastLoginAt?: string | number,
>   tenantId?: string,
>   displayName?: string,
>   initialEmail?: string,
>   createdAt?: string | number,
>   version?: number,
>   lastRefreshAt?: string,
>   validSince?: string | number,
>   providerUserInfo?: {
>     providerId?: string,
>     phoneNumber?: string,
>     email?: string,
>     federatedId?: string,
>     rawId?: string,
>     screenName?: string,
>     photoUrl?: string,
>     displayName?: string
>   }[],
>   disabled?: boolean,
>   passwordHash?: string
> }[]
> ```

> [accordion] argon2Parameters full type
>
> ```ts theme={null}
> {
>   associatedData?: string,
>   iterations?: number,
>   hashLengthBytes?: number,
>   parallelism?: number,
>   memoryCostKib?: number,
>   version?: VERSION_UNSPECIFIED | VERSION_10 | VERSION_13,
>   hashType?: HASH_TYPE_UNSPECIFIED | ARGON2_D | ARGON2_ID | ARGON2_I
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object[] \| null` | No | Detailed error info for accounts that cannot be uploaded. |
| `kind` | `string \| null` | No | — |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   index?: number | null,
>   message?: string | null
> }[] | null
> ```

***

### projects.tenants.accounts.batchDelete

`auth.projects.tenants.accounts.batchDelete`

Batch deletes multiple accounts. For accounts that fail to be deleted, error info is contained in the response

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.auth.projects.tenants.accounts.batchDelete({ targetProjectId: 'x1', tenantId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `targetProjectId` | `string` | Yes | If `tenant_id` is specified, the ID of the Google Cloud project that the Identity Platform tenant belongs to. Otherwise, the ID of the Google Cloud project that accounts belong to. Format: `<id>`. |
| `tenantId` | `string` | Yes | If the accounts belong to an Identity Platform tenant, the ID of the tenant. If the accounts belong to a default Identity Platform project, the field is not needed. Format: `<id>`. |
| `body_tenantId` | `string` | No | If the accounts belong to an Identity Platform tenant, the ID of the tenant. If the accounts belong to a default Identity Platform project, the field is not needed. |
| `force` | `boolean` | No | Whether to force deleting accounts that are not in disabled state. If false, only disabled accounts will be deleted, and accounts that are not disabled will be added to the `errors`. |
| `localIds` | `string[]` | No | Required. List of user IDs to be deleted. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `errors` | `object[] \| null` | No | Detailed error info for accounts that cannot be deleted. |

> [accordion] errors full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   localId?: string | null,
>   index?: number | null
> }[] | null
> ```

***

### projects.tenants.accounts.batchGet

`auth.projects.tenants.accounts.batchGet`

Download account information for all accounts on the project in a paginated manner. To use this method requires a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.auth.projects.tenants.accounts.batchGet({ targetProjectId: 'x1', tenantId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `delegatedProjectNumber` | `string \| number` | No | — |
| `nextPageToken` | `string` | No | The pagination token from the response of a previous request. |
| `maxResults` | `number` | No | The maximum number of results to return. Must be at least 1 and no greater than 1000. By default, it is 20. |
| `targetProjectId` | `string` | Yes | If `tenant_id` is specified, the ID of the Google Cloud project that the Identity Platform tenant belongs to. Otherwise, the ID of the Google Cloud project that the accounts belong to. Format: `<id>`. |
| `tenantId` | `string` | Yes | The ID of the Identity Platform tenant the accounts belongs to. If not specified, accounts on the Identity Platform project are returned. Format: `<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | — |
| `users` | `object[] \| null` | No | All accounts belonging to the project/tenant limited by max\_results in the request. |
| `nextPageToken` | `string \| null` | No | If there are more accounts to be downloaded, a token that can be passed back to DownloadAccount to get more accounts. Otherwise, this is blank. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   screenName?: string | null,
>   passwordUpdatedAt?: number | null,
>   dateOfBirth?: string | null,
>   salt?: string | null,
>   phoneNumber?: string | null,
>   photoUrl?: string | null,
>   mfaInfo?: {
>     displayName?: string | null,
>     phoneInfo?: string | null,
>     emailInfo?: {
>       emailAddress?: string | null
>     } | null,
>     totpInfo?: {
>     } | null,
>     unobfuscatedPhoneInfo?: string | null,
>     enrolledAt?: string | null,
>     mfaEnrollmentId?: string | null
>   }[] | null,
>   emailVerified?: boolean | null,
>   localId?: string | null,
>   email?: string | null,
>   rawPassword?: string | null,
>   customAttributes?: string | null,
>   lastLoginAt?: string | number | null,
>   tenantId?: string | null,
>   displayName?: string | null,
>   initialEmail?: string | null,
>   timeZone?: string | null,
>   language?: string | null,
>   createdAt?: string | number | null,
>   version?: number | null,
>   lastRefreshAt?: string | null,
>   emailLinkSignin?: boolean | null,
>   validSince?: string | number | null,
>   customAuth?: boolean | null,
>   providerUserInfo?: {
>     providerId?: string | null,
>     phoneNumber?: string | null,
>     email?: string | null,
>     federatedId?: string | null,
>     rawId?: string | null,
>     screenName?: string | null,
>     photoUrl?: string | null,
>     displayName?: string | null
>   }[] | null,
>   disabled?: boolean | null,
>   passwordHash?: string | null
> }[] | null
> ```

***

### projects.tenants.accounts.create

`auth.projects.tenants.accounts.create`

Signs up a new email and password user or anonymous user, or upgrades an anonymous user to email and password. For an admin request with a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control), creates a new anonymous, email and password, or phone number user

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.auth.projects.tenants.accounts.create({ targetProjectId: 'x1', tenantId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `targetProjectId` | `string` | Yes | The project ID of the project which the user should belong to. Specifying this field requires a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). If this is not set, the target project is inferred from the scope associated to the Bearer access token. Format: `<id>`. |
| `tenantId` | `string` | Yes | The ID of the Identity Platform tenant to create a user under. If not set, the user will be created under the default Identity Platform project. Format: `<id>`. |
| `email` | `string` | No | The email to assign to the created user. The length of the email should be less than 256 characters and in the format of `name@domain.tld`. The email should also match the [RFC 822](https://tools.ietf.org/html/rfc822) addr-spec production. An anonymous user will be created if not provided. |
| `password` | `string` | No | The password to assign to the created user. The password must be be at least 6 characters long. If set, the `email` field must also be set. |
| `photoUrl` | `string` | No | The profile photo url of the user to create. |
| `instanceId` | `string` | No | — |
| `body_targetProjectId` | `string` | No | The project ID of the project which the user should belong to. Specifying this field requires a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). If this is not set, the target project is inferred from the scope associated to the Bearer access token. |
| `localId` | `string` | No | The ID of the user to create. The ID must be unique within the project that the user is being created under. Specifying this field requires a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `body_tenantId` | `string` | No | The ID of the Identity Platform tenant to create a user under. If not set, the user will be created under the default Identity Platform project. |
| `emailVerified` | `boolean` | No | Whether the user's email is verified. Specifying this field requires a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `captchaChallenge` | `string` | No | — |
| `mfaInfo` | `object[]` | No | The multi-factor authentication providers for the user to create. |
| `disabled` | `boolean` | No | Whether the user will be disabled upon creation. Disabled accounts are inaccessible except for requests bearing a Google OAuth2 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `clientType` | `CLIENT_TYPE_UNSPECIFIED \| CLIENT_TYPE_WEB \| CLIENT_TYPE_ANDROID \| CLIENT_TYPE_IOS` | No | The client type: web, Android or iOS. Required when enabling reCAPTCHA enterprise protection. |
| `displayName` | `string` | No | The display name of the user to be created. |
| `idToken` | `string` | No | A valid ID token for an Identity Platform user. If set, this request will link the authentication credential to the user represented by this ID token. For a non-admin request, both the `email` and `password` fields must be set. For an admin request, `local_id` must not be set. |
| `recaptchaVersion` | `RECAPTCHA_VERSION_UNSPECIFIED \| RECAPTCHA_ENTERPRISE` | No | The reCAPTCHA version of the reCAPTCHA token in the captcha\_response. |
| `captchaResponse` | `string` | No | The reCAPTCHA token provided by the reCAPTCHA client-side integration. reCAPTCHA Enterprise uses it for assessment. Required when reCAPTCHA enterprise is enabled. |
| `phoneNumber` | `string` | No | The phone number of the user to create. Specifying this field requires a Google OAuth 2.0 credential with the proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |

> [accordion] mfaInfo full type
>
> ```ts theme={null}
> {
>   phoneInfo?: string,
>   displayName?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `localId` | `string \| null` | No | The ID of the created user. Always present in the response. |
| `displayName` | `string \| null` | No | The created user's display name. |
| `expiresIn` | `string \| number \| null` | No | The number of seconds until the ID token expires. |
| `idToken` | `string \| null` | No | An Identity Platform ID token for the created user. This field is only set for non-admin requests. |
| `refreshToken` | `string \| null` | No | An Identity Platform refresh token for the created user. This field is only set for non-admin requests. |
| `email` | `string \| null` | No | The created user's email. |
| `kind` | `string \| null` | No | — |

***

### projects.tenants.accounts.delete

`auth.projects.tenants.accounts.delete`

Deletes a user's account

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.auth.projects.tenants.accounts.delete({ targetProjectId: 'x1', tenantId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `targetProjectId` | `string` | Yes | The ID of the project which the account belongs to. Should only be specified in authenticated requests that specify local\_id of an account. Format: `<id>`. |
| `tenantId` | `string` | Yes | The ID of the tenant that the account belongs to, if applicable. Only require to be specified for authenticated requests bearing a Google OAuth 2.0 credential that specify local\_id of an account that belongs to an Identity Platform tenant. Format: `<id>`. |
| `delegatedProjectNumber` | `string \| number` | No | — |
| `body_targetProjectId` | `string` | No | The ID of the project which the account belongs to. Should only be specified in authenticated requests that specify local\_id of an account. |
| `idToken` | `string` | No | The Identity Platform ID token of the account to delete. Require to be specified for requests from end users that lack Google OAuth 2.0 credential. Authenticated requests bearing a Google OAuth2 credential with proper permissions may pass local\_id to specify the account to delete alternatively. |
| `body_tenantId` | `string` | No | The ID of the tenant that the account belongs to, if applicable. Only require to be specified for authenticated requests bearing a Google OAuth 2.0 credential that specify local\_id of an account that belongs to an Identity Platform tenant. |
| `localId` | `string` | No | The ID of user account to delete. Specifying this field requires a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). Requests from users lacking the credential should pass an ID token instead. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | — |

***

### projects.tenants.accounts.lookup

`auth.projects.tenants.accounts.lookup`

Gets account information for all matched accounts. For an end user request, retrieves the account of the end user

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.auth.projects.tenants.accounts.lookup({ targetProjectId: 'x1', tenantId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `targetProjectId` | `string` | Yes | The ID of the Google Cloud project that the account or the Identity Platform tenant specified by `tenant_id` belongs to. Should only be specified by authenticated requests bearing a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). Format: `<id>`. |
| `tenantId` | `string` | Yes | The ID of the tenant that the account belongs to. Should only be specified by authenticated requests from a developer. Format: `<id>`. |
| `phoneNumber` | `string[]` | No | The phone number of one or more accounts to fetch. Should only be specified by authenticated requests from a developer and should be in E.164 format, for example, +15555555555. |
| `body_tenantId` | `string` | No | The ID of the tenant that the account belongs to. Should only be specified by authenticated requests from a developer. |
| `initialEmail` | `string[]` | No | The initial email of one or more accounts to fetch. The length of email should be less than 256 characters and in the format of `name@domain.tld`. The email should also match the [RFC 822](https://tools.ietf.org/html/rfc822) addr-spec production. Should only be specified by authenticated requests from a developer. |
| `body_targetProjectId` | `string` | No | The ID of the Google Cloud project that the account or the Identity Platform tenant specified by `tenant_id` belongs to. Should only be specified by authenticated requests bearing a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `email` | `string[]` | No | The email address of one or more accounts to fetch. The length of email should be less than 256 characters and in the format of `name@domain.tld`. The email should also match the [RFC 822](https://tools.ietf.org/html/rfc822) addr-spec production. Should only be specified by authenticated requests from a developer. |
| `delegatedProjectNumber` | `string \| number` | No | — |
| `localId` | `string[]` | No | The ID of one or more accounts to fetch. Should only be specified by authenticated requests bearing a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `idToken` | `string` | No | The Identity Platform ID token of the account to fetch. Require to be specified for requests from end users. |
| `federatedUserId` | `object[]` | No | The federated user identifier of one or more accounts to fetch. Should only be specified by authenticated requests bearing a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |

> [accordion] federatedUserId full type
>
> ```ts theme={null}
> {
>   rawId?: string,
>   providerId?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | — |
| `users` | `object[] \| null` | No | The information of specific user account(s) matching the parameters in the request. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   screenName?: string | null,
>   passwordUpdatedAt?: number | null,
>   dateOfBirth?: string | null,
>   salt?: string | null,
>   phoneNumber?: string | null,
>   photoUrl?: string | null,
>   mfaInfo?: {
>     displayName?: string | null,
>     phoneInfo?: string | null,
>     emailInfo?: {
>       emailAddress?: string | null
>     } | null,
>     totpInfo?: {
>     } | null,
>     unobfuscatedPhoneInfo?: string | null,
>     enrolledAt?: string | null,
>     mfaEnrollmentId?: string | null
>   }[] | null,
>   emailVerified?: boolean | null,
>   localId?: string | null,
>   email?: string | null,
>   rawPassword?: string | null,
>   customAttributes?: string | null,
>   lastLoginAt?: string | number | null,
>   tenantId?: string | null,
>   displayName?: string | null,
>   initialEmail?: string | null,
>   timeZone?: string | null,
>   language?: string | null,
>   createdAt?: string | number | null,
>   version?: number | null,
>   lastRefreshAt?: string | null,
>   emailLinkSignin?: boolean | null,
>   validSince?: string | number | null,
>   customAuth?: boolean | null,
>   providerUserInfo?: {
>     providerId?: string | null,
>     phoneNumber?: string | null,
>     email?: string | null,
>     federatedId?: string | null,
>     rawId?: string | null,
>     screenName?: string | null,
>     photoUrl?: string | null,
>     displayName?: string | null
>   }[] | null,
>   disabled?: boolean | null,
>   passwordHash?: string | null
> }[] | null
> ```

***

### projects.tenants.accounts.query

`auth.projects.tenants.accounts.query`

Looks up user accounts within a project or a tenant based on conditions in the request

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.auth.projects.tenants.accounts.query({ targetProjectId: 'x1', tenantId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `targetProjectId` | `string` | Yes | The ID of the project to which the result is scoped. Format: `<id>`. |
| `tenantId` | `string` | Yes | The ID of the tenant to which the result is scoped. Format: `<id>`. |
| `returnUserInfo` | `boolean` | No | If `true`, this request will return the accounts matching the query. If `false`, only the **count** of accounts matching the query will be returned. Defaults to `true`. |
| `limit` | `string \| number` | No | The maximum number of accounts to return with an upper limit of **500**. Defaults to *500*. Only valid when `return_user_info` is set to `true`. |
| `sortBy` | `SORT_BY_FIELD_UNSPECIFIED \| USER_ID \| NAME \| CREATED_AT \| LAST_LOGIN_AT \| USER_EMAIL` | No | The field to use for sorting user accounts. Defaults to `USER_ID`. Note: when `phone_number` is specified in `expression`, the result ignores the sorting. Only valid when `return_user_info` is set to `true`. |
| `expression` | `object[]` | No | Query conditions used to filter results. If more than one is passed, only the first SqlExpression is evaluated. |
| `body_tenantId` | `string` | No | The ID of the tenant to which the result is scoped. |
| `order` | `ORDER_UNSPECIFIED \| ASC \| DESC` | No | The order for sorting query result. Defaults to **ascending** order. Only valid when `return_user_info` is set to `true`. |
| `offset` | `string \| number` | No | The number of accounts to skip from the beginning of matching records. Only valid when `return_user_info` is set to `true`. |

> [accordion] expression full type
>
> ```ts theme={null}
> {
>   userId?: string,
>   phoneNumber?: string,
>   email?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `recordsCount` | `string \| number \| null` | No | If `return_user_info` in the request is true, this is the number of returned accounts in this message. Otherwise, this is the total number of accounts matching the query. |
| `userInfo` | `object[] \| null` | No | If `return_user_info` in the request is true, this is the accounts matching the query. |

> [accordion] userInfo full type
>
> ```ts theme={null}
> {
>   screenName?: string | null,
>   passwordUpdatedAt?: number | null,
>   dateOfBirth?: string | null,
>   salt?: string | null,
>   phoneNumber?: string | null,
>   photoUrl?: string | null,
>   mfaInfo?: {
>     displayName?: string | null,
>     phoneInfo?: string | null,
>     emailInfo?: {
>       emailAddress?: string | null
>     } | null,
>     totpInfo?: {
>     } | null,
>     unobfuscatedPhoneInfo?: string | null,
>     enrolledAt?: string | null,
>     mfaEnrollmentId?: string | null
>   }[] | null,
>   emailVerified?: boolean | null,
>   localId?: string | null,
>   email?: string | null,
>   rawPassword?: string | null,
>   customAttributes?: string | null,
>   lastLoginAt?: string | number | null,
>   tenantId?: string | null,
>   displayName?: string | null,
>   initialEmail?: string | null,
>   timeZone?: string | null,
>   language?: string | null,
>   createdAt?: string | number | null,
>   version?: number | null,
>   lastRefreshAt?: string | null,
>   emailLinkSignin?: boolean | null,
>   validSince?: string | number | null,
>   customAuth?: boolean | null,
>   providerUserInfo?: {
>     providerId?: string | null,
>     phoneNumber?: string | null,
>     email?: string | null,
>     federatedId?: string | null,
>     rawId?: string | null,
>     screenName?: string | null,
>     photoUrl?: string | null,
>     displayName?: string | null
>   }[] | null,
>   disabled?: boolean | null,
>   passwordHash?: string | null
> }[] | null
> ```

***

### projects.tenants.accounts.sendOobCode

`auth.projects.tenants.accounts.sendOobCode`

Sends an out-of-band confirmation code for an account. Requests from a authenticated request can optionally return a link including the OOB code instead of sending it

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.auth.projects.tenants.accounts.sendOobCode({ targetProjectId: 'x1', tenantId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `targetProjectId` | `string` | Yes | The Project ID of the Identity Platform project which the account belongs to. To specify this field, it requires a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). Format: `<id>`. |
| `tenantId` | `string` | Yes | The tenant ID of the Identity Platform tenant the account belongs to. Format: `<id>`. |
| `captchaResp` | `string` | No | For a PASSWORD\_RESET request, a reCaptcha response is required when the system detects possible abuse activity. In those cases, this is the response from the reCaptcha challenge used to verify the caller. |
| `email` | `string` | No | The account's email address to send the OOB code to, and generally the email address of the account that needs to be updated. Required for PASSWORD\_RESET, EMAIL\_SIGNIN, and VERIFY\_EMAIL. Only required for VERIFY\_AND\_CHANGE\_EMAIL requests when return\_oob\_link is set to true. In this case, it is the original email of the user. |
| `clientType` | `CLIENT_TYPE_UNSPECIFIED \| CLIENT_TYPE_WEB \| CLIENT_TYPE_ANDROID \| CLIENT_TYPE_IOS` | No | The client type: web, Android or iOS. Required when reCAPTCHA Enterprise protection is enabled. |
| `body_targetProjectId` | `string` | No | The Project ID of the Identity Platform project which the account belongs to. To specify this field, it requires a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control). |
| `continueUrl` | `string` | No | The Url to continue after user clicks the link sent in email. This is the url that will allow the web widget to handle the OOB code. |
| `body_tenantId` | `string` | No | The tenant ID of the Identity Platform tenant the account belongs to. |
| `androidMinimumVersion` | `string` | No | If an associated android app can handle the OOB code, the minimum version of the app. If the version on the device is lower than this version then the user is taken to Google Play Store to upgrade the app. |
| `dynamicLinkDomain` | `string` | No | In order to ensure that the url used can be easily opened up in iOS or android, we create a [Firebase Dynamic Link](https://firebase.google.com/docs/dynamic-links). Most Identity Platform projects will only have one Dynamic Link domain enabled, and can leave this field blank. This field contains a specified Dynamic Link domain for projects that have multiple enabled. |
| `idToken` | `string` | No | An ID token for the account. It is required for VERIFY\_AND\_CHANGE\_EMAIL and VERIFY\_EMAIL requests unless return\_oob\_link is set to true. |
| `challenge` | `string` | No | — |
| `requestType` | `OOB_REQ_TYPE_UNSPECIFIED \| PASSWORD_RESET \| OLD_EMAIL_AGREE \| NEW_EMAIL_ACCEPT \| VERIFY_EMAIL \| RECOVER_EMAIL \| EMAIL_SIGNIN \| VERIFY_AND_CHANGE_EMAIL \| REVERT_SECOND_FACTOR_ADDITION` | No | Required. The type of out-of-band (OOB) code to send. Depending on this value, other fields in this request will be required and/or have different meanings. There are 4 different OOB codes that can be sent: \* PASSWORD\_RESET \* EMAIL\_SIGNIN \* VERIFY\_EMAIL \* VERIFY\_AND\_CHANGE\_EMAIL |
| `canHandleCodeInApp` | `boolean` | No | When set to true, the OOB code link will be be sent as a Universal Link or an Android App Link and will be opened by the corresponding app if installed. If not set, or set to false, the OOB code will be sent to the web widget first and then on continue will redirect to the app if installed. |
| `newEmail` | `string` | No | The email address the account is being updated to. Required only for VERIFY\_AND\_CHANGE\_EMAIL requests. |
| `iOSBundleId` | `string` | No | If an associated iOS app can handle the OOB code, the iOS bundle id of this app. This will allow the correct app to open if it is already installed. |
| `iOSAppStoreId` | `string` | No | If an associated iOS app can handle the OOB code, the App Store id of this app. This will allow App Store to open to the correct app if the app is not yet installed. |
| `recaptchaVersion` | `RECAPTCHA_VERSION_UNSPECIFIED \| RECAPTCHA_ENTERPRISE` | No | The reCAPTCHA version of the reCAPTCHA token in the captcha\_response. |
| `androidPackageName` | `string` | No | If an associated android app can handle the OOB code, the Android package name of the android app that will handle the callback when this OOB code is used. This will allow the correct app to open if it is already installed, or allow Google Play Store to open to the correct app if it is not yet installed. |
| `userIp` | `string` | No | The IP address of the caller. Required only for PASSWORD\_RESET requests. |
| `linkDomain` | `string` | No | Optional. In order to ensure that the url used can be easily opened in iOS or Android, we create a Hosting link '/\_\_/auth/links'. This optional field contains the domain to use when constructing a Hosting link. If not set, '.firebaseapp.com' domain will be used. |
| `androidInstallApp` | `boolean` | No | If an associated android app can handle the OOB code, whether or not to install the android app on the device where the link is opened if the app is not already installed. |
| `returnOobLink` | `boolean` | No | Whether the confirmation link containing the OOB code should be returned in the response (no email is sent). Used when a developer wants to construct the email template and send it on their own. By default this is false; to specify this field, and to set it to true, it requires a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | — |
| `email` | `string \| null` | No | If return\_oob\_link is false in the request, the email address the verification was sent to. |
| `oobLink` | `string \| null` | No | If return\_oob\_link is true in the request, the OOB link to be sent to the user. This returns the constructed link including [Firebase Dynamic Link](https://firebase.google.com/docs/dynamic-links) related parameters. |
| `oobCode` | `string \| null` | No | If return\_oob\_link is true in the request, the OOB code to send. |

***

### projects.tenants.accounts.update

`auth.projects.tenants.accounts.update`

Updates account-related information for the specified user by setting specific fields or applying action codes. Requests from administrators and end users are supported

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.auth.projects.tenants.accounts.update({ tenantId: 'x1', targetProjectId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `tenantId` | `string` | Yes | The tenant ID of the Identity Platform tenant that the account belongs to. Requests from end users should pass an Identity Platform ID token rather than setting this field. Format: `<id>`. |
| `targetProjectId` | `string` | Yes | The project ID for the project that the account belongs to. Specifying this field requires Google OAuth 2.0 credential with proper \[permissions] ([https://cloud.google.com/identity-platform/docs/access-control](https://cloud.google.com/identity-platform/docs/access-control)). Requests from end users should pass an Identity Platform ID token instead. Format: `<id>`. |
| `emailVerified` | `boolean` | No | Whether the user's email has been verified. Specifying this field requires a Google OAuth 2.0 credential with proper \[permissions] ([https://cloud.google.com/identity-platform/docs/access-control](https://cloud.google.com/identity-platform/docs/access-control)). |
| `email` | `string` | No | The user's new email to be updated in the account's attributes. The length of email should be less than 256 characters and in the format of `name@domain.tld`. The email should also match the [RFC 822](https://tools.ietf.org/html/rfc822) addr-spec production. If [email enumeration protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled, the email cannot be changed by the user without verifying the email first, but it can be changed by an administrator. |
| `localId` | `string` | No | The ID of the user. Specifying this field requires a Google OAuth 2.0 credential with proper \[permissions] ([https://cloud.google.com/identity-platform/docs/access-control](https://cloud.google.com/identity-platform/docs/access-control)). For requests from end-users, an ID token should be passed instead. |
| `mfa` | `object` | No | Multi-factor authentication related information. |
| `captchaChallenge` | `string` | No | — |
| `phoneNumber` | `string` | No | The phone number to be updated in the account's attributes. |
| `upgradeToFederatedLogin` | `boolean` | No | Whether the account should be restricted to only using federated login. |
| `validSince` | `string \| number` | No | Specifies the minimum timestamp in seconds for an Identity Platform ID token to be considered valid. |
| `lastLoginAt` | `string \| number` | No | The timestamp in milliseconds when the account last logged in. |
| `captchaResponse` | `string` | No | The response from reCaptcha challenge. This is required when the system detects possible abuse activities. |
| `delegatedProjectNumber` | `string \| number` | No | — |
| `createdAt` | `string \| number` | No | The timestamp in milliseconds when the account was created. |
| `customAttributes` | `string` | No | JSON formatted custom attributes to be stored in the Identity Platform ID token. Specifying this field requires a Google OAuth 2.0 credential with proper \[permissions] ([https://cloud.google.com/identity-platform/docs/access-control](https://cloud.google.com/identity-platform/docs/access-control)). |
| `provider` | `string[]` | No | The Identity Providers that the account should be associated with. |
| `body_tenantId` | `string` | No | The tenant ID of the Identity Platform tenant that the account belongs to. Requests from end users should pass an Identity Platform ID token rather than setting this field. |
| `instanceId` | `string` | No | — |
| `deleteProvider` | `string[]` | No | The Identity Providers to unlink from the user's account. |
| `displayName` | `string` | No | The user's new display name to be updated in the account's attributes. The length of the display name must be less than or equal to 256 characters. |
| `deleteAttribute` | `(USER_ATTRIBUTE_NAME_UNSPECIFIED \| EMAIL \| DISPLAY_NAME \| PROVIDER \| PHOTO_URL \| PASSWORD \| RAW_USER_INFO)[]` | No | The account's attributes to be deleted. |
| `body_targetProjectId` | `string` | No | The project ID for the project that the account belongs to. Specifying this field requires Google OAuth 2.0 credential with proper \[permissions] ([https://cloud.google.com/identity-platform/docs/access-control](https://cloud.google.com/identity-platform/docs/access-control)). Requests from end users should pass an Identity Platform ID token instead. |
| `oobCode` | `string` | No | The out-of-band code to be applied on the user's account. The following out-of-band code types are supported: \* VERIFY\_EMAIL \* RECOVER\_EMAIL \* REVERT\_SECOND\_FACTOR\_ADDITION \* VERIFY\_AND\_CHANGE\_EMAIL |
| `returnSecureToken` | `boolean` | No | Whether or not to return an ID and refresh token. Should always be true. |
| `password` | `string` | No | The user's new password to be updated in the account's attributes. The password must be at least 6 characters long. |
| `photoUrl` | `string` | No | The user's new photo URL for the account's profile photo to be updated in the account's attributes. The length of the URL must be less than or equal to 2048 characters. |
| `idToken` | `string` | No | A valid Identity Platform ID token. Required when attempting to change user-related information. |
| `linkProviderUserInfo` | `object` | No | Information about the user as provided by various Identity Providers. |
| `disableUser` | `boolean` | No | If true, marks the account as disabled, meaning the user will no longer be able to sign-in. |

> [accordion] mfa full type
>
> ```ts theme={null}
> {
>   enrollments?: {
>     displayName?: string,
>     phoneInfo?: string,
>     emailInfo?: {
>       emailAddress?: string
>     },
>     totpInfo?: {
>     },
>     enrolledAt?: string,
>     mfaEnrollmentId?: string
>   }[]
> }
> ```

> [accordion] linkProviderUserInfo full type
>
> ```ts theme={null}
> {
>   providerId?: string,
>   phoneNumber?: string,
>   email?: string,
>   federatedId?: string,
>   rawId?: string,
>   screenName?: string,
>   photoUrl?: string,
>   displayName?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | The account's display name. |
| `passwordHash` | `string \| null` | No | Deprecated. No actual password hash is currently returned. |
| `emailVerified` | `boolean \| null` | No | Whether the account's email has been verified. |
| `email` | `string \| null` | No | The account's email address. |
| `newEmail` | `string \| null` | No | The new email that has been set on the user's account attributes. |
| `expiresIn` | `string \| number \| null` | No | The number of seconds until the Identity Platform ID token expires. |
| `kind` | `string \| null` | No | — |
| `refreshToken` | `string \| null` | No | A refresh token for the account. This is used for legacy user sign up. |
| `photoUrl` | `string \| null` | No | The user's photo URL for the account's profile photo. |
| `localId` | `string \| null` | No | The ID of the authenticated user. |
| `idToken` | `string \| null` | No | An Identity Platform ID token for the account. This is used for legacy user sign up. |
| `providerUserInfo` | `object[] \| null` | No | The linked Identity Providers on the account. |

> [accordion] providerUserInfo full type
>
> ```ts theme={null}
> {
>   providerId?: string | null,
>   phoneNumber?: string | null,
>   email?: string | null,
>   federatedId?: string | null,
>   rawId?: string | null,
>   screenName?: string | null,
>   photoUrl?: string | null,
>   displayName?: string | null
> }[] | null
> ```

***

### projects.tenants.createSessionCookie

`auth.projects.tenants.createSessionCookie`

Creates a session cookie for the given Identity Platform ID token. The session cookie is used by the client to preserve the user's login state

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.auth.projects.tenants.createSessionCookie({ targetProjectId: 'x1', tenantId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `targetProjectId` | `string` | Yes | The ID of the project that the account belongs to. Format: `<id>`. |
| `tenantId` | `string` | Yes | The tenant ID of the Identity Platform tenant the account belongs to. Format: `<id>`. |
| `idToken` | `string` | No | Required. A valid Identity Platform ID token. |
| `validDuration` | `string \| number` | No | The number of seconds until the session cookie expires. Specify a duration in seconds, between five minutes and fourteen days, inclusively. |
| `body_tenantId` | `string` | No | The tenant ID of the Identity Platform tenant the account belongs to. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `sessionCookie` | `string \| null` | No | The session cookie that has been created from the Identity Platform ID token specified in the request. It is in the form of a JSON Web Token (JWT). Always present. |

***

## Auth Admin

### accounts.mfaEnrollment.finalize

`authAdmin.accounts.mfaEnrollment.finalize`

Finishes enrolling a second factor for the user

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.accounts.mfaEnrollment.finalize({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string` | No | Display name which is entered by users to distinguish between different second factors with same type or different type. |
| `totpVerificationInfo` | `object` | No | Mfa request info specific to TOTP auth for FinalizeMfa. |
| `phoneVerificationInfo` | `object` | No | Phone Verification info for a FinalizeMfa request. |
| `tenantId` | `string` | No | The ID of the Identity Platform tenant that the user enrolling MFA belongs to. If not set, the user belongs to the default Identity Platform project. |
| `idToken` | `string` | No | Required. ID token. |

> [accordion] totpVerificationInfo full type
>
> ```ts theme={null}
> {
>   sessionInfo?: string,
>   verificationCode?: string
> }
> ```

> [accordion] phoneVerificationInfo full type
>
> ```ts theme={null}
> {
>   androidVerificationProof?: string,
>   code?: string,
>   sessionInfo?: string,
>   phoneNumber?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `refreshToken` | `string \| null` | No | Refresh token updated to reflect MFA enrollment. |
| `idToken` | `string \| null` | No | ID token updated to reflect MFA enrollment. |
| `totpAuthInfo` | `object \| null` | No | Mfa response info specific to TOTP auth for FinalizeMfa. |
| `phoneAuthInfo` | `object \| null` | No | Phone Verification info for a FinalizeMfa response. |

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

> [accordion] phoneAuthInfo full type
>
> ```ts theme={null}
> {
>   androidVerificationProof?: string | null,
>   phoneNumber?: string | null,
>   androidVerificationProofExpireTime?: string | null
> } | null
> ```

***

### accounts.mfaEnrollment.start

`authAdmin.accounts.mfaEnrollment.start`

Step one of the MFA enrollment process. In SMS case, this sends an SMS verification code to the user

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.authAdmin.accounts.mfaEnrollment.start({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `idToken` | `string` | No | Required. User's ID token. |
| `tenantId` | `string` | No | The ID of the Identity Platform tenant that the user enrolling MFA belongs to. If not set, the user belongs to the default Identity Platform project. |
| `phoneEnrollmentInfo` | `object` | No | App Verification info for a StartMfa request. |
| `totpEnrollmentInfo` | `object` | No | Mfa request info specific to TOTP auth for StartMfa. |

> [accordion] phoneEnrollmentInfo full type
>
> ```ts theme={null}
> {
>   autoRetrievalInfo?: {
>     appSignatureHash?: string
>   },
>   playIntegrityToken?: string,
>   safetyNetToken?: string,
>   clientType?: CLIENT_TYPE_UNSPECIFIED | CLIENT_TYPE_WEB | CLIENT_TYPE_ANDROID | CLIENT_TYPE_IOS,
>   iosSecret?: string,
>   phoneNumber?: string,
>   recaptchaToken?: string,
>   recaptchaVersion?: RECAPTCHA_VERSION_UNSPECIFIED | RECAPTCHA_ENTERPRISE,
>   iosReceipt?: string,
>   captchaResponse?: string
> }
> ```

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `phoneSessionInfo` | `object \| null` | No | Phone Verification info for a StartMfa response. |
| `totpSessionInfo` | `object \| null` | No | Mfa response info specific to TOTP auth for StartMfa. |

> [accordion] phoneSessionInfo full type
>
> ```ts theme={null}
> {
>   sessionInfo?: string | null
> } | null
> ```

> [accordion] totpSessionInfo full type
>
> ```ts theme={null}
> {
>   verificationCodeLength?: number | null,
>   sharedSecretKey?: string | null,
>   hashingAlgorithm?: string | null,
>   sessionInfo?: string | null,
>   finalizeEnrollmentTime?: string | null,
>   periodSec?: number | null
> } | null
> ```

***

### accounts.mfaEnrollment.withdraw

`authAdmin.accounts.mfaEnrollment.withdraw`

Revokes one second factor from the enrolled second factors for an account

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.accounts.mfaEnrollment.withdraw({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `mfaEnrollmentId` | `string` | No | Required. MFA enrollment id from a current MFA enrollment. |
| `tenantId` | `string` | No | The ID of the Identity Platform tenant that the user unenrolling MFA belongs to. If not set, the user belongs to the default Identity Platform project. |
| `idToken` | `string` | No | Required. User's ID token. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `idToken` | `string \| null` | No | ID token updated to reflect removal of the second factor. |
| `refreshToken` | `string \| null` | No | Refresh token updated to reflect removal of the second factor. |

***

### accounts.mfaSignIn.finalize

`authAdmin.accounts.mfaSignIn.finalize`

Verifies the MFA challenge and performs sign-in

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.accounts.mfaSignIn.finalize({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `mfaPendingCredential` | `string` | No | Required. Pending credential from first factor sign-in. |
| `phoneVerificationInfo` | `object` | No | Phone Verification info for a FinalizeMfa request. |
| `totpVerificationInfo` | `object` | No | TOTP verification info for FinalizeMfaSignInRequest. |
| `tenantId` | `string` | No | The ID of the Identity Platform tenant the user is signing in to. If not set, the user will sign in to the default Identity Platform project. |
| `mfaEnrollmentId` | `string` | No | The MFA enrollment ID from the user's list of current MFA enrollments. |

> [accordion] phoneVerificationInfo full type
>
> ```ts theme={null}
> {
>   androidVerificationProof?: string,
>   code?: string,
>   sessionInfo?: string,
>   phoneNumber?: string
> }
> ```

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `phoneAuthInfo` | `object \| null` | No | Phone Verification info for a FinalizeMfa response. |
| `idToken` | `string \| null` | No | ID token for the authenticated user. |
| `refreshToken` | `string \| null` | No | Refresh token for the authenticated user. |

> [accordion] phoneAuthInfo full type
>
> ```ts theme={null}
> {
>   androidVerificationProof?: string | null,
>   phoneNumber?: string | null,
>   androidVerificationProofExpireTime?: string | null
> } | null
> ```

***

### accounts.mfaSignIn.start

`authAdmin.accounts.mfaSignIn.start`

Sends the MFA challenge

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.authAdmin.accounts.mfaSignIn.start({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `tenantId` | `string` | No | The ID of the Identity Platform tenant the user is signing in to. If not set, the user will sign in to the default Identity Platform project. |
| `mfaPendingCredential` | `string` | No | Required. Pending credential from first factor sign-in. |
| `mfaEnrollmentId` | `string` | No | Required. MFA enrollment id from the user's list of current MFA enrollments. |
| `phoneSignInInfo` | `object` | No | App Verification info for a StartMfa request. |

> [accordion] phoneSignInInfo full type
>
> ```ts theme={null}
> {
>   autoRetrievalInfo?: {
>     appSignatureHash?: string
>   },
>   playIntegrityToken?: string,
>   safetyNetToken?: string,
>   clientType?: CLIENT_TYPE_UNSPECIFIED | CLIENT_TYPE_WEB | CLIENT_TYPE_ANDROID | CLIENT_TYPE_IOS,
>   iosSecret?: string,
>   phoneNumber?: string,
>   recaptchaToken?: string,
>   recaptchaVersion?: RECAPTCHA_VERSION_UNSPECIFIED | RECAPTCHA_ENTERPRISE,
>   iosReceipt?: string,
>   captchaResponse?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `phoneResponseInfo` | `object \| null` | No | Phone Verification info for a StartMfa response. |

> [accordion] phoneResponseInfo full type
>
> ```ts theme={null}
> {
>   sessionInfo?: string | null
> } | null
> ```

***

### accounts.revokeToken

`authAdmin.accounts.revokeToken`

Revokes a user's token from an Identity Provider (IdP). This is done by manually providing an IdP credential, and the token types for revocation

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.authAdmin.accounts.revokeToken({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `tokenType` | `TOKEN_TYPE_UNSPECIFIED \| REFRESH_TOKEN \| ACCESS_TOKEN \| CODE` | No | Required. The type of the token to be revoked. |
| `redirectUri` | `string` | No | The redirect URI provided in the initial authorization request made by the client to the IDP. The URI must use the HTTPS protocol, include a domain name, and can't contain an IP address or localhost. Required if token\_type is CODE. |
| `token` | `string` | No | Required. The token to be revoked. If an authorization\_code is passed in, the API will first exchange the code for access token and then revoke the token exchanged. |
| `idToken` | `string` | No | Required. A valid Identity Platform ID token to link the account. If there was a successful token revocation request on the account and no tokens are generated after the revocation, the duplicate requests will be ignored and returned immediately. |
| `tenantId` | `string` | No | The ID of the Identity Platform tenant the user is signing in to. If not set, the user will sign in to the default Identity Platform project. |
| `providerId` | `string` | No | Required. The idp provider for the token. Currently only supports Apple Idp. The format should be "apple.com". |

**Output:** *empty object*

***

### defaultSupportedIdpConfigs.create

`authAdmin.defaultSupportedIdpConfigs.create`

Create a default supported Idp configuration for an Identity Toolkit project

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.defaultSupportedIdpConfigs.create({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The parent resource name where the config to be created, for example: "projects/my-awesome-project" Format: `projects/<id>`. |
| `idpId` | `string` | No | The id of the Idp to create a config for. Call ListDefaultSupportedIdps for list of all default supported Idps. |
| `clientId` | `string` | No | OAuth client ID. |
| `clientSecret` | `string` | No | OAuth client secret. |
| `appleSignInConfig` | `object` | No | Additional config for SignInWithApple. |
| `enabled` | `boolean` | No | True if allows the user to sign in with the provider. |
| `name` | `string` | No | The name of the DefaultSupportedIdpConfig resource, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com" |

> [accordion] appleSignInConfig full type
>
> ```ts theme={null}
> {
>   bundleIds?: string[],
>   codeFlowConfig?: {
>     keyId?: string,
>     privateKey?: string,
>     teamId?: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientId` | `string \| null` | No | OAuth client ID. |
| `clientSecret` | `string \| null` | No | OAuth client secret. |
| `appleSignInConfig` | `object \| null` | No | Additional config for SignInWithApple. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |
| `name` | `string \| null` | No | The name of the DefaultSupportedIdpConfig resource, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com" |

> [accordion] appleSignInConfig full type
>
> ```ts theme={null}
> {
>   bundleIds?: string[] | null,
>   codeFlowConfig?: {
>     keyId?: string | null,
>     privateKey?: string | null,
>     teamId?: string | null
>   } | null
> } | null
> ```

***

### defaultSupportedIdpConfigs.delete

`authAdmin.defaultSupportedIdpConfigs.delete`

Delete a default supported Idp configuration for an Identity Toolkit project

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.authAdmin.defaultSupportedIdpConfigs.delete({ name: 'projects/demo-project/defaultSupportedIdpConfigs/google.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the config, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com" Format: `projects/<id>/defaultSupportedIdpConfigs/<id>`. |

**Output:** *empty object*

***

### defaultSupportedIdpConfigs.get

`authAdmin.defaultSupportedIdpConfigs.get`

Retrieve a default supported Idp configuration for an Identity Toolkit project

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.defaultSupportedIdpConfigs.get({ name: 'projects/demo-project/defaultSupportedIdpConfigs/google.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the config, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com" Format: `projects/<id>/defaultSupportedIdpConfigs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientId` | `string \| null` | No | OAuth client ID. |
| `clientSecret` | `string \| null` | No | OAuth client secret. |
| `appleSignInConfig` | `object \| null` | No | Additional config for SignInWithApple. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |
| `name` | `string \| null` | No | The name of the DefaultSupportedIdpConfig resource, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com" |

> [accordion] appleSignInConfig full type
>
> ```ts theme={null}
> {
>   bundleIds?: string[] | null,
>   codeFlowConfig?: {
>     keyId?: string | null,
>     privateKey?: string | null,
>     teamId?: string | null
>   } | null
> } | null
> ```

***

### defaultSupportedIdpConfigs.list

`authAdmin.defaultSupportedIdpConfigs.list`

List all default supported Idp configurations for an Identity Toolkit project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.defaultSupportedIdpConfigs.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The parent resource name, for example, "projects/my-awesome-project". Format: `projects/<id>`. |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous List request, if any. |
| `pageSize` | `number` | No | The maximum number of items to return. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Token to retrieve the next page of results, or empty if there are no more results in the list. |
| `defaultSupportedIdpConfigs` | `object[] \| null` | No | The set of configs. |

> [accordion] defaultSupportedIdpConfigs full type
>
> ```ts theme={null}
> {
>   clientId?: string | null,
>   clientSecret?: string | null,
>   appleSignInConfig?: {
>     bundleIds?: string[] | null,
>     codeFlowConfig?: {
>       keyId?: string | null,
>       privateKey?: string | null,
>       teamId?: string | null
>     } | null
>   } | null,
>   enabled?: boolean | null,
>   name?: string | null
> }[] | null
> ```

***

### defaultSupportedIdpConfigs.patch

`authAdmin.defaultSupportedIdpConfigs.patch`

Update a default supported Idp configuration for an Identity Toolkit project

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.defaultSupportedIdpConfigs.patch({ name: 'projects/demo-project/defaultSupportedIdpConfigs/google.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | The update mask applies to the resource. For the `FieldMask` definition, see [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) |
| `name` | `string` | Yes | The name of the DefaultSupportedIdpConfig resource, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com" Format: `projects/<id>/defaultSupportedIdpConfigs/<id>`. |
| `clientId` | `string` | No | OAuth client ID. |
| `clientSecret` | `string` | No | OAuth client secret. |
| `appleSignInConfig` | `object` | No | Additional config for SignInWithApple. |
| `enabled` | `boolean` | No | True if allows the user to sign in with the provider. |
| `body_name` | `string` | No | The name of the DefaultSupportedIdpConfig resource, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com" |

> [accordion] appleSignInConfig full type
>
> ```ts theme={null}
> {
>   bundleIds?: string[],
>   codeFlowConfig?: {
>     keyId?: string,
>     privateKey?: string,
>     teamId?: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientId` | `string \| null` | No | OAuth client ID. |
| `clientSecret` | `string \| null` | No | OAuth client secret. |
| `appleSignInConfig` | `object \| null` | No | Additional config for SignInWithApple. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |
| `name` | `string \| null` | No | The name of the DefaultSupportedIdpConfig resource, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com" |

> [accordion] appleSignInConfig full type
>
> ```ts theme={null}
> {
>   bundleIds?: string[] | null,
>   codeFlowConfig?: {
>     keyId?: string | null,
>     privateKey?: string | null,
>     teamId?: string | null
>   } | null
> } | null
> ```

***

### defaultSupportedIdps.list

`authAdmin.defaultSupportedIdps.list`

List all default supported Idps (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.defaultSupportedIdps.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous List request, if any. |
| `pageSize` | `number` | No | The maximum number of items to return. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `defaultSupportedIdps` | `object[] \| null` | No | The set of configs. |
| `nextPageToken` | `string \| null` | No | Token to retrieve the next page of results, or empty if there are no more results in the list. |

> [accordion] defaultSupportedIdps full type
>
> ```ts theme={null}
> {
>   idpId?: string | null,
>   description?: string | null
> }[] | null
> ```

***

### getPasswordPolicy

`authAdmin.getPasswordPolicy`

Gets password policy config set on the project or tenant

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.getPasswordPolicy({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `tenantId` | `string` | No | The id of a tenant. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `allowedNonAlphanumericCharacters` | `string[] \| null` | No | Output only. Allowed characters which satisfy the non\_alphanumeric requirement. |
| `forceUpgradeOnSignin` | `boolean \| null` | No | Users must have a password compliant with the password policy to sign-in. |
| `schemaVersion` | `number \| null` | No | Output only. schema version number for the password policy |
| `customStrengthOptions` | `object \| null` | No | Custom strength options to enforce on user passwords. |
| `enforcementState` | `string \| null` | No | Output only. Which enforcement mode to use for the password policy. |

> [accordion] customStrengthOptions full type
>
> ```ts theme={null}
> {
>   minPasswordLength?: number | null,
>   maxPasswordLength?: number | null,
>   containsLowercaseCharacter?: boolean | null,
>   containsNonAlphanumericCharacter?: boolean | null,
>   containsNumericCharacter?: boolean | null,
>   containsUppercaseCharacter?: boolean | null
> } | null
> ```

***

### getRecaptchaConfig

`authAdmin.getRecaptchaConfig`

Gets parameters needed for reCAPTCHA analysis

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.getRecaptchaConfig({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `RECAPTCHA_VERSION_UNSPECIFIED \| RECAPTCHA_ENTERPRISE` | No | The reCAPTCHA version. |
| `tenantId` | `string` | No | The id of a tenant. |
| `clientType` | `CLIENT_TYPE_UNSPECIFIED \| CLIENT_TYPE_WEB \| CLIENT_TYPE_ANDROID \| CLIENT_TYPE_IOS` | No | reCAPTCHA Enterprise uses separate site keys for different client types. Specify the client type to get the corresponding key. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `useSmsBotScore` | `boolean \| null` | No | Whether to use the rCE bot score for reCAPTCHA phone provider. |
| `recaptchaEnforcementState` | `object[] \| null` | No | The reCAPTCHA enforcement state for the providers that GCIP supports reCAPTCHA protection. |
| `recaptchaKey` | `string \| null` | No | The reCAPTCHA Enterprise key resource name, e.g. "projects/\{project}/keys/\{key}". This will only be returned when the reCAPTCHA enforcement state is AUDIT or ENFORCE on at least one of the reCAPTCHA providers. |
| `useSmsTollFraudProtection` | `boolean \| null` | No | Whether to use the rCE sms toll fraud protection risk score for reCAPTCHA phone provider. |

> [accordion] recaptchaEnforcementState full type
>
> ```ts theme={null}
> {
>   provider?: string | null,
>   enforcementState?: string | null
> }[] | null
> ```

***

### identityPlatform.initializeAuth

`authAdmin.identityPlatform.initializeAuth`

Initialize Identity Platform for a Cloud project. Identity Platform is an end-to-end authentication system for third-party users to access your apps and services

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.identityPlatform.initializeAuth({ project: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | The resource name of the target project the developer wants to enable Identity Platform for. Format: `projects/<id>`. |
| `body` | `object` | No | Request for InitializeIdentityPlatform. |

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

**Output:** *empty object*

***

### inboundSamlConfigs.create

`authAdmin.inboundSamlConfigs.create`

Create an inbound SAML configuration for an Identity Toolkit project

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.inboundSamlConfigs.create({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `inboundSamlConfigId` | `string` | No | The id to use for this config. |
| `parent` | `string` | Yes | The parent resource name where the config to be created, for example: "projects/my-awesome-project" Format: `projects/<id>`. |
| `name` | `string` | No | The name of the InboundSamlConfig resource, for example: 'projects/my-awesome-project/inboundSamlConfigs/my-config-id'. Ignored during create requests. |
| `displayName` | `string` | No | The config's display name set by developers. |
| `enabled` | `boolean` | No | True if allows the user to sign in with the provider. |
| `idpConfig` | `object` | No | The SAML IdP (Identity Provider) configuration when the project acts as the relying party. |
| `spConfig` | `object` | No | The SAML SP (Service Provider) configuration when the project acts as the relying party to receive and accept an authentication assertion issued by a SAML identity provider. |

> [accordion] idpConfig full type
>
> ```ts theme={null}
> {
>   ssoUrl?: string,
>   idpCertificates?: {
>     x509Certificate?: string
>   }[],
>   signRequest?: boolean,
>   idpEntityId?: string
> }
> ```

> [accordion] spConfig full type
>
> ```ts theme={null}
> {
>   callbackUri?: string,
>   spEntityId?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The name of the InboundSamlConfig resource, for example: 'projects/my-awesome-project/inboundSamlConfigs/my-config-id'. Ignored during create requests. |
| `displayName` | `string \| null` | No | The config's display name set by developers. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |
| `idpConfig` | `object \| null` | No | The SAML IdP (Identity Provider) configuration when the project acts as the relying party. |
| `spConfig` | `object \| null` | No | The SAML SP (Service Provider) configuration when the project acts as the relying party to receive and accept an authentication assertion issued by a SAML identity provider. |

> [accordion] idpConfig full type
>
> ```ts theme={null}
> {
>   ssoUrl?: string | null,
>   idpCertificates?: {
>     x509Certificate?: string | null
>   }[] | null,
>   signRequest?: boolean | null,
>   idpEntityId?: string | null
> } | null
> ```

> [accordion] spConfig full type
>
> ```ts theme={null}
> {
>   spCertificates?: {
>     x509Certificate?: string | null,
>     expiresAt?: string | null
>   }[] | null,
>   callbackUri?: string | null,
>   spEntityId?: string | null
> } | null
> ```

***

### inboundSamlConfigs.delete

`authAdmin.inboundSamlConfigs.delete`

Delete an inbound SAML configuration for an Identity Toolkit project

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.authAdmin.inboundSamlConfigs.delete({ name: 'projects/demo-project/inboundSamlConfigs/saml.example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the config to be deleted, for example: 'projects/my-awesome-project/inboundSamlConfigs/my-config-id'. Format: `projects/<id>/inboundSamlConfigs/<id>`. |

**Output:** *empty object*

***

### inboundSamlConfigs.get

`authAdmin.inboundSamlConfigs.get`

Retrieve an inbound SAML configuration for an Identity Toolkit project

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.inboundSamlConfigs.get({ name: 'projects/demo-project/inboundSamlConfigs/saml.example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the config, for example: 'projects/my-awesome-project/inboundSamlConfigs/my-config-id'. Format: `projects/<id>/inboundSamlConfigs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The name of the InboundSamlConfig resource, for example: 'projects/my-awesome-project/inboundSamlConfigs/my-config-id'. Ignored during create requests. |
| `displayName` | `string \| null` | No | The config's display name set by developers. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |
| `idpConfig` | `object \| null` | No | The SAML IdP (Identity Provider) configuration when the project acts as the relying party. |
| `spConfig` | `object \| null` | No | The SAML SP (Service Provider) configuration when the project acts as the relying party to receive and accept an authentication assertion issued by a SAML identity provider. |

> [accordion] idpConfig full type
>
> ```ts theme={null}
> {
>   ssoUrl?: string | null,
>   idpCertificates?: {
>     x509Certificate?: string | null
>   }[] | null,
>   signRequest?: boolean | null,
>   idpEntityId?: string | null
> } | null
> ```

> [accordion] spConfig full type
>
> ```ts theme={null}
> {
>   spCertificates?: {
>     x509Certificate?: string | null,
>     expiresAt?: string | null
>   }[] | null,
>   callbackUri?: string | null,
>   spEntityId?: string | null
> } | null
> ```

***

### inboundSamlConfigs.list

`authAdmin.inboundSamlConfigs.list`

List all inbound SAML configurations for an Identity Toolkit project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.inboundSamlConfigs.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The maximum number of items to return. |
| `parent` | `string` | Yes | The parent resource name, for example, "projects/my-awesome-project". Format: `projects/<id>`. |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous List request, if any. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inboundSamlConfigs` | `object[] \| null` | No | The set of configs. |
| `nextPageToken` | `string \| null` | No | Token to retrieve the next page of results, or empty if there are no more results in the list. |

> [accordion] inboundSamlConfigs full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   displayName?: string | null,
>   enabled?: boolean | null,
>   idpConfig?: {
>     ssoUrl?: string | null,
>     idpCertificates?: {
>       x509Certificate?: string | null
>     }[] | null,
>     signRequest?: boolean | null,
>     idpEntityId?: string | null
>   } | null,
>   spConfig?: {
>     spCertificates?: {
>       x509Certificate?: string | null,
>       expiresAt?: string | null
>     }[] | null,
>     callbackUri?: string | null,
>     spEntityId?: string | null
>   } | null
> }[] | null
> ```

***

### inboundSamlConfigs.patch

`authAdmin.inboundSamlConfigs.patch`

Update an inbound SAML configuration for an Identity Toolkit project

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.inboundSamlConfigs.patch({ name: 'projects/demo-project/inboundSamlConfigs/saml.example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | The update mask applies to the resource. Empty update mask will result in updating nothing. For the `FieldMask` definition, see [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) |
| `name` | `string` | Yes | The name of the InboundSamlConfig resource, for example: 'projects/my-awesome-project/inboundSamlConfigs/my-config-id'. Ignored during create requests. Format: `projects/<id>/inboundSamlConfigs/<id>`. |
| `body_name` | `string` | No | The name of the InboundSamlConfig resource, for example: 'projects/my-awesome-project/inboundSamlConfigs/my-config-id'. Ignored during create requests. |
| `displayName` | `string` | No | The config's display name set by developers. |
| `enabled` | `boolean` | No | True if allows the user to sign in with the provider. |
| `idpConfig` | `object` | No | The SAML IdP (Identity Provider) configuration when the project acts as the relying party. |
| `spConfig` | `object` | No | The SAML SP (Service Provider) configuration when the project acts as the relying party to receive and accept an authentication assertion issued by a SAML identity provider. |

> [accordion] idpConfig full type
>
> ```ts theme={null}
> {
>   ssoUrl?: string,
>   idpCertificates?: {
>     x509Certificate?: string
>   }[],
>   signRequest?: boolean,
>   idpEntityId?: string
> }
> ```

> [accordion] spConfig full type
>
> ```ts theme={null}
> {
>   callbackUri?: string,
>   spEntityId?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The name of the InboundSamlConfig resource, for example: 'projects/my-awesome-project/inboundSamlConfigs/my-config-id'. Ignored during create requests. |
| `displayName` | `string \| null` | No | The config's display name set by developers. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |
| `idpConfig` | `object \| null` | No | The SAML IdP (Identity Provider) configuration when the project acts as the relying party. |
| `spConfig` | `object \| null` | No | The SAML SP (Service Provider) configuration when the project acts as the relying party to receive and accept an authentication assertion issued by a SAML identity provider. |

> [accordion] idpConfig full type
>
> ```ts theme={null}
> {
>   ssoUrl?: string | null,
>   idpCertificates?: {
>     x509Certificate?: string | null
>   }[] | null,
>   signRequest?: boolean | null,
>   idpEntityId?: string | null
> } | null
> ```

> [accordion] spConfig full type
>
> ```ts theme={null}
> {
>   spCertificates?: {
>     x509Certificate?: string | null,
>     expiresAt?: string | null
>   }[] | null,
>   callbackUri?: string | null,
>   spEntityId?: string | null
> } | null
> ```

***

### oauthIdpConfigs.create

`authAdmin.oauthIdpConfigs.create`

Create an Oidc Idp configuration for an Identity Toolkit project

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.oauthIdpConfigs.create({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `oauthIdpConfigId` | `string` | No | The id to use for this config. |
| `parent` | `string` | Yes | The parent resource name where the config to be created, for example: "projects/my-awesome-project" Format: `projects/<id>`. |
| `issuer` | `string` | No | For OIDC Idps, the issuer identifier. |
| `responseType` | `object` | No | The response type to request for in the OAuth authorization flow. You can set either `id_token` or `code` to true, but not both. Setting both types to be simultaneously true (`{code: true, id_token: true}`) is not yet supported. See [https://openid.net/specs/openid-connect-core-1\_0.html#Authentication](https://openid.net/specs/openid-connect-core-1_0.html#Authentication) for a mapping of response type to OAuth 2.0 flow. |
| `displayName` | `string` | No | The config's display name set by developers. |
| `clientSecret` | `string` | No | The client secret of the OAuth client, to enable OIDC code flow. |
| `name` | `string` | No | The name of the OAuthIdpConfig resource, for example: 'projects/my-awesome-project/oauthIdpConfigs/oauth-config-id'. Ignored during create requests. |
| `clientId` | `string` | No | The client id of an OAuth client. |
| `enabled` | `boolean` | No | True if allows the user to sign in with the provider. |

> [accordion] responseType full type
>
> ```ts theme={null}
> {
>   idToken?: boolean,
>   code?: boolean,
>   token?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `issuer` | `string \| null` | No | For OIDC Idps, the issuer identifier. |
| `responseType` | `object \| null` | No | The response type to request for in the OAuth authorization flow. You can set either `id_token` or `code` to true, but not both. Setting both types to be simultaneously true (`{code: true, id_token: true}`) is not yet supported. See [https://openid.net/specs/openid-connect-core-1\_0.html#Authentication](https://openid.net/specs/openid-connect-core-1_0.html#Authentication) for a mapping of response type to OAuth 2.0 flow. |
| `displayName` | `string \| null` | No | The config's display name set by developers. |
| `clientSecret` | `string \| null` | No | The client secret of the OAuth client, to enable OIDC code flow. |
| `name` | `string \| null` | No | The name of the OAuthIdpConfig resource, for example: 'projects/my-awesome-project/oauthIdpConfigs/oauth-config-id'. Ignored during create requests. |
| `clientId` | `string \| null` | No | The client id of an OAuth client. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |

> [accordion] responseType full type
>
> ```ts theme={null}
> {
>   idToken?: boolean | null,
>   code?: boolean | null,
>   token?: boolean | null
> } | null
> ```

***

### oauthIdpConfigs.delete

`authAdmin.oauthIdpConfigs.delete`

Delete an Oidc Idp configuration for an Identity Toolkit project

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.authAdmin.oauthIdpConfigs.delete({ name: 'projects/demo-project/oauthIdpConfigs/oidc.example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the config to be deleted, for example: 'projects/my-awesome-project/oauthIdpConfigs/oauth-config-id'. Format: `projects/<id>/oauthIdpConfigs/<id>`. |

**Output:** *empty object*

***

### oauthIdpConfigs.get

`authAdmin.oauthIdpConfigs.get`

Retrieve an Oidc Idp configuration for an Identity Toolkit project

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.oauthIdpConfigs.get({ name: 'projects/demo-project/oauthIdpConfigs/oidc.example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the config, for example: 'projects/my-awesome-project/oauthIdpConfigs/oauth-config-id'. Format: `projects/<id>/oauthIdpConfigs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `issuer` | `string \| null` | No | For OIDC Idps, the issuer identifier. |
| `responseType` | `object \| null` | No | The response type to request for in the OAuth authorization flow. You can set either `id_token` or `code` to true, but not both. Setting both types to be simultaneously true (`{code: true, id_token: true}`) is not yet supported. See [https://openid.net/specs/openid-connect-core-1\_0.html#Authentication](https://openid.net/specs/openid-connect-core-1_0.html#Authentication) for a mapping of response type to OAuth 2.0 flow. |
| `displayName` | `string \| null` | No | The config's display name set by developers. |
| `clientSecret` | `string \| null` | No | The client secret of the OAuth client, to enable OIDC code flow. |
| `name` | `string \| null` | No | The name of the OAuthIdpConfig resource, for example: 'projects/my-awesome-project/oauthIdpConfigs/oauth-config-id'. Ignored during create requests. |
| `clientId` | `string \| null` | No | The client id of an OAuth client. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |

> [accordion] responseType full type
>
> ```ts theme={null}
> {
>   idToken?: boolean | null,
>   code?: boolean | null,
>   token?: boolean | null
> } | null
> ```

***

### oauthIdpConfigs.list

`authAdmin.oauthIdpConfigs.list`

List all Oidc Idp configurations for an Identity Toolkit project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.oauthIdpConfigs.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The parent resource name, for example, "projects/my-awesome-project". Format: `projects/<id>`. |
| `pageSize` | `number` | No | The maximum number of items to return. |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous List request, if any. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Token to retrieve the next page of results, or empty if there are no more results in the list. |
| `oauthIdpConfigs` | `object[] \| null` | No | The set of configs. |

> [accordion] oauthIdpConfigs full type
>
> ```ts theme={null}
> {
>   issuer?: string | null,
>   responseType?: {
>     idToken?: boolean | null,
>     code?: boolean | null,
>     token?: boolean | null
>   } | null,
>   displayName?: string | null,
>   clientSecret?: string | null,
>   name?: string | null,
>   clientId?: string | null,
>   enabled?: boolean | null
> }[] | null
> ```

***

### oauthIdpConfigs.patch

`authAdmin.oauthIdpConfigs.patch`

Update an Oidc Idp configuration for an Identity Toolkit project

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.oauthIdpConfigs.patch({ name: 'projects/demo-project/oauthIdpConfigs/oidc.example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the OAuthIdpConfig resource, for example: 'projects/my-awesome-project/oauthIdpConfigs/oauth-config-id'. Ignored during create requests. Format: `projects/<id>/oauthIdpConfigs/<id>`. |
| `updateMask` | `string` | No | The update mask applies to the resource. Empty update mask will result in updating nothing. For the `FieldMask` definition, see [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) |
| `issuer` | `string` | No | For OIDC Idps, the issuer identifier. |
| `responseType` | `object` | No | The response type to request for in the OAuth authorization flow. You can set either `id_token` or `code` to true, but not both. Setting both types to be simultaneously true (`{code: true, id_token: true}`) is not yet supported. See [https://openid.net/specs/openid-connect-core-1\_0.html#Authentication](https://openid.net/specs/openid-connect-core-1_0.html#Authentication) for a mapping of response type to OAuth 2.0 flow. |
| `displayName` | `string` | No | The config's display name set by developers. |
| `clientSecret` | `string` | No | The client secret of the OAuth client, to enable OIDC code flow. |
| `body_name` | `string` | No | The name of the OAuthIdpConfig resource, for example: 'projects/my-awesome-project/oauthIdpConfigs/oauth-config-id'. Ignored during create requests. |
| `clientId` | `string` | No | The client id of an OAuth client. |
| `enabled` | `boolean` | No | True if allows the user to sign in with the provider. |

> [accordion] responseType full type
>
> ```ts theme={null}
> {
>   idToken?: boolean,
>   code?: boolean,
>   token?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `issuer` | `string \| null` | No | For OIDC Idps, the issuer identifier. |
| `responseType` | `object \| null` | No | The response type to request for in the OAuth authorization flow. You can set either `id_token` or `code` to true, but not both. Setting both types to be simultaneously true (`{code: true, id_token: true}`) is not yet supported. See [https://openid.net/specs/openid-connect-core-1\_0.html#Authentication](https://openid.net/specs/openid-connect-core-1_0.html#Authentication) for a mapping of response type to OAuth 2.0 flow. |
| `displayName` | `string \| null` | No | The config's display name set by developers. |
| `clientSecret` | `string \| null` | No | The client secret of the OAuth client, to enable OIDC code flow. |
| `name` | `string \| null` | No | The name of the OAuthIdpConfig resource, for example: 'projects/my-awesome-project/oauthIdpConfigs/oauth-config-id'. Ignored during create requests. |
| `clientId` | `string \| null` | No | The client id of an OAuth client. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |

> [accordion] responseType full type
>
> ```ts theme={null}
> {
>   idToken?: boolean | null,
>   code?: boolean | null,
>   token?: boolean | null
> } | null
> ```

***

### projects.getConfig

`authAdmin.projects.getConfig`

Retrieve an Identity Toolkit project configuration

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.projects.getConfig({ name: 'projects/demo-project/config' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the config, for example: "projects/my-awesome-project/config" Format: `projects/<id>/config`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `passwordPolicyConfig` | `object \| null` | No | The configuration for the password policy on the project. |
| `blockingFunctions` | `object \| null` | No | Configuration related to Blocking Functions. |
| `defaultHostingSite` | `string \| null` | No | Output only. Default Firebase hosting site name |
| `signIn` | `object \| null` | No | Configuration related to local sign in methods. |
| `autodeleteAnonymousUsers` | `boolean \| null` | No | Whether anonymous users will be auto-deleted after a period of 30 days. |
| `authorizedDomains` | `string[] \| null` | No | List of domains authorized for OAuth redirects |
| `smsRegionConfig` | `object \| null` | No | Configures the regions where users are allowed to send verification SMS for the project or tenant. This is based on the calling code of the destination phone number. |
| `multiTenant` | `object \| null` | No | Configuration related to multi-tenant functionality. |
| `quota` | `object \| null` | No | Configuration related to quotas. |
| `monitoring` | `object \| null` | No | Configuration related to monitoring project activity. |
| `recaptchaConfig` | `object \| null` | No | The reCAPTCHA Enterprise integration config. |
| `notification` | `object \| null` | No | Configuration related to sending notifications to users. |
| `name` | `string \| null` | No | Output only. The name of the Config resource. Example: "projects/my-awesome-project/config" |
| `emailPrivacyConfig` | `object \| null` | No | Configuration for settings related to email privacy and public visibility. Settings in this config protect against email enumeration, but may make some trade-offs in user-friendliness. |
| `client` | `object \| null` | No | Options related to how clients making requests on behalf of a project should be configured. |
| `subtype` | `string \| null` | No | Output only. The subtype of this config. |
| `mfa` | `object \| null` | No | Options related to MultiFactor Authentication for the project. |
| `mobileLinksConfig` | `object \| null` | No | Configuration mobile links. |

> [accordion] passwordPolicyConfig full type
>
> ```ts theme={null}
> {
>   passwordPolicyVersions?: {
>     customStrengthOptions?: {
>       containsLowercaseCharacter?: boolean | null,
>       maxPasswordLength?: number | null,
>       minPasswordLength?: number | null,
>       containsUppercaseCharacter?: boolean | null,
>       containsNumericCharacter?: boolean | null,
>       containsNonAlphanumericCharacter?: boolean | null
>     } | null,
>     schemaVersion?: number | null
>   }[] | null,
>   lastUpdateTime?: string | null,
>   forceUpgradeOnSignin?: boolean | null,
>   passwordPolicyEnforcementState?: string | null
> } | null
> ```

> [accordion] blockingFunctions full type
>
> ```ts theme={null}
> {
>   triggers?: Record<string, {
>     functionUri?: string | null,
>     updateTime?: string | null
>   }> | null,
>   forwardInboundCredentials?: {
>     idToken?: boolean | null,
>     accessToken?: boolean | null,
>     refreshToken?: boolean | null
>   } | null
> } | null
> ```

> [accordion] signIn full type
>
> ```ts theme={null}
> {
>   anonymous?: {
>     enabled?: boolean | null
>   } | null,
>   phoneNumber?: {
>     testPhoneNumbers?: Record<string, string> | null,
>     enabled?: boolean | null
>   } | null,
>   allowDuplicateEmails?: boolean | null,
>   email?: {
>     passwordRequired?: boolean | null,
>     enabled?: boolean | null
>   } | null,
>   hashConfig?: {
>     memoryCost?: number | null,
>     algorithm?: string | null,
>     saltSeparator?: string | null,
>     rounds?: number | null,
>     signerKey?: string | null
>   } | null
> } | null
> ```

> [accordion] smsRegionConfig full type
>
> ```ts theme={null}
> {
>   allowByDefault?: {
>     disallowedRegions?: string[] | null
>   } | null,
>   allowlistOnly?: {
>     allowedRegions?: string[] | null
>   } | null
> } | null
> ```

> [accordion] multiTenant full type
>
> ```ts theme={null}
> {
>   defaultTenantLocation?: string | null,
>   allowTenants?: boolean | null
> } | null
> ```

> [accordion] quota full type
>
> ```ts theme={null}
> {
>   signUpQuotaConfig?: {
>     startTime?: string | null,
>     quota?: string | number | null,
>     quotaDuration?: string | null
>   } | null
> } | null
> ```

> [accordion] monitoring full type
>
> ```ts theme={null}
> {
>   requestLogging?: {
>     enabled?: boolean | null
>   } | null
> } | null
> ```

> [accordion] recaptchaConfig full type
>
> ```ts theme={null}
> {
>   useSmsBotScore?: boolean | null,
>   recaptchaKeys?: {
>     key?: string | null,
>     type?: string | null
>   }[] | null,
>   managedRules?: {
>     action?: string | null,
>     endScore?: number | null
>   }[] | null,
>   emailPasswordEnforcementState?: string | null,
>   useSmsTollFraudProtection?: boolean | null,
>   phoneEnforcementState?: string | null,
>   useAccountDefender?: boolean | null,
>   tollFraudManagedRules?: {
>     startScore?: number | null,
>     action?: string | null
>   }[] | null
> } | null
> ```

> [accordion] notification full type
>
> ```ts theme={null}
> {
>   sendEmail?: {
>     dnsInfo?: {
>       domainVerificationRequestTime?: string | null,
>       pendingCustomDomain?: string | null,
>       customDomainState?: string | null,
>       useCustomDomain?: boolean | null,
>       customDomain?: string | null
>     } | null,
>     verifyEmailTemplate?: {
>       bodyFormat?: string | null,
>       senderLocalPart?: string | null,
>       body?: string | null,
>       replyTo?: string | null,
>       senderDisplayName?: string | null,
>       subject?: string | null,
>       customized?: boolean | null
>     } | null,
>     legacyResetPasswordTemplate?: {
>       bodyFormat?: string | null,
>       senderLocalPart?: string | null,
>       body?: string | null,
>       replyTo?: string | null,
>       senderDisplayName?: string | null,
>       subject?: string | null,
>       customized?: boolean | null
>     } | null,
>     resetPasswordTemplate?: {
>       bodyFormat?: string | null,
>       senderLocalPart?: string | null,
>       body?: string | null,
>       replyTo?: string | null,
>       senderDisplayName?: string | null,
>       subject?: string | null,
>       customized?: boolean | null
>     } | null,
>     revertSecondFactorAdditionTemplate?: {
>       bodyFormat?: string | null,
>       senderLocalPart?: string | null,
>       body?: string | null,
>       replyTo?: string | null,
>       senderDisplayName?: string | null,
>       subject?: string | null,
>       customized?: boolean | null
>     } | null,
>     changeEmailTemplate?: {
>       bodyFormat?: string | null,
>       senderLocalPart?: string | null,
>       body?: string | null,
>       replyTo?: string | null,
>       senderDisplayName?: string | null,
>       subject?: string | null,
>       customized?: boolean | null
>     } | null,
>     smtp?: {
>       username?: string | null,
>       password?: string | null,
>       senderEmail?: string | null,
>       port?: number | null,
>       securityMode?: string | null,
>       host?: string | null
>     } | null,
>     method?: string | null,
>     callbackUri?: string | null
>   } | null,
>   sendSms?: {
>     smsTemplate?: {
>       content?: string | null
>     } | null,
>     useDeviceLocale?: boolean | null
>   } | null,
>   defaultLocale?: string | null
> } | null
> ```

> [accordion] emailPrivacyConfig full type
>
> ```ts theme={null}
> {
>   enableImprovedEmailPrivacy?: boolean | null
> } | null
> ```

> [accordion] client full type
>
> ```ts theme={null}
> {
>   permissions?: {
>     disabledUserDeletion?: boolean | null,
>     disabledUserSignup?: boolean | null
>   } | null,
>   firebaseSubdomain?: string | null,
>   apiKey?: string | null
> } | null
> ```

> [accordion] mfa full type
>
> ```ts theme={null}
> {
>   providerConfigs?: {
>     totpProviderConfig?: {
>       adjacentIntervals?: number | null
>     } | null,
>     state?: string | null
>   }[] | null,
>   state?: string | null,
>   enabledProviders?: string[] | null
> } | null
> ```

> [accordion] mobileLinksConfig full type
>
> ```ts theme={null}
> {
>   domain?: string | null
> } | null
> ```

***

### projects.updateConfig

`authAdmin.projects.updateConfig`

Update an Identity Toolkit project configuration

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.projects.updateConfig({ name: 'projects/demo-project/config' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Output only. The name of the Config resource. Example: "projects/my-awesome-project/config" Format: `projects/<id>/config`. |
| `updateMask` | `string` | No | The update mask applies to the resource. Fields set in the config but not included in this update mask will be ignored. For the `FieldMask` definition, see [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) |
| `passwordPolicyConfig` | `object` | No | The configuration for the password policy on the project. |
| `blockingFunctions` | `object` | No | Configuration related to Blocking Functions. |
| `signIn` | `object` | No | Configuration related to local sign in methods. |
| `autodeleteAnonymousUsers` | `boolean` | No | Whether anonymous users will be auto-deleted after a period of 30 days. |
| `authorizedDomains` | `string[]` | No | List of domains authorized for OAuth redirects |
| `smsRegionConfig` | `object` | No | Configures the regions where users are allowed to send verification SMS for the project or tenant. This is based on the calling code of the destination phone number. |
| `multiTenant` | `object` | No | Configuration related to multi-tenant functionality. |
| `quota` | `object` | No | Configuration related to quotas. |
| `monitoring` | `object` | No | Configuration related to monitoring project activity. |
| `recaptchaConfig` | `object` | No | The reCAPTCHA Enterprise integration config. |
| `notification` | `object` | No | Configuration related to sending notifications to users. |
| `emailPrivacyConfig` | `object` | No | Configuration for settings related to email privacy and public visibility. Settings in this config protect against email enumeration, but may make some trade-offs in user-friendliness. |
| `client` | `object` | No | Options related to how clients making requests on behalf of a project should be configured. |
| `mfa` | `object` | No | Options related to MultiFactor Authentication for the project. |
| `mobileLinksConfig` | `object` | No | Configuration mobile links. |

> [accordion] passwordPolicyConfig full type
>
> ```ts theme={null}
> {
>   passwordPolicyVersions?: {
>     customStrengthOptions?: {
>       containsLowercaseCharacter?: boolean,
>       maxPasswordLength?: number,
>       minPasswordLength?: number,
>       containsUppercaseCharacter?: boolean,
>       containsNumericCharacter?: boolean,
>       containsNonAlphanumericCharacter?: boolean
>     }
>   }[],
>   forceUpgradeOnSignin?: boolean,
>   passwordPolicyEnforcementState?: PASSWORD_POLICY_ENFORCEMENT_STATE_UNSPECIFIED | OFF | ENFORCE
> }
> ```

> [accordion] blockingFunctions full type
>
> ```ts theme={null}
> {
>   triggers?: Record<string, {
>     functionUri?: string,
>     updateTime?: string
>   }>,
>   forwardInboundCredentials?: {
>     idToken?: boolean,
>     accessToken?: boolean,
>     refreshToken?: boolean
>   }
> }
> ```

> [accordion] signIn full type
>
> ```ts theme={null}
> {
>   anonymous?: {
>     enabled?: boolean
>   },
>   phoneNumber?: {
>     testPhoneNumbers?: Record<string, string>,
>     enabled?: boolean
>   },
>   allowDuplicateEmails?: boolean,
>   email?: {
>     passwordRequired?: boolean,
>     enabled?: boolean
>   }
> }
> ```

> [accordion] smsRegionConfig full type
>
> ```ts theme={null}
> {
>   allowByDefault?: {
>     disallowedRegions?: string[]
>   },
>   allowlistOnly?: {
>     allowedRegions?: string[]
>   }
> }
> ```

> [accordion] multiTenant full type
>
> ```ts theme={null}
> {
>   defaultTenantLocation?: string,
>   allowTenants?: boolean
> }
> ```

> [accordion] quota full type
>
> ```ts theme={null}
> {
>   signUpQuotaConfig?: {
>     startTime?: string,
>     quota?: string | number,
>     quotaDuration?: string
>   }
> }
> ```

> [accordion] monitoring full type
>
> ```ts theme={null}
> {
>   requestLogging?: {
>     enabled?: boolean
>   }
> }
> ```

> [accordion] recaptchaConfig full type
>
> ```ts theme={null}
> {
>   useSmsBotScore?: boolean,
>   recaptchaKeys?: {
>     key?: string,
>     type?: CLIENT_TYPE_UNSPECIFIED | WEB | IOS | ANDROID
>   }[],
>   managedRules?: {
>     action?: RECAPTCHA_ACTION_UNSPECIFIED | BLOCK,
>     endScore?: number
>   }[],
>   emailPasswordEnforcementState?: RECAPTCHA_PROVIDER_ENFORCEMENT_STATE_UNSPECIFIED | OFF | AUDIT | ENFORCE,
>   useSmsTollFraudProtection?: boolean,
>   phoneEnforcementState?: RECAPTCHA_PROVIDER_ENFORCEMENT_STATE_UNSPECIFIED | OFF | AUDIT | ENFORCE,
>   useAccountDefender?: boolean,
>   tollFraudManagedRules?: {
>     startScore?: number,
>     action?: RECAPTCHA_ACTION_UNSPECIFIED | BLOCK
>   }[]
> }
> ```

> [accordion] notification full type
>
> ```ts theme={null}
> {
>   sendEmail?: {
>     dnsInfo?: {
>       useCustomDomain?: boolean
>     },
>     verifyEmailTemplate?: {
>       bodyFormat?: BODY_FORMAT_UNSPECIFIED | PLAIN_TEXT | HTML,
>       senderLocalPart?: string,
>       body?: string,
>       replyTo?: string,
>       senderDisplayName?: string,
>       subject?: string
>     },
>     legacyResetPasswordTemplate?: {
>       bodyFormat?: BODY_FORMAT_UNSPECIFIED | PLAIN_TEXT | HTML,
>       senderLocalPart?: string,
>       body?: string,
>       replyTo?: string,
>       senderDisplayName?: string,
>       subject?: string
>     },
>     resetPasswordTemplate?: {
>       bodyFormat?: BODY_FORMAT_UNSPECIFIED | PLAIN_TEXT | HTML,
>       senderLocalPart?: string,
>       body?: string,
>       replyTo?: string,
>       senderDisplayName?: string,
>       subject?: string
>     },
>     revertSecondFactorAdditionTemplate?: {
>       bodyFormat?: BODY_FORMAT_UNSPECIFIED | PLAIN_TEXT | HTML,
>       senderLocalPart?: string,
>       body?: string,
>       replyTo?: string,
>       senderDisplayName?: string,
>       subject?: string
>     },
>     changeEmailTemplate?: {
>       bodyFormat?: BODY_FORMAT_UNSPECIFIED | PLAIN_TEXT | HTML,
>       senderLocalPart?: string,
>       body?: string,
>       replyTo?: string,
>       senderDisplayName?: string,
>       subject?: string
>     },
>     smtp?: {
>       username?: string,
>       password?: string,
>       senderEmail?: string,
>       port?: number,
>       securityMode?: SECURITY_MODE_UNSPECIFIED | SSL | START_TLS,
>       host?: string
>     },
>     method?: METHOD_UNSPECIFIED | DEFAULT | CUSTOM_SMTP,
>     callbackUri?: string
>   },
>   sendSms?: {
>     useDeviceLocale?: boolean
>   },
>   defaultLocale?: string
> }
> ```

> [accordion] emailPrivacyConfig full type
>
> ```ts theme={null}
> {
>   enableImprovedEmailPrivacy?: boolean
> }
> ```

> [accordion] client full type
>
> ```ts theme={null}
> {
>   permissions?: {
>     disabledUserDeletion?: boolean,
>     disabledUserSignup?: boolean
>   }
> }
> ```

> [accordion] mfa full type
>
> ```ts theme={null}
> {
>   providerConfigs?: {
>     totpProviderConfig?: {
>       adjacentIntervals?: number
>     },
>     state?: MFA_STATE_UNSPECIFIED | DISABLED | ENABLED | MANDATORY
>   }[],
>   state?: STATE_UNSPECIFIED | DISABLED | ENABLED | MANDATORY,
>   enabledProviders?: (PROVIDER_UNSPECIFIED | PHONE_SMS)[]
> }
> ```

> [accordion] mobileLinksConfig full type
>
> ```ts theme={null}
> {
>   domain?: DOMAIN_UNSPECIFIED | FIREBASE_DYNAMIC_LINK_DOMAIN | HOSTING_DOMAIN
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `passwordPolicyConfig` | `object \| null` | No | The configuration for the password policy on the project. |
| `blockingFunctions` | `object \| null` | No | Configuration related to Blocking Functions. |
| `defaultHostingSite` | `string \| null` | No | Output only. Default Firebase hosting site name |
| `signIn` | `object \| null` | No | Configuration related to local sign in methods. |
| `autodeleteAnonymousUsers` | `boolean \| null` | No | Whether anonymous users will be auto-deleted after a period of 30 days. |
| `authorizedDomains` | `string[] \| null` | No | List of domains authorized for OAuth redirects |
| `smsRegionConfig` | `object \| null` | No | Configures the regions where users are allowed to send verification SMS for the project or tenant. This is based on the calling code of the destination phone number. |
| `multiTenant` | `object \| null` | No | Configuration related to multi-tenant functionality. |
| `quota` | `object \| null` | No | Configuration related to quotas. |
| `monitoring` | `object \| null` | No | Configuration related to monitoring project activity. |
| `recaptchaConfig` | `object \| null` | No | The reCAPTCHA Enterprise integration config. |
| `notification` | `object \| null` | No | Configuration related to sending notifications to users. |
| `name` | `string \| null` | No | Output only. The name of the Config resource. Example: "projects/my-awesome-project/config" |
| `emailPrivacyConfig` | `object \| null` | No | Configuration for settings related to email privacy and public visibility. Settings in this config protect against email enumeration, but may make some trade-offs in user-friendliness. |
| `client` | `object \| null` | No | Options related to how clients making requests on behalf of a project should be configured. |
| `subtype` | `string \| null` | No | Output only. The subtype of this config. |
| `mfa` | `object \| null` | No | Options related to MultiFactor Authentication for the project. |
| `mobileLinksConfig` | `object \| null` | No | Configuration mobile links. |

> [accordion] passwordPolicyConfig full type
>
> ```ts theme={null}
> {
>   passwordPolicyVersions?: {
>     customStrengthOptions?: {
>       containsLowercaseCharacter?: boolean | null,
>       maxPasswordLength?: number | null,
>       minPasswordLength?: number | null,
>       containsUppercaseCharacter?: boolean | null,
>       containsNumericCharacter?: boolean | null,
>       containsNonAlphanumericCharacter?: boolean | null
>     } | null,
>     schemaVersion?: number | null
>   }[] | null,
>   lastUpdateTime?: string | null,
>   forceUpgradeOnSignin?: boolean | null,
>   passwordPolicyEnforcementState?: string | null
> } | null
> ```

> [accordion] blockingFunctions full type
>
> ```ts theme={null}
> {
>   triggers?: Record<string, {
>     functionUri?: string | null,
>     updateTime?: string | null
>   }> | null,
>   forwardInboundCredentials?: {
>     idToken?: boolean | null,
>     accessToken?: boolean | null,
>     refreshToken?: boolean | null
>   } | null
> } | null
> ```

> [accordion] signIn full type
>
> ```ts theme={null}
> {
>   anonymous?: {
>     enabled?: boolean | null
>   } | null,
>   phoneNumber?: {
>     testPhoneNumbers?: Record<string, string> | null,
>     enabled?: boolean | null
>   } | null,
>   allowDuplicateEmails?: boolean | null,
>   email?: {
>     passwordRequired?: boolean | null,
>     enabled?: boolean | null
>   } | null,
>   hashConfig?: {
>     memoryCost?: number | null,
>     algorithm?: string | null,
>     saltSeparator?: string | null,
>     rounds?: number | null,
>     signerKey?: string | null
>   } | null
> } | null
> ```

> [accordion] smsRegionConfig full type
>
> ```ts theme={null}
> {
>   allowByDefault?: {
>     disallowedRegions?: string[] | null
>   } | null,
>   allowlistOnly?: {
>     allowedRegions?: string[] | null
>   } | null
> } | null
> ```

> [accordion] multiTenant full type
>
> ```ts theme={null}
> {
>   defaultTenantLocation?: string | null,
>   allowTenants?: boolean | null
> } | null
> ```

> [accordion] quota full type
>
> ```ts theme={null}
> {
>   signUpQuotaConfig?: {
>     startTime?: string | null,
>     quota?: string | number | null,
>     quotaDuration?: string | null
>   } | null
> } | null
> ```

> [accordion] monitoring full type
>
> ```ts theme={null}
> {
>   requestLogging?: {
>     enabled?: boolean | null
>   } | null
> } | null
> ```

> [accordion] recaptchaConfig full type
>
> ```ts theme={null}
> {
>   useSmsBotScore?: boolean | null,
>   recaptchaKeys?: {
>     key?: string | null,
>     type?: string | null
>   }[] | null,
>   managedRules?: {
>     action?: string | null,
>     endScore?: number | null
>   }[] | null,
>   emailPasswordEnforcementState?: string | null,
>   useSmsTollFraudProtection?: boolean | null,
>   phoneEnforcementState?: string | null,
>   useAccountDefender?: boolean | null,
>   tollFraudManagedRules?: {
>     startScore?: number | null,
>     action?: string | null
>   }[] | null
> } | null
> ```

> [accordion] notification full type
>
> ```ts theme={null}
> {
>   sendEmail?: {
>     dnsInfo?: {
>       domainVerificationRequestTime?: string | null,
>       pendingCustomDomain?: string | null,
>       customDomainState?: string | null,
>       useCustomDomain?: boolean | null,
>       customDomain?: string | null
>     } | null,
>     verifyEmailTemplate?: {
>       bodyFormat?: string | null,
>       senderLocalPart?: string | null,
>       body?: string | null,
>       replyTo?: string | null,
>       senderDisplayName?: string | null,
>       subject?: string | null,
>       customized?: boolean | null
>     } | null,
>     legacyResetPasswordTemplate?: {
>       bodyFormat?: string | null,
>       senderLocalPart?: string | null,
>       body?: string | null,
>       replyTo?: string | null,
>       senderDisplayName?: string | null,
>       subject?: string | null,
>       customized?: boolean | null
>     } | null,
>     resetPasswordTemplate?: {
>       bodyFormat?: string | null,
>       senderLocalPart?: string | null,
>       body?: string | null,
>       replyTo?: string | null,
>       senderDisplayName?: string | null,
>       subject?: string | null,
>       customized?: boolean | null
>     } | null,
>     revertSecondFactorAdditionTemplate?: {
>       bodyFormat?: string | null,
>       senderLocalPart?: string | null,
>       body?: string | null,
>       replyTo?: string | null,
>       senderDisplayName?: string | null,
>       subject?: string | null,
>       customized?: boolean | null
>     } | null,
>     changeEmailTemplate?: {
>       bodyFormat?: string | null,
>       senderLocalPart?: string | null,
>       body?: string | null,
>       replyTo?: string | null,
>       senderDisplayName?: string | null,
>       subject?: string | null,
>       customized?: boolean | null
>     } | null,
>     smtp?: {
>       username?: string | null,
>       password?: string | null,
>       senderEmail?: string | null,
>       port?: number | null,
>       securityMode?: string | null,
>       host?: string | null
>     } | null,
>     method?: string | null,
>     callbackUri?: string | null
>   } | null,
>   sendSms?: {
>     smsTemplate?: {
>       content?: string | null
>     } | null,
>     useDeviceLocale?: boolean | null
>   } | null,
>   defaultLocale?: string | null
> } | null
> ```

> [accordion] emailPrivacyConfig full type
>
> ```ts theme={null}
> {
>   enableImprovedEmailPrivacy?: boolean | null
> } | null
> ```

> [accordion] client full type
>
> ```ts theme={null}
> {
>   permissions?: {
>     disabledUserDeletion?: boolean | null,
>     disabledUserSignup?: boolean | null
>   } | null,
>   firebaseSubdomain?: string | null,
>   apiKey?: string | null
> } | null
> ```

> [accordion] mfa full type
>
> ```ts theme={null}
> {
>   providerConfigs?: {
>     totpProviderConfig?: {
>       adjacentIntervals?: number | null
>     } | null,
>     state?: string | null
>   }[] | null,
>   state?: string | null,
>   enabledProviders?: string[] | null
> } | null
> ```

> [accordion] mobileLinksConfig full type
>
> ```ts theme={null}
> {
>   domain?: string | null
> } | null
> ```

***

### tenants.create

`authAdmin.tenants.create`

Create a tenant. Requires write permission on the Agent project

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.create({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The parent resource name where the tenant will be created. For example, "projects/project1". Format: `projects/<id>`. |
| `allowPasswordSignup` | `boolean` | No | Whether to allow email/password user authentication. |
| `disableAuth` | `boolean` | No | Whether authentication is disabled for the tenant. If true, the users under the disabled tenant are not allowed to sign-in. Admins of the disabled tenant are not able to manage its users. |
| `mfaConfig` | `object` | No | Options related to MultiFactor Authentication for the project. |
| `monitoring` | `object` | No | Configuration related to monitoring project activity. |
| `emailPrivacyConfig` | `object` | No | Configuration for settings related to email privacy and public visibility. Settings in this config protect against email enumeration, but may make some trade-offs in user-friendliness. |
| `smsRegionConfig` | `object` | No | Configures the regions where users are allowed to send verification SMS for the project or tenant. This is based on the calling code of the destination phone number. |
| `client` | `object` | No | Options related to how clients making requests on behalf of a tenant should be configured. |
| `inheritance` | `object` | No | Settings that the tenants will inherit from project level. |
| `enableAnonymousUser` | `boolean` | No | Whether to enable anonymous user authentication. |
| `enableEmailLinkSignin` | `boolean` | No | Whether to enable email link user authentication. |
| `recaptchaConfig` | `object` | No | The reCAPTCHA Enterprise integration config. |
| `testPhoneNumbers` | `Record<string, string>` | No | A map of pairs that can be used for MFA. The phone number should be in E.164 format ([https://www.itu.int/rec/T-REC-E.164/](https://www.itu.int/rec/T-REC-E.164/)) and a maximum of 10 pairs can be added (error will be thrown once exceeded). |
| `autodeleteAnonymousUsers` | `boolean` | No | Whether anonymous users will be auto-deleted after a period of 30 days. |
| `passwordPolicyConfig` | `object` | No | The configuration for the password policy on the project. |
| `mobileLinksConfig` | `object` | No | Configuration mobile links. |
| `displayName` | `string` | No | Display name of the tenant. |

> [accordion] mfaConfig full type
>
> ```ts theme={null}
> {
>   providerConfigs?: {
>     totpProviderConfig?: {
>       adjacentIntervals?: number
>     },
>     state?: MFA_STATE_UNSPECIFIED | DISABLED | ENABLED | MANDATORY
>   }[],
>   state?: STATE_UNSPECIFIED | DISABLED | ENABLED | MANDATORY,
>   enabledProviders?: (PROVIDER_UNSPECIFIED | PHONE_SMS)[]
> }
> ```

> [accordion] monitoring full type
>
> ```ts theme={null}
> {
>   requestLogging?: {
>     enabled?: boolean
>   }
> }
> ```

> [accordion] emailPrivacyConfig full type
>
> ```ts theme={null}
> {
>   enableImprovedEmailPrivacy?: boolean
> }
> ```

> [accordion] smsRegionConfig full type
>
> ```ts theme={null}
> {
>   allowByDefault?: {
>     disallowedRegions?: string[]
>   },
>   allowlistOnly?: {
>     allowedRegions?: string[]
>   }
> }
> ```

> [accordion] client full type
>
> ```ts theme={null}
> {
>   permissions?: {
>     disabledUserDeletion?: boolean,
>     disabledUserSignup?: boolean
>   }
> }
> ```

> [accordion] inheritance full type
>
> ```ts theme={null}
> {
>   emailSendingConfig?: boolean
> }
> ```

> [accordion] recaptchaConfig full type
>
> ```ts theme={null}
> {
>   useSmsBotScore?: boolean,
>   recaptchaKeys?: {
>     key?: string,
>     type?: CLIENT_TYPE_UNSPECIFIED | WEB | IOS | ANDROID
>   }[],
>   managedRules?: {
>     action?: RECAPTCHA_ACTION_UNSPECIFIED | BLOCK,
>     endScore?: number
>   }[],
>   emailPasswordEnforcementState?: RECAPTCHA_PROVIDER_ENFORCEMENT_STATE_UNSPECIFIED | OFF | AUDIT | ENFORCE,
>   useSmsTollFraudProtection?: boolean,
>   phoneEnforcementState?: RECAPTCHA_PROVIDER_ENFORCEMENT_STATE_UNSPECIFIED | OFF | AUDIT | ENFORCE,
>   useAccountDefender?: boolean,
>   tollFraudManagedRules?: {
>     startScore?: number,
>     action?: RECAPTCHA_ACTION_UNSPECIFIED | BLOCK
>   }[]
> }
> ```

> [accordion] passwordPolicyConfig full type
>
> ```ts theme={null}
> {
>   passwordPolicyVersions?: {
>     customStrengthOptions?: {
>       containsLowercaseCharacter?: boolean,
>       maxPasswordLength?: number,
>       minPasswordLength?: number,
>       containsUppercaseCharacter?: boolean,
>       containsNumericCharacter?: boolean,
>       containsNonAlphanumericCharacter?: boolean
>     }
>   }[],
>   forceUpgradeOnSignin?: boolean,
>   passwordPolicyEnforcementState?: PASSWORD_POLICY_ENFORCEMENT_STATE_UNSPECIFIED | OFF | ENFORCE
> }
> ```

> [accordion] mobileLinksConfig full type
>
> ```ts theme={null}
> {
>   domain?: DOMAIN_UNSPECIFIED | FIREBASE_DYNAMIC_LINK_DOMAIN | HOSTING_DOMAIN
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `allowPasswordSignup` | `boolean \| null` | No | Whether to allow email/password user authentication. |
| `disableAuth` | `boolean \| null` | No | Whether authentication is disabled for the tenant. If true, the users under the disabled tenant are not allowed to sign-in. Admins of the disabled tenant are not able to manage its users. |
| `mfaConfig` | `object \| null` | No | Options related to MultiFactor Authentication for the project. |
| `monitoring` | `object \| null` | No | Configuration related to monitoring project activity. |
| `emailPrivacyConfig` | `object \| null` | No | Configuration for settings related to email privacy and public visibility. Settings in this config protect against email enumeration, but may make some trade-offs in user-friendliness. |
| `smsRegionConfig` | `object \| null` | No | Configures the regions where users are allowed to send verification SMS for the project or tenant. This is based on the calling code of the destination phone number. |
| `client` | `object \| null` | No | Options related to how clients making requests on behalf of a tenant should be configured. |
| `inheritance` | `object \| null` | No | Settings that the tenants will inherit from project level. |
| `hashConfig` | `object \| null` | No | History information of the hash algorithm and key. Different accounts' passwords may be generated by different version. |
| `enableAnonymousUser` | `boolean \| null` | No | Whether to enable anonymous user authentication. |
| `enableEmailLinkSignin` | `boolean \| null` | No | Whether to enable email link user authentication. |
| `recaptchaConfig` | `object \| null` | No | The reCAPTCHA Enterprise integration config. |
| `testPhoneNumbers` | `Record<string, string> \| null` | No | A map of pairs that can be used for MFA. The phone number should be in E.164 format ([https://www.itu.int/rec/T-REC-E.164/](https://www.itu.int/rec/T-REC-E.164/)) and a maximum of 10 pairs can be added (error will be thrown once exceeded). |
| `autodeleteAnonymousUsers` | `boolean \| null` | No | Whether anonymous users will be auto-deleted after a period of 30 days. |
| `passwordPolicyConfig` | `object \| null` | No | The configuration for the password policy on the project. |
| `mobileLinksConfig` | `object \| null` | No | Configuration mobile links. |
| `name` | `string \| null` | No | Output only. Resource name of a tenant. For example: "projects/\{project-id}/tenants/\{tenant-id}" |
| `displayName` | `string \| null` | No | Display name of the tenant. |

> [accordion] mfaConfig full type
>
> ```ts theme={null}
> {
>   providerConfigs?: {
>     totpProviderConfig?: {
>       adjacentIntervals?: number | null
>     } | null,
>     state?: string | null
>   }[] | null,
>   state?: string | null,
>   enabledProviders?: string[] | null
> } | null
> ```

> [accordion] monitoring full type
>
> ```ts theme={null}
> {
>   requestLogging?: {
>     enabled?: boolean | null
>   } | null
> } | null
> ```

> [accordion] emailPrivacyConfig full type
>
> ```ts theme={null}
> {
>   enableImprovedEmailPrivacy?: boolean | null
> } | null
> ```

> [accordion] smsRegionConfig full type
>
> ```ts theme={null}
> {
>   allowByDefault?: {
>     disallowedRegions?: string[] | null
>   } | null,
>   allowlistOnly?: {
>     allowedRegions?: string[] | null
>   } | null
> } | null
> ```

> [accordion] client full type
>
> ```ts theme={null}
> {
>   permissions?: {
>     disabledUserDeletion?: boolean | null,
>     disabledUserSignup?: boolean | null
>   } | null
> } | null
> ```

> [accordion] inheritance full type
>
> ```ts theme={null}
> {
>   emailSendingConfig?: boolean | null
> } | null
> ```

> [accordion] hashConfig full type
>
> ```ts theme={null}
> {
>   memoryCost?: number | null,
>   algorithm?: string | null,
>   saltSeparator?: string | null,
>   rounds?: number | null,
>   signerKey?: string | null
> } | null
> ```

> [accordion] recaptchaConfig full type
>
> ```ts theme={null}
> {
>   useSmsBotScore?: boolean | null,
>   recaptchaKeys?: {
>     key?: string | null,
>     type?: string | null
>   }[] | null,
>   managedRules?: {
>     action?: string | null,
>     endScore?: number | null
>   }[] | null,
>   emailPasswordEnforcementState?: string | null,
>   useSmsTollFraudProtection?: boolean | null,
>   phoneEnforcementState?: string | null,
>   useAccountDefender?: boolean | null,
>   tollFraudManagedRules?: {
>     startScore?: number | null,
>     action?: string | null
>   }[] | null
> } | null
> ```

> [accordion] passwordPolicyConfig full type
>
> ```ts theme={null}
> {
>   passwordPolicyVersions?: {
>     customStrengthOptions?: {
>       containsLowercaseCharacter?: boolean | null,
>       maxPasswordLength?: number | null,
>       minPasswordLength?: number | null,
>       containsUppercaseCharacter?: boolean | null,
>       containsNumericCharacter?: boolean | null,
>       containsNonAlphanumericCharacter?: boolean | null
>     } | null,
>     schemaVersion?: number | null
>   }[] | null,
>   lastUpdateTime?: string | null,
>   forceUpgradeOnSignin?: boolean | null,
>   passwordPolicyEnforcementState?: string | null
> } | null
> ```

> [accordion] mobileLinksConfig full type
>
> ```ts theme={null}
> {
>   domain?: string | null
> } | null
> ```

***

### tenants.defaultSupportedIdpConfigs.create

`authAdmin.tenants.defaultSupportedIdpConfigs.create`

Create a default supported Idp configuration for an Identity Toolkit project

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.defaultSupportedIdpConfigs.create({ parent: 'projects/demo-project/tenants/tenant-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The parent resource name where the config to be created, for example: "projects/my-awesome-project" Format: `projects/<id>/tenants/<id>`. |
| `idpId` | `string` | No | The id of the Idp to create a config for. Call ListDefaultSupportedIdps for list of all default supported Idps. |
| `clientId` | `string` | No | OAuth client ID. |
| `clientSecret` | `string` | No | OAuth client secret. |
| `appleSignInConfig` | `object` | No | Additional config for SignInWithApple. |
| `enabled` | `boolean` | No | True if allows the user to sign in with the provider. |
| `name` | `string` | No | The name of the DefaultSupportedIdpConfig resource, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com" |

> [accordion] appleSignInConfig full type
>
> ```ts theme={null}
> {
>   bundleIds?: string[],
>   codeFlowConfig?: {
>     keyId?: string,
>     privateKey?: string,
>     teamId?: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientId` | `string \| null` | No | OAuth client ID. |
| `clientSecret` | `string \| null` | No | OAuth client secret. |
| `appleSignInConfig` | `object \| null` | No | Additional config for SignInWithApple. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |
| `name` | `string \| null` | No | The name of the DefaultSupportedIdpConfig resource, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com" |

> [accordion] appleSignInConfig full type
>
> ```ts theme={null}
> {
>   bundleIds?: string[] | null,
>   codeFlowConfig?: {
>     keyId?: string | null,
>     privateKey?: string | null,
>     teamId?: string | null
>   } | null
> } | null
> ```

***

### tenants.defaultSupportedIdpConfigs.delete

`authAdmin.tenants.defaultSupportedIdpConfigs.delete`

Delete a default supported Idp configuration for an Identity Toolkit project

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.defaultSupportedIdpConfigs.delete({ name: 'projects/demo-project/tenants/tenant-1/defaultSupportedIdpConfigs/google.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the config, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com" Format: `projects/<id>/tenants/<id>/defaultSupportedIdpConfigs/<id>`. |

**Output:** *empty object*

***

### tenants.defaultSupportedIdpConfigs.get

`authAdmin.tenants.defaultSupportedIdpConfigs.get`

Retrieve a default supported Idp configuration for an Identity Toolkit project

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.defaultSupportedIdpConfigs.get({ name: 'projects/demo-project/tenants/tenant-1/defaultSupportedIdpConfigs/google.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the config, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com" Format: `projects/<id>/tenants/<id>/defaultSupportedIdpConfigs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientId` | `string \| null` | No | OAuth client ID. |
| `clientSecret` | `string \| null` | No | OAuth client secret. |
| `appleSignInConfig` | `object \| null` | No | Additional config for SignInWithApple. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |
| `name` | `string \| null` | No | The name of the DefaultSupportedIdpConfig resource, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com" |

> [accordion] appleSignInConfig full type
>
> ```ts theme={null}
> {
>   bundleIds?: string[] | null,
>   codeFlowConfig?: {
>     keyId?: string | null,
>     privateKey?: string | null,
>     teamId?: string | null
>   } | null
> } | null
> ```

***

### tenants.defaultSupportedIdpConfigs.list

`authAdmin.tenants.defaultSupportedIdpConfigs.list`

List all default supported Idp configurations for an Identity Toolkit project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.defaultSupportedIdpConfigs.list({ parent: 'projects/demo-project/tenants/tenant-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The parent resource name, for example, "projects/my-awesome-project". Format: `projects/<id>/tenants/<id>`. |
| `pageSize` | `number` | No | The maximum number of items to return. |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous List request, if any. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Token to retrieve the next page of results, or empty if there are no more results in the list. |
| `defaultSupportedIdpConfigs` | `object[] \| null` | No | The set of configs. |

> [accordion] defaultSupportedIdpConfigs full type
>
> ```ts theme={null}
> {
>   clientId?: string | null,
>   clientSecret?: string | null,
>   appleSignInConfig?: {
>     bundleIds?: string[] | null,
>     codeFlowConfig?: {
>       keyId?: string | null,
>       privateKey?: string | null,
>       teamId?: string | null
>     } | null
>   } | null,
>   enabled?: boolean | null,
>   name?: string | null
> }[] | null
> ```

***

### tenants.defaultSupportedIdpConfigs.patch

`authAdmin.tenants.defaultSupportedIdpConfigs.patch`

Update a default supported Idp configuration for an Identity Toolkit project

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.defaultSupportedIdpConfigs.patch({ name: 'projects/demo-project/tenants/tenant-1/defaultSupportedIdpConfigs/google.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | The update mask applies to the resource. For the `FieldMask` definition, see [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) |
| `name` | `string` | Yes | The name of the DefaultSupportedIdpConfig resource, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com" Format: `projects/<id>/tenants/<id>/defaultSupportedIdpConfigs/<id>`. |
| `clientId` | `string` | No | OAuth client ID. |
| `clientSecret` | `string` | No | OAuth client secret. |
| `appleSignInConfig` | `object` | No | Additional config for SignInWithApple. |
| `enabled` | `boolean` | No | True if allows the user to sign in with the provider. |
| `body_name` | `string` | No | The name of the DefaultSupportedIdpConfig resource, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com" |

> [accordion] appleSignInConfig full type
>
> ```ts theme={null}
> {
>   bundleIds?: string[],
>   codeFlowConfig?: {
>     keyId?: string,
>     privateKey?: string,
>     teamId?: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientId` | `string \| null` | No | OAuth client ID. |
| `clientSecret` | `string \| null` | No | OAuth client secret. |
| `appleSignInConfig` | `object \| null` | No | Additional config for SignInWithApple. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |
| `name` | `string \| null` | No | The name of the DefaultSupportedIdpConfig resource, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com" |

> [accordion] appleSignInConfig full type
>
> ```ts theme={null}
> {
>   bundleIds?: string[] | null,
>   codeFlowConfig?: {
>     keyId?: string | null,
>     privateKey?: string | null,
>     teamId?: string | null
>   } | null
> } | null
> ```

***

### tenants.delete

`authAdmin.tenants.delete`

Delete a tenant. Requires write permission on the Agent project

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.delete({ name: 'projects/demo-project/tenants/tenant-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Resource name of the tenant to delete. Format: `projects/<id>/tenants/<id>`. |

**Output:** *empty object*

***

### tenants.get

`authAdmin.tenants.get`

Get a tenant. Requires read permission on the Tenant resource

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.get({ name: 'projects/demo-project/tenants/tenant-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Resource name of the tenant to retrieve. Format: `projects/<id>/tenants/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `allowPasswordSignup` | `boolean \| null` | No | Whether to allow email/password user authentication. |
| `disableAuth` | `boolean \| null` | No | Whether authentication is disabled for the tenant. If true, the users under the disabled tenant are not allowed to sign-in. Admins of the disabled tenant are not able to manage its users. |
| `mfaConfig` | `object \| null` | No | Options related to MultiFactor Authentication for the project. |
| `monitoring` | `object \| null` | No | Configuration related to monitoring project activity. |
| `emailPrivacyConfig` | `object \| null` | No | Configuration for settings related to email privacy and public visibility. Settings in this config protect against email enumeration, but may make some trade-offs in user-friendliness. |
| `smsRegionConfig` | `object \| null` | No | Configures the regions where users are allowed to send verification SMS for the project or tenant. This is based on the calling code of the destination phone number. |
| `client` | `object \| null` | No | Options related to how clients making requests on behalf of a tenant should be configured. |
| `inheritance` | `object \| null` | No | Settings that the tenants will inherit from project level. |
| `hashConfig` | `object \| null` | No | History information of the hash algorithm and key. Different accounts' passwords may be generated by different version. |
| `enableAnonymousUser` | `boolean \| null` | No | Whether to enable anonymous user authentication. |
| `enableEmailLinkSignin` | `boolean \| null` | No | Whether to enable email link user authentication. |
| `recaptchaConfig` | `object \| null` | No | The reCAPTCHA Enterprise integration config. |
| `testPhoneNumbers` | `Record<string, string> \| null` | No | A map of pairs that can be used for MFA. The phone number should be in E.164 format ([https://www.itu.int/rec/T-REC-E.164/](https://www.itu.int/rec/T-REC-E.164/)) and a maximum of 10 pairs can be added (error will be thrown once exceeded). |
| `autodeleteAnonymousUsers` | `boolean \| null` | No | Whether anonymous users will be auto-deleted after a period of 30 days. |
| `passwordPolicyConfig` | `object \| null` | No | The configuration for the password policy on the project. |
| `mobileLinksConfig` | `object \| null` | No | Configuration mobile links. |
| `name` | `string \| null` | No | Output only. Resource name of a tenant. For example: "projects/\{project-id}/tenants/\{tenant-id}" |
| `displayName` | `string \| null` | No | Display name of the tenant. |

> [accordion] mfaConfig full type
>
> ```ts theme={null}
> {
>   providerConfigs?: {
>     totpProviderConfig?: {
>       adjacentIntervals?: number | null
>     } | null,
>     state?: string | null
>   }[] | null,
>   state?: string | null,
>   enabledProviders?: string[] | null
> } | null
> ```

> [accordion] monitoring full type
>
> ```ts theme={null}
> {
>   requestLogging?: {
>     enabled?: boolean | null
>   } | null
> } | null
> ```

> [accordion] emailPrivacyConfig full type
>
> ```ts theme={null}
> {
>   enableImprovedEmailPrivacy?: boolean | null
> } | null
> ```

> [accordion] smsRegionConfig full type
>
> ```ts theme={null}
> {
>   allowByDefault?: {
>     disallowedRegions?: string[] | null
>   } | null,
>   allowlistOnly?: {
>     allowedRegions?: string[] | null
>   } | null
> } | null
> ```

> [accordion] client full type
>
> ```ts theme={null}
> {
>   permissions?: {
>     disabledUserDeletion?: boolean | null,
>     disabledUserSignup?: boolean | null
>   } | null
> } | null
> ```

> [accordion] inheritance full type
>
> ```ts theme={null}
> {
>   emailSendingConfig?: boolean | null
> } | null
> ```

> [accordion] hashConfig full type
>
> ```ts theme={null}
> {
>   memoryCost?: number | null,
>   algorithm?: string | null,
>   saltSeparator?: string | null,
>   rounds?: number | null,
>   signerKey?: string | null
> } | null
> ```

> [accordion] recaptchaConfig full type
>
> ```ts theme={null}
> {
>   useSmsBotScore?: boolean | null,
>   recaptchaKeys?: {
>     key?: string | null,
>     type?: string | null
>   }[] | null,
>   managedRules?: {
>     action?: string | null,
>     endScore?: number | null
>   }[] | null,
>   emailPasswordEnforcementState?: string | null,
>   useSmsTollFraudProtection?: boolean | null,
>   phoneEnforcementState?: string | null,
>   useAccountDefender?: boolean | null,
>   tollFraudManagedRules?: {
>     startScore?: number | null,
>     action?: string | null
>   }[] | null
> } | null
> ```

> [accordion] passwordPolicyConfig full type
>
> ```ts theme={null}
> {
>   passwordPolicyVersions?: {
>     customStrengthOptions?: {
>       containsLowercaseCharacter?: boolean | null,
>       maxPasswordLength?: number | null,
>       minPasswordLength?: number | null,
>       containsUppercaseCharacter?: boolean | null,
>       containsNumericCharacter?: boolean | null,
>       containsNonAlphanumericCharacter?: boolean | null
>     } | null,
>     schemaVersion?: number | null
>   }[] | null,
>   lastUpdateTime?: string | null,
>   forceUpgradeOnSignin?: boolean | null,
>   passwordPolicyEnforcementState?: string | null
> } | null
> ```

> [accordion] mobileLinksConfig full type
>
> ```ts theme={null}
> {
>   domain?: string | null
> } | null
> ```

***

### tenants.getIamPolicy

`authAdmin.tenants.getIamPolicy`

Gets the access control policy for a resource. An error is returned if the resource does not exist

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.getIamPolicy({ resource: 'projects/demo-project/tenants/tenant-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/tenants/<id>`. |
| `options` | `object` | No | Encapsulates settings provided to GetIamPolicy. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     description?: string | null,
>     location?: string | null,
>     title?: string | null,
>     expression?: string | null
>   } | null,
>   role?: string | null,
>   members?: string[] | null
> }[] | null
> ```

***

### tenants.inboundSamlConfigs.create

`authAdmin.tenants.inboundSamlConfigs.create`

Create an inbound SAML configuration for an Identity Toolkit project

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.inboundSamlConfigs.create({ parent: 'projects/demo-project/tenants/tenant-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The parent resource name where the config to be created, for example: "projects/my-awesome-project" Format: `projects/<id>/tenants/<id>`. |
| `inboundSamlConfigId` | `string` | No | The id to use for this config. |
| `name` | `string` | No | The name of the InboundSamlConfig resource, for example: 'projects/my-awesome-project/inboundSamlConfigs/my-config-id'. Ignored during create requests. |
| `displayName` | `string` | No | The config's display name set by developers. |
| `enabled` | `boolean` | No | True if allows the user to sign in with the provider. |
| `idpConfig` | `object` | No | The SAML IdP (Identity Provider) configuration when the project acts as the relying party. |
| `spConfig` | `object` | No | The SAML SP (Service Provider) configuration when the project acts as the relying party to receive and accept an authentication assertion issued by a SAML identity provider. |

> [accordion] idpConfig full type
>
> ```ts theme={null}
> {
>   ssoUrl?: string,
>   idpCertificates?: {
>     x509Certificate?: string
>   }[],
>   signRequest?: boolean,
>   idpEntityId?: string
> }
> ```

> [accordion] spConfig full type
>
> ```ts theme={null}
> {
>   callbackUri?: string,
>   spEntityId?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The name of the InboundSamlConfig resource, for example: 'projects/my-awesome-project/inboundSamlConfigs/my-config-id'. Ignored during create requests. |
| `displayName` | `string \| null` | No | The config's display name set by developers. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |
| `idpConfig` | `object \| null` | No | The SAML IdP (Identity Provider) configuration when the project acts as the relying party. |
| `spConfig` | `object \| null` | No | The SAML SP (Service Provider) configuration when the project acts as the relying party to receive and accept an authentication assertion issued by a SAML identity provider. |

> [accordion] idpConfig full type
>
> ```ts theme={null}
> {
>   ssoUrl?: string | null,
>   idpCertificates?: {
>     x509Certificate?: string | null
>   }[] | null,
>   signRequest?: boolean | null,
>   idpEntityId?: string | null
> } | null
> ```

> [accordion] spConfig full type
>
> ```ts theme={null}
> {
>   spCertificates?: {
>     x509Certificate?: string | null,
>     expiresAt?: string | null
>   }[] | null,
>   callbackUri?: string | null,
>   spEntityId?: string | null
> } | null
> ```

***

### tenants.inboundSamlConfigs.delete

`authAdmin.tenants.inboundSamlConfigs.delete`

Delete an inbound SAML configuration for an Identity Toolkit project

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.inboundSamlConfigs.delete({ name: 'projects/demo-project/tenants/tenant-1/inboundSamlConfigs/saml.example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the config to be deleted, for example: 'projects/my-awesome-project/inboundSamlConfigs/my-config-id'. Format: `projects/<id>/tenants/<id>/inboundSamlConfigs/<id>`. |

**Output:** *empty object*

***

### tenants.inboundSamlConfigs.get

`authAdmin.tenants.inboundSamlConfigs.get`

Retrieve an inbound SAML configuration for an Identity Toolkit project

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.inboundSamlConfigs.get({ name: 'projects/demo-project/tenants/tenant-1/inboundSamlConfigs/saml.example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the config, for example: 'projects/my-awesome-project/inboundSamlConfigs/my-config-id'. Format: `projects/<id>/tenants/<id>/inboundSamlConfigs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The name of the InboundSamlConfig resource, for example: 'projects/my-awesome-project/inboundSamlConfigs/my-config-id'. Ignored during create requests. |
| `displayName` | `string \| null` | No | The config's display name set by developers. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |
| `idpConfig` | `object \| null` | No | The SAML IdP (Identity Provider) configuration when the project acts as the relying party. |
| `spConfig` | `object \| null` | No | The SAML SP (Service Provider) configuration when the project acts as the relying party to receive and accept an authentication assertion issued by a SAML identity provider. |

> [accordion] idpConfig full type
>
> ```ts theme={null}
> {
>   ssoUrl?: string | null,
>   idpCertificates?: {
>     x509Certificate?: string | null
>   }[] | null,
>   signRequest?: boolean | null,
>   idpEntityId?: string | null
> } | null
> ```

> [accordion] spConfig full type
>
> ```ts theme={null}
> {
>   spCertificates?: {
>     x509Certificate?: string | null,
>     expiresAt?: string | null
>   }[] | null,
>   callbackUri?: string | null,
>   spEntityId?: string | null
> } | null
> ```

***

### tenants.inboundSamlConfigs.list

`authAdmin.tenants.inboundSamlConfigs.list`

List all inbound SAML configurations for an Identity Toolkit project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.inboundSamlConfigs.list({ parent: 'projects/demo-project/tenants/tenant-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The maximum number of items to return. |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous List request, if any. |
| `parent` | `string` | Yes | The parent resource name, for example, "projects/my-awesome-project". Format: `projects/<id>/tenants/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `inboundSamlConfigs` | `object[] \| null` | No | The set of configs. |
| `nextPageToken` | `string \| null` | No | Token to retrieve the next page of results, or empty if there are no more results in the list. |

> [accordion] inboundSamlConfigs full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   displayName?: string | null,
>   enabled?: boolean | null,
>   idpConfig?: {
>     ssoUrl?: string | null,
>     idpCertificates?: {
>       x509Certificate?: string | null
>     }[] | null,
>     signRequest?: boolean | null,
>     idpEntityId?: string | null
>   } | null,
>   spConfig?: {
>     spCertificates?: {
>       x509Certificate?: string | null,
>       expiresAt?: string | null
>     }[] | null,
>     callbackUri?: string | null,
>     spEntityId?: string | null
>   } | null
> }[] | null
> ```

***

### tenants.inboundSamlConfigs.patch

`authAdmin.tenants.inboundSamlConfigs.patch`

Update an inbound SAML configuration for an Identity Toolkit project

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.inboundSamlConfigs.patch({ name: 'projects/demo-project/tenants/tenant-1/inboundSamlConfigs/saml.example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the InboundSamlConfig resource, for example: 'projects/my-awesome-project/inboundSamlConfigs/my-config-id'. Ignored during create requests. Format: `projects/<id>/tenants/<id>/inboundSamlConfigs/<id>`. |
| `updateMask` | `string` | No | The update mask applies to the resource. Empty update mask will result in updating nothing. For the `FieldMask` definition, see [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) |
| `body_name` | `string` | No | The name of the InboundSamlConfig resource, for example: 'projects/my-awesome-project/inboundSamlConfigs/my-config-id'. Ignored during create requests. |
| `displayName` | `string` | No | The config's display name set by developers. |
| `enabled` | `boolean` | No | True if allows the user to sign in with the provider. |
| `idpConfig` | `object` | No | The SAML IdP (Identity Provider) configuration when the project acts as the relying party. |
| `spConfig` | `object` | No | The SAML SP (Service Provider) configuration when the project acts as the relying party to receive and accept an authentication assertion issued by a SAML identity provider. |

> [accordion] idpConfig full type
>
> ```ts theme={null}
> {
>   ssoUrl?: string,
>   idpCertificates?: {
>     x509Certificate?: string
>   }[],
>   signRequest?: boolean,
>   idpEntityId?: string
> }
> ```

> [accordion] spConfig full type
>
> ```ts theme={null}
> {
>   callbackUri?: string,
>   spEntityId?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The name of the InboundSamlConfig resource, for example: 'projects/my-awesome-project/inboundSamlConfigs/my-config-id'. Ignored during create requests. |
| `displayName` | `string \| null` | No | The config's display name set by developers. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |
| `idpConfig` | `object \| null` | No | The SAML IdP (Identity Provider) configuration when the project acts as the relying party. |
| `spConfig` | `object \| null` | No | The SAML SP (Service Provider) configuration when the project acts as the relying party to receive and accept an authentication assertion issued by a SAML identity provider. |

> [accordion] idpConfig full type
>
> ```ts theme={null}
> {
>   ssoUrl?: string | null,
>   idpCertificates?: {
>     x509Certificate?: string | null
>   }[] | null,
>   signRequest?: boolean | null,
>   idpEntityId?: string | null
> } | null
> ```

> [accordion] spConfig full type
>
> ```ts theme={null}
> {
>   spCertificates?: {
>     x509Certificate?: string | null,
>     expiresAt?: string | null
>   }[] | null,
>   callbackUri?: string | null,
>   spEntityId?: string | null
> } | null
> ```

***

### tenants.list

`authAdmin.tenants.list`

List tenants under the given agent project. Requires read permission on the Agent project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The maximum number of results to return, capped at 1000. If not specified, the default value is 20. |
| `pageToken` | `string` | No | The pagination token from the response of a previous request. |
| `parent` | `string` | Yes | Required. The parent resource name to list tenants for. Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tenants` | `object[] \| null` | No | A list of tenants under the given agent project. |
| `nextPageToken` | `string \| null` | No | The token to get the next page of results. |

> [accordion] tenants full type
>
> ```ts theme={null}
> {
>   allowPasswordSignup?: boolean | null,
>   disableAuth?: boolean | null,
>   mfaConfig?: {
>     providerConfigs?: {
>       totpProviderConfig?: {
>         adjacentIntervals?: number | null
>       } | null,
>       state?: string | null
>     }[] | null,
>     state?: string | null,
>     enabledProviders?: string[] | null
>   } | null,
>   monitoring?: {
>     requestLogging?: {
>       enabled?: boolean | null
>     } | null
>   } | null,
>   emailPrivacyConfig?: {
>     enableImprovedEmailPrivacy?: boolean | null
>   } | null,
>   smsRegionConfig?: {
>     allowByDefault?: {
>       disallowedRegions?: string[] | null
>     } | null,
>     allowlistOnly?: {
>       allowedRegions?: string[] | null
>     } | null
>   } | null,
>   client?: {
>     permissions?: {
>       disabledUserDeletion?: boolean | null,
>       disabledUserSignup?: boolean | null
>     } | null
>   } | null,
>   inheritance?: {
>     emailSendingConfig?: boolean | null
>   } | null,
>   hashConfig?: {
>     memoryCost?: number | null,
>     algorithm?: string | null,
>     saltSeparator?: string | null,
>     rounds?: number | null,
>     signerKey?: string | null
>   } | null,
>   enableAnonymousUser?: boolean | null,
>   enableEmailLinkSignin?: boolean | null,
>   recaptchaConfig?: {
>     useSmsBotScore?: boolean | null,
>     recaptchaKeys?: {
>       key?: string | null,
>       type?: string | null
>     }[] | null,
>     managedRules?: {
>       action?: string | null,
>       endScore?: number | null
>     }[] | null,
>     emailPasswordEnforcementState?: string | null,
>     useSmsTollFraudProtection?: boolean | null,
>     phoneEnforcementState?: string | null,
>     useAccountDefender?: boolean | null,
>     tollFraudManagedRules?: {
>       startScore?: number | null,
>       action?: string | null
>     }[] | null
>   } | null,
>   testPhoneNumbers?: Record<string, string> | null,
>   autodeleteAnonymousUsers?: boolean | null,
>   passwordPolicyConfig?: {
>     passwordPolicyVersions?: {
>       customStrengthOptions?: {
>         containsLowercaseCharacter?: boolean | null,
>         maxPasswordLength?: number | null,
>         minPasswordLength?: number | null,
>         containsUppercaseCharacter?: boolean | null,
>         containsNumericCharacter?: boolean | null,
>         containsNonAlphanumericCharacter?: boolean | null
>       } | null,
>       schemaVersion?: number | null
>     }[] | null,
>     lastUpdateTime?: string | null,
>     forceUpgradeOnSignin?: boolean | null,
>     passwordPolicyEnforcementState?: string | null
>   } | null,
>   mobileLinksConfig?: {
>     domain?: string | null
>   } | null,
>   name?: string | null,
>   displayName?: string | null
> }[] | null
> ```

***

### tenants.oauthIdpConfigs.create

`authAdmin.tenants.oauthIdpConfigs.create`

Create an Oidc Idp configuration for an Identity Toolkit project

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.oauthIdpConfigs.create({ parent: 'projects/demo-project/tenants/tenant-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `oauthIdpConfigId` | `string` | No | The id to use for this config. |
| `parent` | `string` | Yes | The parent resource name where the config to be created, for example: "projects/my-awesome-project" Format: `projects/<id>/tenants/<id>`. |
| `issuer` | `string` | No | For OIDC Idps, the issuer identifier. |
| `responseType` | `object` | No | The response type to request for in the OAuth authorization flow. You can set either `id_token` or `code` to true, but not both. Setting both types to be simultaneously true (`{code: true, id_token: true}`) is not yet supported. See [https://openid.net/specs/openid-connect-core-1\_0.html#Authentication](https://openid.net/specs/openid-connect-core-1_0.html#Authentication) for a mapping of response type to OAuth 2.0 flow. |
| `displayName` | `string` | No | The config's display name set by developers. |
| `clientSecret` | `string` | No | The client secret of the OAuth client, to enable OIDC code flow. |
| `name` | `string` | No | The name of the OAuthIdpConfig resource, for example: 'projects/my-awesome-project/oauthIdpConfigs/oauth-config-id'. Ignored during create requests. |
| `clientId` | `string` | No | The client id of an OAuth client. |
| `enabled` | `boolean` | No | True if allows the user to sign in with the provider. |

> [accordion] responseType full type
>
> ```ts theme={null}
> {
>   idToken?: boolean,
>   code?: boolean,
>   token?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `issuer` | `string \| null` | No | For OIDC Idps, the issuer identifier. |
| `responseType` | `object \| null` | No | The response type to request for in the OAuth authorization flow. You can set either `id_token` or `code` to true, but not both. Setting both types to be simultaneously true (`{code: true, id_token: true}`) is not yet supported. See [https://openid.net/specs/openid-connect-core-1\_0.html#Authentication](https://openid.net/specs/openid-connect-core-1_0.html#Authentication) for a mapping of response type to OAuth 2.0 flow. |
| `displayName` | `string \| null` | No | The config's display name set by developers. |
| `clientSecret` | `string \| null` | No | The client secret of the OAuth client, to enable OIDC code flow. |
| `name` | `string \| null` | No | The name of the OAuthIdpConfig resource, for example: 'projects/my-awesome-project/oauthIdpConfigs/oauth-config-id'. Ignored during create requests. |
| `clientId` | `string \| null` | No | The client id of an OAuth client. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |

> [accordion] responseType full type
>
> ```ts theme={null}
> {
>   idToken?: boolean | null,
>   code?: boolean | null,
>   token?: boolean | null
> } | null
> ```

***

### tenants.oauthIdpConfigs.delete

`authAdmin.tenants.oauthIdpConfigs.delete`

Delete an Oidc Idp configuration for an Identity Toolkit project

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.oauthIdpConfigs.delete({ name: 'projects/demo-project/tenants/tenant-1/oauthIdpConfigs/oidc.example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the config to be deleted, for example: 'projects/my-awesome-project/oauthIdpConfigs/oauth-config-id'. Format: `projects/<id>/tenants/<id>/oauthIdpConfigs/<id>`. |

**Output:** *empty object*

***

### tenants.oauthIdpConfigs.get

`authAdmin.tenants.oauthIdpConfigs.get`

Retrieve an Oidc Idp configuration for an Identity Toolkit project

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.oauthIdpConfigs.get({ name: 'projects/demo-project/tenants/tenant-1/oauthIdpConfigs/oidc.example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the config, for example: 'projects/my-awesome-project/oauthIdpConfigs/oauth-config-id'. Format: `projects/<id>/tenants/<id>/oauthIdpConfigs/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `issuer` | `string \| null` | No | For OIDC Idps, the issuer identifier. |
| `responseType` | `object \| null` | No | The response type to request for in the OAuth authorization flow. You can set either `id_token` or `code` to true, but not both. Setting both types to be simultaneously true (`{code: true, id_token: true}`) is not yet supported. See [https://openid.net/specs/openid-connect-core-1\_0.html#Authentication](https://openid.net/specs/openid-connect-core-1_0.html#Authentication) for a mapping of response type to OAuth 2.0 flow. |
| `displayName` | `string \| null` | No | The config's display name set by developers. |
| `clientSecret` | `string \| null` | No | The client secret of the OAuth client, to enable OIDC code flow. |
| `name` | `string \| null` | No | The name of the OAuthIdpConfig resource, for example: 'projects/my-awesome-project/oauthIdpConfigs/oauth-config-id'. Ignored during create requests. |
| `clientId` | `string \| null` | No | The client id of an OAuth client. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |

> [accordion] responseType full type
>
> ```ts theme={null}
> {
>   idToken?: boolean | null,
>   code?: boolean | null,
>   token?: boolean | null
> } | null
> ```

***

### tenants.oauthIdpConfigs.list

`authAdmin.tenants.oauthIdpConfigs.list`

List all Oidc Idp configurations for an Identity Toolkit project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.oauthIdpConfigs.list({ parent: 'projects/demo-project/tenants/tenant-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The maximum number of items to return. |
| `parent` | `string` | Yes | The parent resource name, for example, "projects/my-awesome-project". Format: `projects/<id>/tenants/<id>`. |
| `pageToken` | `string` | No | The next\_page\_token value returned from a previous List request, if any. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Token to retrieve the next page of results, or empty if there are no more results in the list. |
| `oauthIdpConfigs` | `object[] \| null` | No | The set of configs. |

> [accordion] oauthIdpConfigs full type
>
> ```ts theme={null}
> {
>   issuer?: string | null,
>   responseType?: {
>     idToken?: boolean | null,
>     code?: boolean | null,
>     token?: boolean | null
>   } | null,
>   displayName?: string | null,
>   clientSecret?: string | null,
>   name?: string | null,
>   clientId?: string | null,
>   enabled?: boolean | null
> }[] | null
> ```

***

### tenants.oauthIdpConfigs.patch

`authAdmin.tenants.oauthIdpConfigs.patch`

Update an Oidc Idp configuration for an Identity Toolkit project

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.oauthIdpConfigs.patch({ name: 'projects/demo-project/tenants/tenant-1/oauthIdpConfigs/oidc.example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | The update mask applies to the resource. Empty update mask will result in updating nothing. For the `FieldMask` definition, see [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) |
| `name` | `string` | Yes | The name of the OAuthIdpConfig resource, for example: 'projects/my-awesome-project/oauthIdpConfigs/oauth-config-id'. Ignored during create requests. Format: `projects/<id>/tenants/<id>/oauthIdpConfigs/<id>`. |
| `issuer` | `string` | No | For OIDC Idps, the issuer identifier. |
| `responseType` | `object` | No | The response type to request for in the OAuth authorization flow. You can set either `id_token` or `code` to true, but not both. Setting both types to be simultaneously true (`{code: true, id_token: true}`) is not yet supported. See [https://openid.net/specs/openid-connect-core-1\_0.html#Authentication](https://openid.net/specs/openid-connect-core-1_0.html#Authentication) for a mapping of response type to OAuth 2.0 flow. |
| `displayName` | `string` | No | The config's display name set by developers. |
| `clientSecret` | `string` | No | The client secret of the OAuth client, to enable OIDC code flow. |
| `body_name` | `string` | No | The name of the OAuthIdpConfig resource, for example: 'projects/my-awesome-project/oauthIdpConfigs/oauth-config-id'. Ignored during create requests. |
| `clientId` | `string` | No | The client id of an OAuth client. |
| `enabled` | `boolean` | No | True if allows the user to sign in with the provider. |

> [accordion] responseType full type
>
> ```ts theme={null}
> {
>   idToken?: boolean,
>   code?: boolean,
>   token?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `issuer` | `string \| null` | No | For OIDC Idps, the issuer identifier. |
| `responseType` | `object \| null` | No | The response type to request for in the OAuth authorization flow. You can set either `id_token` or `code` to true, but not both. Setting both types to be simultaneously true (`{code: true, id_token: true}`) is not yet supported. See [https://openid.net/specs/openid-connect-core-1\_0.html#Authentication](https://openid.net/specs/openid-connect-core-1_0.html#Authentication) for a mapping of response type to OAuth 2.0 flow. |
| `displayName` | `string \| null` | No | The config's display name set by developers. |
| `clientSecret` | `string \| null` | No | The client secret of the OAuth client, to enable OIDC code flow. |
| `name` | `string \| null` | No | The name of the OAuthIdpConfig resource, for example: 'projects/my-awesome-project/oauthIdpConfigs/oauth-config-id'. Ignored during create requests. |
| `clientId` | `string \| null` | No | The client id of an OAuth client. |
| `enabled` | `boolean \| null` | No | True if allows the user to sign in with the provider. |

> [accordion] responseType full type
>
> ```ts theme={null}
> {
>   idToken?: boolean | null,
>   code?: boolean | null,
>   token?: boolean | null
> } | null
> ```

***

### tenants.patch

`authAdmin.tenants.patch`

Update a tenant. Requires write permission on the Tenant resource

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.patch({ name: 'projects/demo-project/tenants/tenant-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | If provided, only update fields set in the update mask. Otherwise, all settable fields will be updated. For the `FieldMask` definition, see [https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask) |
| `name` | `string` | Yes | Output only. Resource name of a tenant. For example: "projects/\{project-id}/tenants/\{tenant-id}" Format: `projects/<id>/tenants/<id>`. |
| `allowPasswordSignup` | `boolean` | No | Whether to allow email/password user authentication. |
| `disableAuth` | `boolean` | No | Whether authentication is disabled for the tenant. If true, the users under the disabled tenant are not allowed to sign-in. Admins of the disabled tenant are not able to manage its users. |
| `mfaConfig` | `object` | No | Options related to MultiFactor Authentication for the project. |
| `monitoring` | `object` | No | Configuration related to monitoring project activity. |
| `emailPrivacyConfig` | `object` | No | Configuration for settings related to email privacy and public visibility. Settings in this config protect against email enumeration, but may make some trade-offs in user-friendliness. |
| `smsRegionConfig` | `object` | No | Configures the regions where users are allowed to send verification SMS for the project or tenant. This is based on the calling code of the destination phone number. |
| `client` | `object` | No | Options related to how clients making requests on behalf of a tenant should be configured. |
| `inheritance` | `object` | No | Settings that the tenants will inherit from project level. |
| `enableAnonymousUser` | `boolean` | No | Whether to enable anonymous user authentication. |
| `enableEmailLinkSignin` | `boolean` | No | Whether to enable email link user authentication. |
| `recaptchaConfig` | `object` | No | The reCAPTCHA Enterprise integration config. |
| `testPhoneNumbers` | `Record<string, string>` | No | A map of pairs that can be used for MFA. The phone number should be in E.164 format ([https://www.itu.int/rec/T-REC-E.164/](https://www.itu.int/rec/T-REC-E.164/)) and a maximum of 10 pairs can be added (error will be thrown once exceeded). |
| `autodeleteAnonymousUsers` | `boolean` | No | Whether anonymous users will be auto-deleted after a period of 30 days. |
| `passwordPolicyConfig` | `object` | No | The configuration for the password policy on the project. |
| `mobileLinksConfig` | `object` | No | Configuration mobile links. |
| `displayName` | `string` | No | Display name of the tenant. |

> [accordion] mfaConfig full type
>
> ```ts theme={null}
> {
>   providerConfigs?: {
>     totpProviderConfig?: {
>       adjacentIntervals?: number
>     },
>     state?: MFA_STATE_UNSPECIFIED | DISABLED | ENABLED | MANDATORY
>   }[],
>   state?: STATE_UNSPECIFIED | DISABLED | ENABLED | MANDATORY,
>   enabledProviders?: (PROVIDER_UNSPECIFIED | PHONE_SMS)[]
> }
> ```

> [accordion] monitoring full type
>
> ```ts theme={null}
> {
>   requestLogging?: {
>     enabled?: boolean
>   }
> }
> ```

> [accordion] emailPrivacyConfig full type
>
> ```ts theme={null}
> {
>   enableImprovedEmailPrivacy?: boolean
> }
> ```

> [accordion] smsRegionConfig full type
>
> ```ts theme={null}
> {
>   allowByDefault?: {
>     disallowedRegions?: string[]
>   },
>   allowlistOnly?: {
>     allowedRegions?: string[]
>   }
> }
> ```

> [accordion] client full type
>
> ```ts theme={null}
> {
>   permissions?: {
>     disabledUserDeletion?: boolean,
>     disabledUserSignup?: boolean
>   }
> }
> ```

> [accordion] inheritance full type
>
> ```ts theme={null}
> {
>   emailSendingConfig?: boolean
> }
> ```

> [accordion] recaptchaConfig full type
>
> ```ts theme={null}
> {
>   useSmsBotScore?: boolean,
>   recaptchaKeys?: {
>     key?: string,
>     type?: CLIENT_TYPE_UNSPECIFIED | WEB | IOS | ANDROID
>   }[],
>   managedRules?: {
>     action?: RECAPTCHA_ACTION_UNSPECIFIED | BLOCK,
>     endScore?: number
>   }[],
>   emailPasswordEnforcementState?: RECAPTCHA_PROVIDER_ENFORCEMENT_STATE_UNSPECIFIED | OFF | AUDIT | ENFORCE,
>   useSmsTollFraudProtection?: boolean,
>   phoneEnforcementState?: RECAPTCHA_PROVIDER_ENFORCEMENT_STATE_UNSPECIFIED | OFF | AUDIT | ENFORCE,
>   useAccountDefender?: boolean,
>   tollFraudManagedRules?: {
>     startScore?: number,
>     action?: RECAPTCHA_ACTION_UNSPECIFIED | BLOCK
>   }[]
> }
> ```

> [accordion] passwordPolicyConfig full type
>
> ```ts theme={null}
> {
>   passwordPolicyVersions?: {
>     customStrengthOptions?: {
>       containsLowercaseCharacter?: boolean,
>       maxPasswordLength?: number,
>       minPasswordLength?: number,
>       containsUppercaseCharacter?: boolean,
>       containsNumericCharacter?: boolean,
>       containsNonAlphanumericCharacter?: boolean
>     }
>   }[],
>   forceUpgradeOnSignin?: boolean,
>   passwordPolicyEnforcementState?: PASSWORD_POLICY_ENFORCEMENT_STATE_UNSPECIFIED | OFF | ENFORCE
> }
> ```

> [accordion] mobileLinksConfig full type
>
> ```ts theme={null}
> {
>   domain?: DOMAIN_UNSPECIFIED | FIREBASE_DYNAMIC_LINK_DOMAIN | HOSTING_DOMAIN
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `allowPasswordSignup` | `boolean \| null` | No | Whether to allow email/password user authentication. |
| `disableAuth` | `boolean \| null` | No | Whether authentication is disabled for the tenant. If true, the users under the disabled tenant are not allowed to sign-in. Admins of the disabled tenant are not able to manage its users. |
| `mfaConfig` | `object \| null` | No | Options related to MultiFactor Authentication for the project. |
| `monitoring` | `object \| null` | No | Configuration related to monitoring project activity. |
| `emailPrivacyConfig` | `object \| null` | No | Configuration for settings related to email privacy and public visibility. Settings in this config protect against email enumeration, but may make some trade-offs in user-friendliness. |
| `smsRegionConfig` | `object \| null` | No | Configures the regions where users are allowed to send verification SMS for the project or tenant. This is based on the calling code of the destination phone number. |
| `client` | `object \| null` | No | Options related to how clients making requests on behalf of a tenant should be configured. |
| `inheritance` | `object \| null` | No | Settings that the tenants will inherit from project level. |
| `hashConfig` | `object \| null` | No | History information of the hash algorithm and key. Different accounts' passwords may be generated by different version. |
| `enableAnonymousUser` | `boolean \| null` | No | Whether to enable anonymous user authentication. |
| `enableEmailLinkSignin` | `boolean \| null` | No | Whether to enable email link user authentication. |
| `recaptchaConfig` | `object \| null` | No | The reCAPTCHA Enterprise integration config. |
| `testPhoneNumbers` | `Record<string, string> \| null` | No | A map of pairs that can be used for MFA. The phone number should be in E.164 format ([https://www.itu.int/rec/T-REC-E.164/](https://www.itu.int/rec/T-REC-E.164/)) and a maximum of 10 pairs can be added (error will be thrown once exceeded). |
| `autodeleteAnonymousUsers` | `boolean \| null` | No | Whether anonymous users will be auto-deleted after a period of 30 days. |
| `passwordPolicyConfig` | `object \| null` | No | The configuration for the password policy on the project. |
| `mobileLinksConfig` | `object \| null` | No | Configuration mobile links. |
| `name` | `string \| null` | No | Output only. Resource name of a tenant. For example: "projects/\{project-id}/tenants/\{tenant-id}" |
| `displayName` | `string \| null` | No | Display name of the tenant. |

> [accordion] mfaConfig full type
>
> ```ts theme={null}
> {
>   providerConfigs?: {
>     totpProviderConfig?: {
>       adjacentIntervals?: number | null
>     } | null,
>     state?: string | null
>   }[] | null,
>   state?: string | null,
>   enabledProviders?: string[] | null
> } | null
> ```

> [accordion] monitoring full type
>
> ```ts theme={null}
> {
>   requestLogging?: {
>     enabled?: boolean | null
>   } | null
> } | null
> ```

> [accordion] emailPrivacyConfig full type
>
> ```ts theme={null}
> {
>   enableImprovedEmailPrivacy?: boolean | null
> } | null
> ```

> [accordion] smsRegionConfig full type
>
> ```ts theme={null}
> {
>   allowByDefault?: {
>     disallowedRegions?: string[] | null
>   } | null,
>   allowlistOnly?: {
>     allowedRegions?: string[] | null
>   } | null
> } | null
> ```

> [accordion] client full type
>
> ```ts theme={null}
> {
>   permissions?: {
>     disabledUserDeletion?: boolean | null,
>     disabledUserSignup?: boolean | null
>   } | null
> } | null
> ```

> [accordion] inheritance full type
>
> ```ts theme={null}
> {
>   emailSendingConfig?: boolean | null
> } | null
> ```

> [accordion] hashConfig full type
>
> ```ts theme={null}
> {
>   memoryCost?: number | null,
>   algorithm?: string | null,
>   saltSeparator?: string | null,
>   rounds?: number | null,
>   signerKey?: string | null
> } | null
> ```

> [accordion] recaptchaConfig full type
>
> ```ts theme={null}
> {
>   useSmsBotScore?: boolean | null,
>   recaptchaKeys?: {
>     key?: string | null,
>     type?: string | null
>   }[] | null,
>   managedRules?: {
>     action?: string | null,
>     endScore?: number | null
>   }[] | null,
>   emailPasswordEnforcementState?: string | null,
>   useSmsTollFraudProtection?: boolean | null,
>   phoneEnforcementState?: string | null,
>   useAccountDefender?: boolean | null,
>   tollFraudManagedRules?: {
>     startScore?: number | null,
>     action?: string | null
>   }[] | null
> } | null
> ```

> [accordion] passwordPolicyConfig full type
>
> ```ts theme={null}
> {
>   passwordPolicyVersions?: {
>     customStrengthOptions?: {
>       containsLowercaseCharacter?: boolean | null,
>       maxPasswordLength?: number | null,
>       minPasswordLength?: number | null,
>       containsUppercaseCharacter?: boolean | null,
>       containsNumericCharacter?: boolean | null,
>       containsNonAlphanumericCharacter?: boolean | null
>     } | null,
>     schemaVersion?: number | null
>   }[] | null,
>   lastUpdateTime?: string | null,
>   forceUpgradeOnSignin?: boolean | null,
>   passwordPolicyEnforcementState?: string | null
> } | null
> ```

> [accordion] mobileLinksConfig full type
>
> ```ts theme={null}
> {
>   domain?: string | null
> } | null
> ```

***

### tenants.setIamPolicy

`authAdmin.tenants.setIamPolicy`

Sets the access control policy for a resource. If the policy exists, it is replaced

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.setIamPolicy({ resource: 'projects/demo-project/tenants/tenant-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/tenants/<id>`. |
| `updateMask` | `string` | No | OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` |
| `policy` | `object` | No | An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. |

> [accordion] policy full type
>
> ```ts theme={null}
> {
>   auditConfigs?: {
>     service?: string,
>     auditLogConfigs?: {
>       logType?: LOG_TYPE_UNSPECIFIED | ADMIN_READ | DATA_WRITE | DATA_READ,
>       exemptedMembers?: string[]
>     }[]
>   }[],
>   version?: number,
>   bindings?: {
>     condition?: {
>       description?: string,
>       location?: string,
>       title?: string,
>       expression?: string
>     },
>     role?: string,
>     members?: string[]
>   }[],
>   etag?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `auditConfigs` | `object[] \| null` | No | Specifies cloud audit logging configuration for this policy. |
| `version` | `number \| null` | No | Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. |
| `bindings` | `object[] \| null` | No | Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. |
| `etag` | `string \| null` | No | `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. (base64) |

> [accordion] auditConfigs full type
>
> ```ts theme={null}
> {
>   service?: string | null,
>   auditLogConfigs?: {
>     logType?: string | null,
>     exemptedMembers?: string[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     description?: string | null,
>     location?: string | null,
>     title?: string | null,
>     expression?: string | null
>   } | null,
>   role?: string | null,
>   members?: string[] | null
> }[] | null
> ```

***

### tenants.testIamPermissions

`authAdmin.tenants.testIamPermissions`

Returns the caller's permissions on a resource. An error is returned if the resource does not exist

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.authAdmin.tenants.testIamPermissions({ resource: 'projects/demo-project/tenants/tenant-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `resource` | `string` | Yes | REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. Format: `projects/<id>/tenants/<id>`. |
| `permissions` | `string[]` | No | The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `permissions` | `string[] \| null` | No | A subset of `TestPermissionsRequest.permissions` that the caller is allowed. |

***

## Database

### delete

`database.delete`

Delete the value at a path and everything under it

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.database.delete({ databaseUrl: 'https://demo-project-default-rtdb.firebaseio.com', path: 'users/ada' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `databaseUrl` | `string` | Yes | The database URL: https\://\<name>.firebaseio.com or https\://\<name>.\<region>.firebasedatabase.app (databaseInstances.list returns it as databaseUrl). |
| `path` | `string` | No | The location in the database, `users/ada` (empty for the root). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### get

`database.get`

Read the value at a path of a Realtime Database, optionally filtered and ordered

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.database.get({
	databaseUrl: 'https://demo-project-default-rtdb.firebaseio.com',
	path: 'users',
	orderBy: '$key',
	limitToFirst: 10,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `databaseUrl` | `string` | Yes | The database URL: https\://\<name>.firebaseio.com or https\://\<name>.\<region>.firebasedatabase.app (databaseInstances.list returns it as databaseUrl). |
| `path` | `string` | No | The location in the database, `users/ada` (empty for the root). |
| `orderBy` | `string` | No | Order by "$key", "$value", "\$priority" or a child key ("height"); the plugin adds the JSON quotes. Needs an index rule for child keys. |
| `startAt` | `string \| number \| boolean \| null` | No | Start at this value of orderBy, inclusive (a string, number, boolean or null; the plugin JSON-encodes it). null sorts first, so `startAt: null` keeps everything; `equalTo: null` selects only children without the key. |
| `endAt` | `string \| number \| boolean \| null` | No | End at this value of orderBy (the plugin JSON-encodes it). |
| `equalTo` | `string \| number \| boolean \| null` | No | Only values equal to this (the plugin JSON-encodes it). |
| `limitToFirst` | `number` | No | — |
| `limitToLast` | `number` | No | — |
| `shallow` | `boolean` | No | Return only the keys below the path, each as true. |

**Output:** `any`

***

### push

`database.push`

Add a child with a generated key under a path (returns \{ name })

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.database.push({
	databaseUrl: 'https://demo-project-default-rtdb.firebaseio.com',
	path: 'messages',
	data: { text: 'Hello', from: 'ada' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `databaseUrl` | `string` | Yes | The database URL: https\://\<name>.firebaseio.com or https\://\<name>.\<region>.firebasedatabase.app (databaseInstances.list returns it as databaseUrl). |
| `path` | `string` | No | The location in the database, `users/ada` (empty for the root). |
| `data` | `any` | Yes | Any JSON value: an object, a list, a string, a number, a boolean or null. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The generated key. |

***

### rules.get

`database.rules.get`

Read the database's security rules

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.database.rules.get({ databaseUrl: 'https://demo-project-default-rtdb.firebaseio.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `databaseUrl` | `string` | Yes | The database URL: https\://\<name>.firebaseio.com or https\://\<name>.\<region>.firebasedatabase.app (databaseInstances.list returns it as databaseUrl). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `rules` | `object \| null` | No | The rules: ".read", ".write", ".validate" and ".indexOn" entries, nested by path. |

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

***

### rules.set

`database.rules.set`

Replace the database's security rules

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.database.rules.set({
	databaseUrl: 'https://demo-project-default-rtdb.firebaseio.com',
	rules: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `databaseUrl` | `string` | Yes | The database URL: https\://\<name>.firebaseio.com or https\://\<name>.\<region>.firebasedatabase.app (databaseInstances.list returns it as databaseUrl). |
| `rules` | `object` | Yes | The rules document: \{ "rules": \{ ".read": ..., ".write": ... } }. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string \| null` | No | "ok" when the rules were saved. |

***

### set

`database.set`

Write a value at a path, replacing what is there

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.database.set({
	databaseUrl: 'https://demo-project-default-rtdb.firebaseio.com',
	path: 'users/ada',
	data: { name: 'Ada', born: 1815 },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `databaseUrl` | `string` | Yes | The database URL: https\://\<name>.firebaseio.com or https\://\<name>.\<region>.firebasedatabase.app (databaseInstances.list returns it as databaseUrl). |
| `path` | `string` | No | The location in the database, `users/ada` (empty for the root). |
| `data` | `any` | Yes | Any JSON value: an object, a list, a string, a number, a boolean or null. |

**Output:** `any`

***

### update

`database.update`

Update some children at a path, leaving the others

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.database.update({
	databaseUrl: 'https://demo-project-default-rtdb.firebaseio.com',
	path: 'users/ada',
	data: { born: 1815, title: 'Countess of Lovelace' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `databaseUrl` | `string` | Yes | The database URL: https\://\<name>.firebaseio.com or https\://\<name>.\<region>.firebasedatabase.app (databaseInstances.list returns it as databaseUrl). |
| `path` | `string` | No | The location in the database, `users/ada` (empty for the root). |
| `data` | `object` | Yes | The children to write: \{ "\<child or child/path>": value }. Children not named stay as they are; a null value deletes that child. |

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

**Output:** `any`

***

## Database Instances

### locations.instances.create

`databaseInstances.locations.instances.create`

Requests that a new DatabaseInstance be created. The state of a successfully created DatabaseInstance is ACTIVE

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.databaseInstances.locations.instances.create({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent project for which to create a database instance, in the form: `projects/{project-number}/locations/{location-id}`. Format: `projects/<id>/locations/<id>`. |
| `databaseId` | `string` | No | The globally unique identifier of the database instance. |
| `validateOnly` | `boolean` | No | When set to true, the request will be validated but not submitted. |
| `type` | `DATABASE_INSTANCE_TYPE_UNSPECIFIED \| DEFAULT_DATABASE \| USER_DATABASE` | No | Immutable. The database instance type. On creation only USER\_DATABASE is allowed, which is also the default when omitted. |
| `name` | `string` | No | The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null` | No | Immutable. The database instance type. On creation only USER\_DATABASE is allowed, which is also the default when omitted. |
| `name` | `string \| null` | No | The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`. |
| `project` | `string \| null` | No | Output only. The resource name of the project this instance belongs to. For example: `projects/{project-number}`. |
| `state` | `string \| null` | No | Output only. The database's lifecycle state. Read-only. |
| `databaseUrl` | `string \| null` | No | Output only. Output Only. The globally unique hostname of the database. |

***

### locations.instances.delete

`databaseInstances.locations.instances.delete`

Marks a DatabaseInstance to be deleted. The DatabaseInstance will be set to the DELETED state for 20 days, and will be purged within 30 days

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.databaseInstances.locations.instances.delete({ name: 'projects/demo-project/locations/us-central1/instances/demo-project-default-rtdb' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}` Format: `projects/<id>/locations/<id>/instances/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null` | No | Immutable. The database instance type. On creation only USER\_DATABASE is allowed, which is also the default when omitted. |
| `name` | `string \| null` | No | The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`. |
| `project` | `string \| null` | No | Output only. The resource name of the project this instance belongs to. For example: `projects/{project-number}`. |
| `state` | `string \| null` | No | Output only. The database's lifecycle state. Read-only. |
| `databaseUrl` | `string \| null` | No | Output only. Output Only. The globally unique hostname of the database. |

***

### locations.instances.disable

`databaseInstances.locations.instances.disable`

Disables a DatabaseInstance. The database can be re-enabled later using ReenableDatabaseInstance

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.databaseInstances.locations.instances.disable({ name: 'projects/demo-project/locations/us-central1/instances/demo-project-default-rtdb' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}` Format: `projects/<id>/locations/<id>/instances/<id>`. |
| `body` | `object` | No | The request sent to the DisableDatabaseInstance method. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null` | No | Immutable. The database instance type. On creation only USER\_DATABASE is allowed, which is also the default when omitted. |
| `name` | `string \| null` | No | The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`. |
| `project` | `string \| null` | No | Output only. The resource name of the project this instance belongs to. For example: `projects/{project-number}`. |
| `state` | `string \| null` | No | Output only. The database's lifecycle state. Read-only. |
| `databaseUrl` | `string \| null` | No | Output only. Output Only. The globally unique hostname of the database. |

***

### locations.instances.get

`databaseInstances.locations.instances.get`

Gets the DatabaseInstance identified by the specified resource name

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.databaseInstances.locations.instances.get({ name: 'projects/demo-project/locations/us-central1/instances/demo-project-default-rtdb' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`. `database-id` is a globally unique identifier across all parent collections. For convenience, this method allows you to supply `-` as a wildcard character in place of specific collections under `projects` and `locations`. The resulting wildcarding form of the method is: `projects/-/locations/-/instances/{database-id}`. Format: `projects/<id>/locations/<id>/instances/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null` | No | Immutable. The database instance type. On creation only USER\_DATABASE is allowed, which is also the default when omitted. |
| `name` | `string \| null` | No | The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`. |
| `project` | `string \| null` | No | Output only. The resource name of the project this instance belongs to. For example: `projects/{project-number}`. |
| `state` | `string \| null` | No | Output only. The database's lifecycle state. Read-only. |
| `databaseUrl` | `string \| null` | No | Output only. Output Only. The globally unique hostname of the database. |

***

### locations.instances.list

`databaseInstances.locations.instances.list`

Lists each DatabaseInstance associated with the specified parent project. The list items are returned in no particular order, but will be a consistent view of the database instances when additional requests are made with a `pageToken`

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.databaseInstances.locations.instances.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Token returned from a previous call to `ListDatabaseInstances` indicating where in the set of database instances to resume listing. |
| `showDeleted` | `boolean` | No | Indicate that DatabaseInstances in the `DELETED` state should also be returned. |
| `parent` | `string` | Yes | Required. The parent project for which to list database instances, in the form: `projects/{project-number}/locations/{location-id}` To list across all locations, use a parent in the form: `projects/{project-number}/locations/-` Format: `projects/<id>/locations/<id>`. |
| `pageSize` | `number` | No | The maximum number of database instances to return in the response. The server may return fewer than this at its discretion. If no value is specified (or too large a value is specified), then the server will impose its own limit. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `instances` | `object[] \| null` | No | List of each DatabaseInstance that is in the parent Firebase project. |
| `nextPageToken` | `string \| null` | No | If the result list is too large to fit in a single response, then a token is returned. If the string is empty, then this response is the last page of results. This token can be used in a subsequent call to `ListDatabaseInstances` to find the next group of database instances. Page tokens are short-lived and should not be persisted. |

> [accordion] instances full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   name?: string | null,
>   project?: string | null,
>   state?: string | null,
>   databaseUrl?: string | null
> }[] | null
> ```

***

### locations.instances.reenable

`databaseInstances.locations.instances.reenable`

Enables a DatabaseInstance. The database must have been disabled previously using DisableDatabaseInstance

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.databaseInstances.locations.instances.reenable({ name: 'projects/demo-project/locations/us-central1/instances/demo-project-default-rtdb' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}` Format: `projects/<id>/locations/<id>/instances/<id>`. |
| `body` | `object` | No | The request sent to the ReenableDatabaseInstance method. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null` | No | Immutable. The database instance type. On creation only USER\_DATABASE is allowed, which is also the default when omitted. |
| `name` | `string \| null` | No | The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`. |
| `project` | `string \| null` | No | Output only. The resource name of the project this instance belongs to. For example: `projects/{project-number}`. |
| `state` | `string \| null` | No | Output only. The database's lifecycle state. Read-only. |
| `databaseUrl` | `string \| null` | No | Output only. Output Only. The globally unique hostname of the database. |

***

### locations.instances.undelete

`databaseInstances.locations.instances.undelete`

Restores a DatabaseInstance that was previously marked to be deleted. After the delete method is used, DatabaseInstances are set to the DELETED state for 20 days, and will be purged within 30 days

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.databaseInstances.locations.instances.undelete({ name: 'projects/demo-project/locations/us-central1/instances/demo-project-default-rtdb' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}` Format: `projects/<id>/locations/<id>/instances/<id>`. |
| `body` | `object` | No | The request sent to UndeleteDatabaseInstance method. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null` | No | Immutable. The database instance type. On creation only USER\_DATABASE is allowed, which is also the default when omitted. |
| `name` | `string \| null` | No | The fully qualified resource name of the database instance, in the form: `projects/{project-number}/locations/{location-id}/instances/{database-id}`. |
| `project` | `string \| null` | No | Output only. The resource name of the project this instance belongs to. For example: `projects/{project-number}`. |
| `state` | `string \| null` | No | Output only. The database's lifecycle state. Read-only. |
| `databaseUrl` | `string \| null` | No | Output only. Output Only. The globally unique hostname of the database. |

***

## Firestore

### databases.backupSchedules.create

`firestore.databases.backupSchedules.create`

Creates a backup schedule on a database. At most two backup schedules can be configured on a database, one daily backup schedule and one weekly backup schedule

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.backupSchedules.create({ parent: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent database. Format `projects/{project}/databases/{database}` Format: `projects/<id>/databases/<id>`. |
| `weeklyRecurrence` | `object` | No | Represents a recurring schedule that runs on a specified day of the week. The time zone is UTC. |
| `dailyRecurrence` | `object` | No | Represents a recurring schedule that runs every day. The time zone is UTC. |
| `retention` | `string` | No | At what relative time in the future, compared to its creation time, the backup should be deleted, e.g. keep backups for 7 days. The maximum supported retention period is 14 weeks. |

> [accordion] weeklyRecurrence full type
>
> ```ts theme={null}
> {
>   day?: DAY_OF_WEEK_UNSPECIFIED | MONDAY | TUESDAY | WEDNESDAY | THURSDAY | FRIDAY | SATURDAY | SUNDAY
> }
> ```

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Output only. The unique backup schedule identifier across all locations and databases for the given project. This will be auto-assigned. Format is `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` |
| `createTime` | `string \| null` | No | Output only. The timestamp at which this backup schedule was created and effective since. No backups will be created for this schedule before this time. |
| `weeklyRecurrence` | `object \| null` | No | Represents a recurring schedule that runs on a specified day of the week. The time zone is UTC. |
| `dailyRecurrence` | `object \| null` | No | Represents a recurring schedule that runs every day. The time zone is UTC. |
| `updateTime` | `string \| null` | No | Output only. The timestamp at which this backup schedule was most recently updated. When a backup schedule is first created, this is the same as create\_time. |
| `retention` | `string \| null` | No | At what relative time in the future, compared to its creation time, the backup should be deleted, e.g. keep backups for 7 days. The maximum supported retention period is 14 weeks. |

> [accordion] weeklyRecurrence full type
>
> ```ts theme={null}
> {
>   day?: string | null
> } | null
> ```

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

***

### databases.backupSchedules.delete

`firestore.databases.backupSchedules.delete`

Deletes a backup schedule

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.firestore.databases.backupSchedules.delete({ name: 'projects/demo-project/databases/(default)/backupSchedules/schedule-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the backup schedule. Format `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` Format: `projects/<id>/databases/<id>/backupSchedules/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### databases.backupSchedules.get

`firestore.databases.backupSchedules.get`

Gets information about a backup schedule

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.backupSchedules.get({ name: 'projects/demo-project/databases/(default)/backupSchedules/schedule-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the backup schedule. Format `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` Format: `projects/<id>/databases/<id>/backupSchedules/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Output only. The unique backup schedule identifier across all locations and databases for the given project. This will be auto-assigned. Format is `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` |
| `createTime` | `string \| null` | No | Output only. The timestamp at which this backup schedule was created and effective since. No backups will be created for this schedule before this time. |
| `weeklyRecurrence` | `object \| null` | No | Represents a recurring schedule that runs on a specified day of the week. The time zone is UTC. |
| `dailyRecurrence` | `object \| null` | No | Represents a recurring schedule that runs every day. The time zone is UTC. |
| `updateTime` | `string \| null` | No | Output only. The timestamp at which this backup schedule was most recently updated. When a backup schedule is first created, this is the same as create\_time. |
| `retention` | `string \| null` | No | At what relative time in the future, compared to its creation time, the backup should be deleted, e.g. keep backups for 7 days. The maximum supported retention period is 14 weeks. |

> [accordion] weeklyRecurrence full type
>
> ```ts theme={null}
> {
>   day?: string | null
> } | null
> ```

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

***

### databases.backupSchedules.list

`firestore.databases.backupSchedules.list`

List backup schedules

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.backupSchedules.list({ parent: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent database. Format is `projects/{project}/databases/{database}`. Format: `projects/<id>/databases/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `backupSchedules` | `object[] \| null` | No | List of all backup schedules. |

> [accordion] backupSchedules full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   createTime?: string | null,
>   weeklyRecurrence?: {
>     day?: string | null
>   } | null,
>   dailyRecurrence?: {
>   } | null,
>   updateTime?: string | null,
>   retention?: string | null
> }[] | null
> ```

***

### databases.backupSchedules.patch

`firestore.databases.backupSchedules.patch`

Updates a backup schedule

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.backupSchedules.patch({ name: 'projects/demo-project/databases/(default)/backupSchedules/schedule-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | The list of fields to be updated. |
| `name` | `string` | Yes | Output only. The unique backup schedule identifier across all locations and databases for the given project. This will be auto-assigned. Format is `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` Format: `projects/<id>/databases/<id>/backupSchedules/<id>`. |
| `weeklyRecurrence` | `object` | No | Represents a recurring schedule that runs on a specified day of the week. The time zone is UTC. |
| `dailyRecurrence` | `object` | No | Represents a recurring schedule that runs every day. The time zone is UTC. |
| `retention` | `string` | No | At what relative time in the future, compared to its creation time, the backup should be deleted, e.g. keep backups for 7 days. The maximum supported retention period is 14 weeks. |

> [accordion] weeklyRecurrence full type
>
> ```ts theme={null}
> {
>   day?: DAY_OF_WEEK_UNSPECIFIED | MONDAY | TUESDAY | WEDNESDAY | THURSDAY | FRIDAY | SATURDAY | SUNDAY
> }
> ```

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Output only. The unique backup schedule identifier across all locations and databases for the given project. This will be auto-assigned. Format is `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` |
| `createTime` | `string \| null` | No | Output only. The timestamp at which this backup schedule was created and effective since. No backups will be created for this schedule before this time. |
| `weeklyRecurrence` | `object \| null` | No | Represents a recurring schedule that runs on a specified day of the week. The time zone is UTC. |
| `dailyRecurrence` | `object \| null` | No | Represents a recurring schedule that runs every day. The time zone is UTC. |
| `updateTime` | `string \| null` | No | Output only. The timestamp at which this backup schedule was most recently updated. When a backup schedule is first created, this is the same as create\_time. |
| `retention` | `string \| null` | No | At what relative time in the future, compared to its creation time, the backup should be deleted, e.g. keep backups for 7 days. The maximum supported retention period is 14 weeks. |

> [accordion] weeklyRecurrence full type
>
> ```ts theme={null}
> {
>   day?: string | null
> } | null
> ```

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

***

### databases.bulkDeleteDocuments

`firestore.databases.bulkDeleteDocuments`

Bulk deletes a subset of documents from Google Cloud Firestore. Documents created or updated after the underlying system starts to process the request will not be deleted

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.firestore.databases.bulkDeleteDocuments({
	name: 'projects/demo-project/databases/(default)',
	collectionIds: ['scratch'],
	namespaceIds: [''],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Database to operate. Should be of the form: `projects/{project_id}/databases/{database_id}`. Format: `projects/<id>/databases/<id>`. |
| `collectionIds` | `string[]` | No | Optional. IDs of the collection groups to delete. Unspecified means all collection groups. Each collection group in this list must be unique. |
| `namespaceIds` | `string[]` | No | Optional. Namespaces to delete. An empty list means all namespaces. This is the recommended usage for databases that don't use namespaces. An empty string element represents the default namespace. This should be used if the database has data in non-default namespaces, but doesn't want to delete from them. Each namespace in this list must be unique. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### databases.changeStreams.create

`firestore.databases.changeStreams.create`

Creates a new change stream for the database

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.changeStreams.create({ parent: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `changeStreamId` | `string` | No | Required. The ID to use for the change stream, which will become the final component of the change stream's resource name. This value should be 4-63 characters. Valid characters are lowercase letters, numbers, and hyphens. The first character must be a letter, and the last character must be a letter or a number. |
| `parent` | `string` | Yes | Required. The parent database to create the change stream for. Format is `projects/{project}/databases/{database}`. Format: `projects/<id>/databases/<id>`. |
| `etag` | `string` | No | Optional. An etag used to determine which version of the configuration is being edited. |
| `collectionGroupScope` | `object` | No | The change stream is scoped to a collection group. Only events associated with the given collection group are visible to the Change Stream. Only a single change stream can be enabled per collection group. |
| `name` | `string` | No | Identifier. The external resource name of the change stream. Format `projects/{project}/databases/{database}/changeStreams/{change_stream}` |
| `databaseScope` | `object` | No | The change stream is scoped to the entire database. All events in the database are visible to the Change Stream. One Database scope Change Stream is allowed per database. |
| `retentionPeriod` | `string` | No | Required. The retention period of the change stream. This is the amount of time a change event is available on the change stream. Must be from 1 to 7 days, inclusive. The retention\_period must be in day granularity, i.e. it must be a multiple of 24 hours. |

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

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateTime` | `string \| null` | No | Output only. The time the Change Stream was last updated. |
| `etag` | `string \| null` | No | Optional. An etag used to determine which version of the configuration is being edited. |
| `startTime` | `string \| null` | No | Output only. The time the Change Stream started recording events. |
| `collectionGroupScope` | `object \| null` | No | The change stream is scoped to a collection group. Only events associated with the given collection group are visible to the Change Stream. Only a single change stream can be enabled per collection group. |
| `name` | `string \| null` | No | Identifier. The external resource name of the change stream. Format `projects/{project}/databases/{database}/changeStreams/{change_stream}` |
| `databaseScope` | `object \| null` | No | The change stream is scoped to the entire database. All events in the database are visible to the Change Stream. One Database scope Change Stream is allowed per database. |
| `createTime` | `string \| null` | No | Output only. The time the Change Stream was created. |
| `retentionPeriod` | `string \| null` | No | Required. The retention period of the change stream. This is the amount of time a change event is available on the change stream. Must be from 1 to 7 days, inclusive. The retention\_period must be in day granularity, i.e. it must be a multiple of 24 hours. |

> [accordion] collectionGroupScope full type
>
> ```ts theme={null}
> {
>   collectionGroupId?: string | null
> } | null
> ```

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

***

### databases.changeStreams.delete

`firestore.databases.changeStreams.delete`

Deletes a change stream

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.firestore.databases.changeStreams.delete({ name: 'projects/demo-project/databases/(default)/changeStreams/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the change stream to delete. Format is `projects/{project}/databases/{database}/changeStreams/{change_stream}`. Format: `projects/<id>/databases/<id>/changeStreams/<id>`. |
| `etag` | `string` | No | Optional. The etag of the change stream to delete. If this is not the current etag of the change stream, the deletion will fail. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### databases.changeStreams.get

`firestore.databases.changeStreams.get`

Gets information about a change stream

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.changeStreams.get({ name: 'projects/demo-project/databases/(default)/changeStreams/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the change stream to retrieve. Format is `projects/{project}/databases/{database}/changeStreams/{change_stream}`. Format: `projects/<id>/databases/<id>/changeStreams/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateTime` | `string \| null` | No | Output only. The time the Change Stream was last updated. |
| `etag` | `string \| null` | No | Optional. An etag used to determine which version of the configuration is being edited. |
| `startTime` | `string \| null` | No | Output only. The time the Change Stream started recording events. |
| `collectionGroupScope` | `object \| null` | No | The change stream is scoped to a collection group. Only events associated with the given collection group are visible to the Change Stream. Only a single change stream can be enabled per collection group. |
| `name` | `string \| null` | No | Identifier. The external resource name of the change stream. Format `projects/{project}/databases/{database}/changeStreams/{change_stream}` |
| `databaseScope` | `object \| null` | No | The change stream is scoped to the entire database. All events in the database are visible to the Change Stream. One Database scope Change Stream is allowed per database. |
| `createTime` | `string \| null` | No | Output only. The time the Change Stream was created. |
| `retentionPeriod` | `string \| null` | No | Required. The retention period of the change stream. This is the amount of time a change event is available on the change stream. Must be from 1 to 7 days, inclusive. The retention\_period must be in day granularity, i.e. it must be a multiple of 24 hours. |

> [accordion] collectionGroupScope full type
>
> ```ts theme={null}
> {
>   collectionGroupId?: string | null
> } | null
> ```

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

***

### databases.changeStreams.list

`firestore.databases.changeStreams.list`

Lists all change streams in a database

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.changeStreams.list({ parent: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent database to list change streams from. Format is `projects/{project}/databases/{database}`. Format: `projects/<id>/databases/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `changeStreams` | `object[] \| null` | No | The list of change streams. |

> [accordion] changeStreams full type
>
> ```ts theme={null}
> {
>   updateTime?: string | null,
>   etag?: string | null,
>   startTime?: string | null,
>   collectionGroupScope?: {
>     collectionGroupId?: string | null
>   } | null,
>   name?: string | null,
>   databaseScope?: {
>   } | null,
>   createTime?: string | null,
>   retentionPeriod?: string | null
> }[] | null
> ```

***

### databases.clone

`firestore.databases.clone`

Creates a new database by cloning an existing one. The new database must be in the same cloud region or multi-region location as the existing database

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.clone({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The project to clone the database in. Format is `projects/{project_id}`. Format: `projects/<id>`. |
| `databaseId` | `string` | No | Required. The ID to use for the database, which will become the final component of the database's resource name. This database ID must not be associated with an existing database. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /\[0-9a-f]\{8}(-\[0-9a-f]\{4})\{3}-\[0-9a-f]\{12}/. "(default)" database ID is also valid if the database is Standard edition. |
| `pitrSnapshot` | `object` | No | A consistent snapshot of a database at a specific point in time. A PITR (Point-in-time recovery) snapshot with previous versions of a database's data is available for every minute up to the associated database's data retention period. If the PITR feature is enabled, the retention period is 7 days; otherwise, it is one hour. |
| `encryptionConfig` | `object` | No | Encryption configuration for a new database being created from another source. The source could be a Backup or a PitrSnapshot. |
| `tags` | `Record<string, string>` | No | Optional. Immutable. Tags to be bound to the cloned database. The tags should be provided in the format of `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. |

> [accordion] pitrSnapshot full type
>
> ```ts theme={null}
> {
>   snapshotTime?: string,
>   database?: string
> }
> ```

> [accordion] encryptionConfig full type
>
> ```ts theme={null}
> {
>   useSourceEncryption?: {
>   },
>   customerManagedEncryption?: {
>     kmsKeyName?: string
>   },
>   googleDefaultEncryption?: {
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### databases.collectionGroups.fields.get

`firestore.databases.collectionGroups.fields.get`

Gets the metadata and configuration for a Field

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.collectionGroups.fields.get({ name: 'projects/demo-project/databases/(default)/collectionGroups/users/fields/email' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. A name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` Format: `projects/<id>/databases/<id>/collectionGroups/<id>/fields/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ttlConfig` | `object \| null` | No | The TTL (time-to-live) configuration for documents that have this `Field` set. A timestamp stored in a TTL-enabled field will be used to determine the expiration time of the document. The expiration time is the sum of the timestamp value and the `expiration_offset`. For Enterprise edition databases, the timestamp value may alternatively be stored in an array value in the TTL-enabled field. An expiration time in the past indicates that the document is eligible for immediate expiration. Using any other data type or leaving the field absent will disable expiration for the individual document. |
| `indexConfig` | `object \| null` | No | The index configuration for this field. |
| `name` | `string \| null` | No | Required. A field name of the form: `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` A field path can be a simple field name, e.g. `address` or a path to fields within `map_value` , e.g. `address.city`, or a special field path. The only valid special field is `*`, which represents any field. Field paths can be quoted using `` ` `` (backtick). The only character that must be escaped within a quoted field path is the backtick character itself, escaped using a backslash. |

> [accordion] ttlConfig full type
>
> ```ts theme={null}
> {
>   expirationOffset?: string | null,
>   state?: string | null
> } | null
> ```

> [accordion] indexConfig full type
>
> ```ts theme={null}
> {
>   reverting?: boolean | null,
>   usesAncestorConfig?: boolean | null,
>   ancestorField?: string | null,
>   indexes?: {
>     density?: string | null,
>     searchIndexOptions?: {
>       textLanguageOverrideFieldPath?: string | null,
>       textLanguage?: string | null
>     } | null,
>     multikey?: boolean | null,
>     state?: string | null,
>     unique?: boolean | null,
>     queryScope?: string | null,
>     apiScope?: string | null,
>     name?: string | null,
>     shardCount?: number | null,
>     fields?: {
>       searchConfig?: {
>         geoSpec?: {
>           geoJsonIndexingDisabled?: boolean | null
>         } | null,
>         textSpec?: {
>           indexSpecs?: {
>             matchType?: string | null,
>             indexType?: string | null
>           }[] | null
>         } | null
>       } | null,
>       vectorConfig?: {
>         flat?: {
>         } | null,
>         dimension?: number | null
>       } | null,
>       fieldPath?: string | null,
>       order?: string | null,
>       arrayConfig?: string | null
>     }[] | null
>   }[] | null
> } | null
> ```

***

### databases.collectionGroups.fields.list

`firestore.databases.collectionGroups.fields.list`

Lists the field configuration and metadata for this database. Currently, FirestoreAdmin.ListFields only supports listing fields that have been explicitly overridden (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.collectionGroups.fields.list({ parent: 'projects/demo-project/databases/(default)/collectionGroups/users' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. A parent name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` Format: `projects/<id>/databases/<id>/collectionGroups/<id>`. |
| `filter` | `string` | No | The filter to apply to list results. Currently, FirestoreAdmin.ListFields only supports listing fields that have been explicitly overridden. To issue this query, call FirestoreAdmin.ListFields with a filter that includes `indexConfig.usesAncestorConfig:false` or `ttlConfig:*`. |
| `pageSize` | `number` | No | The number of results to return. |
| `pageToken` | `string` | No | A page token, returned from a previous call to FirestoreAdmin.ListFields, that may be used to get the next page of results. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A page token that may be used to request another page of results. If blank, this is the last page. |
| `fields` | `object[] \| null` | No | The requested fields. |

> [accordion] fields full type
>
> ```ts theme={null}
> {
>   ttlConfig?: {
>     expirationOffset?: string | null,
>     state?: string | null
>   } | null,
>   indexConfig?: {
>     reverting?: boolean | null,
>     usesAncestorConfig?: boolean | null,
>     ancestorField?: string | null,
>     indexes?: {
>       density?: string | null,
>       searchIndexOptions?: {
>         textLanguageOverrideFieldPath?: string | null,
>         textLanguage?: string | null
>       } | null,
>       multikey?: boolean | null,
>       state?: string | null,
>       unique?: boolean | null,
>       queryScope?: string | null,
>       apiScope?: string | null,
>       name?: string | null,
>       shardCount?: number | null,
>       fields?: {
>         searchConfig?: {
>           geoSpec?: {
>             geoJsonIndexingDisabled?: boolean | null
>           } | null,
>           textSpec?: {
>             indexSpecs?: {
>               matchType?: string | null,
>               indexType?: string | null
>             }[] | null
>           } | null
>         } | null,
>         vectorConfig?: {
>           flat?: {
>           } | null,
>           dimension?: number | null
>         } | null,
>         fieldPath?: string | null,
>         order?: string | null,
>         arrayConfig?: string | null
>       }[] | null
>     }[] | null
>   } | null,
>   name?: string | null
> }[] | null
> ```

***

### databases.collectionGroups.fields.patch

`firestore.databases.collectionGroups.fields.patch`

Updates a field configuration. Currently, field updates apply only to single field index configuration

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.collectionGroups.fields.patch({ name: 'projects/demo-project/databases/(default)/collectionGroups/users/fields/email' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | A mask, relative to the field. If specified, only configuration specified by this field\_mask will be updated in the field. |
| `name` | `string` | Yes | Required. A field name of the form: `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` A field path can be a simple field name, e.g. `address` or a path to fields within `map_value` , e.g. `address.city`, or a special field path. The only valid special field is `*`, which represents any field. Field paths can be quoted using `` ` `` (backtick). The only character that must be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Format: `projects/<id>/databases/<id>/collectionGroups/<id>/fields/<id>`. |
| `ttlConfig` | `object` | No | The TTL (time-to-live) configuration for documents that have this `Field` set. A timestamp stored in a TTL-enabled field will be used to determine the expiration time of the document. The expiration time is the sum of the timestamp value and the `expiration_offset`. For Enterprise edition databases, the timestamp value may alternatively be stored in an array value in the TTL-enabled field. An expiration time in the past indicates that the document is eligible for immediate expiration. Using any other data type or leaving the field absent will disable expiration for the individual document. |
| `indexConfig` | `object` | No | The index configuration for this field. |
| `body_name` | `string` | No | Required. A field name of the form: `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` A field path can be a simple field name, e.g. `address` or a path to fields within `map_value` , e.g. `address.city`, or a special field path. The only valid special field is `*`, which represents any field. Field paths can be quoted using `` ` `` (backtick). The only character that must be escaped within a quoted field path is the backtick character itself, escaped using a backslash. |

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

> [accordion] indexConfig full type
>
> ```ts theme={null}
> {
>   reverting?: boolean,
>   usesAncestorConfig?: boolean,
>   ancestorField?: string,
>   indexes?: {
>     density?: DENSITY_UNSPECIFIED | SPARSE_ALL | SPARSE_ANY | DENSE,
>     searchIndexOptions?: {
>       textLanguageOverrideFieldPath?: string,
>       textLanguage?: string
>     },
>     multikey?: boolean,
>     state?: STATE_UNSPECIFIED | CREATING | READY | NEEDS_REPAIR,
>     unique?: boolean,
>     queryScope?: QUERY_SCOPE_UNSPECIFIED | COLLECTION | COLLECTION_GROUP | COLLECTION_RECURSIVE,
>     apiScope?: ANY_API | DATASTORE_MODE_API | MONGODB_COMPATIBLE_API,
>     name?: string,
>     shardCount?: number,
>     fields?: {
>       searchConfig?: {
>         geoSpec?: {
>           geoJsonIndexingDisabled?: boolean
>         },
>         textSpec?: {
>           indexSpecs?: {
>             matchType?: TEXT_MATCH_TYPE_UNSPECIFIED | MATCH_GLOBALLY,
>             indexType?: TEXT_INDEX_TYPE_UNSPECIFIED | TOKENIZED
>           }[]
>         }
>       },
>       vectorConfig?: {
>         flat?: {
>         },
>         dimension?: number
>       },
>       fieldPath?: string,
>       order?: ORDER_UNSPECIFIED | ASCENDING | DESCENDING,
>       arrayConfig?: ARRAY_CONFIG_UNSPECIFIED | CONTAINS
>     }[]
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### databases.collectionGroups.indexes.create

`firestore.databases.collectionGroups.indexes.create`

Creates a composite index. This returns a google.longrunning.Operation which may be used to track the status of the creation

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.collectionGroups.indexes.create({ parent: 'projects/demo-project/databases/(default)/collectionGroups/users' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. A parent name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` Format: `projects/<id>/databases/<id>/collectionGroups/<id>`. |
| `density` | `DENSITY_UNSPECIFIED \| SPARSE_ALL \| SPARSE_ANY \| DENSE` | No | Immutable. The density configuration of the index. |
| `searchIndexOptions` | `object` | No | Options for search indexes at the definition level. |
| `multikey` | `boolean` | No | Optional. Whether the index is multikey. By default, the index is not multikey. For non-multikey indexes, none of the paths in the index definition reach or traverse an array, except via an explicit array index. For multikey indexes, at most one of the paths in the index definition reach or traverse an array, except via an explicit array index. Violations will result in errors. Note this field only applies to index with MONGODB\_COMPATIBLE\_API ApiScope. |
| `state` | `STATE_UNSPECIFIED \| CREATING \| READY \| NEEDS_REPAIR` | No | Output only. The serving state of the index. |
| `unique` | `boolean` | No | Optional. Whether it is an unique index. Unique index ensures all values for the indexed field(s) are unique across documents. |
| `queryScope` | `QUERY_SCOPE_UNSPECIFIED \| COLLECTION \| COLLECTION_GROUP \| COLLECTION_RECURSIVE` | No | Indexes with a collection query scope specified allow queries against a collection that is the child of a specific document, specified at query time, and that has the same collection ID. Indexes with a collection group query scope specified allow queries against all collections descended from a specific document, specified at query time, and that have the same collection ID as this index. |
| `apiScope` | `ANY_API \| DATASTORE_MODE_API \| MONGODB_COMPATIBLE_API` | No | The API scope supported by this index. |
| `name` | `string` | No | A server-defined name for this index. Output only. When used in the google.firestore.admin.v1.Index resource, the value is of the form: `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` When used in the google.firestore.admin.v1.Field resource, the value is empty. |
| `shardCount` | `number` | No | Optional. The number of physical shards for the index. In Cloud Firestore, data and index entries are stored in contiguous, ordered key ranges called splits. While document keys within a collection are hashed to distribute write traffic across splits, secondary index entries are ordered lexicographically by their indexed field values. When an index contains fields with sequential or monotonically increasing or decreasing values (such as timestamps or auto-incrementing IDs), every incoming index write targets the boundary of the index keyspace on a single split. |
| `fields` | `object[]` | No | The fields supported by this index. At most 100 fields may be specified. In Standard edition databases only: - At least 2 fields must be specified. - The last field entry is always for the field path `__name__`. If, on creation, `__name__` was not specified as the last field, it will be added automatically with the same direction as that of the last field defined. If the final field in the index is not directional, the `__name__` will be ordered ASCENDING (unless explicitly specified). |

> [accordion] searchIndexOptions full type
>
> ```ts theme={null}
> {
>   textLanguageOverrideFieldPath?: string,
>   textLanguage?: string
> }
> ```

> [accordion] fields full type
>
> ```ts theme={null}
> {
>   searchConfig?: {
>     geoSpec?: {
>       geoJsonIndexingDisabled?: boolean
>     },
>     textSpec?: {
>       indexSpecs?: {
>         matchType?: TEXT_MATCH_TYPE_UNSPECIFIED | MATCH_GLOBALLY,
>         indexType?: TEXT_INDEX_TYPE_UNSPECIFIED | TOKENIZED
>       }[]
>     }
>   },
>   vectorConfig?: {
>     flat?: {
>     },
>     dimension?: number
>   },
>   fieldPath?: string,
>   order?: ORDER_UNSPECIFIED | ASCENDING | DESCENDING,
>   arrayConfig?: ARRAY_CONFIG_UNSPECIFIED | CONTAINS
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### databases.collectionGroups.indexes.delete

`firestore.databases.collectionGroups.indexes.delete`

Deletes a composite index

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.firestore.databases.collectionGroups.indexes.delete({ name: 'projects/demo-project/databases/(default)/collectionGroups/users/indexes/CICAgJiUpoMK' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. A name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` Format: `projects/<id>/databases/<id>/collectionGroups/<id>/indexes/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### databases.collectionGroups.indexes.get

`firestore.databases.collectionGroups.indexes.get`

Gets a composite index

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.collectionGroups.indexes.get({ name: 'projects/demo-project/databases/(default)/collectionGroups/users/indexes/CICAgJiUpoMK' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. A name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` Format: `projects/<id>/databases/<id>/collectionGroups/<id>/indexes/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `density` | `string \| null` | No | Immutable. The density configuration of the index. |
| `searchIndexOptions` | `object \| null` | No | Options for search indexes at the definition level. |
| `multikey` | `boolean \| null` | No | Optional. Whether the index is multikey. By default, the index is not multikey. For non-multikey indexes, none of the paths in the index definition reach or traverse an array, except via an explicit array index. For multikey indexes, at most one of the paths in the index definition reach or traverse an array, except via an explicit array index. Violations will result in errors. Note this field only applies to index with MONGODB\_COMPATIBLE\_API ApiScope. |
| `state` | `string \| null` | No | Output only. The serving state of the index. |
| `unique` | `boolean \| null` | No | Optional. Whether it is an unique index. Unique index ensures all values for the indexed field(s) are unique across documents. |
| `queryScope` | `string \| null` | No | Indexes with a collection query scope specified allow queries against a collection that is the child of a specific document, specified at query time, and that has the same collection ID. Indexes with a collection group query scope specified allow queries against all collections descended from a specific document, specified at query time, and that have the same collection ID as this index. |
| `apiScope` | `string \| null` | No | The API scope supported by this index. |
| `name` | `string \| null` | No | A server-defined name for this index. Output only. When used in the google.firestore.admin.v1.Index resource, the value is of the form: `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` When used in the google.firestore.admin.v1.Field resource, the value is empty. |
| `shardCount` | `number \| null` | No | Optional. The number of physical shards for the index. In Cloud Firestore, data and index entries are stored in contiguous, ordered key ranges called splits. While document keys within a collection are hashed to distribute write traffic across splits, secondary index entries are ordered lexicographically by their indexed field values. When an index contains fields with sequential or monotonically increasing or decreasing values (such as timestamps or auto-incrementing IDs), every incoming index write targets the boundary of the index keyspace on a single split. |
| `fields` | `object[] \| null` | No | The fields supported by this index. At most 100 fields may be specified. In Standard edition databases only: - At least 2 fields must be specified. - The last field entry is always for the field path `__name__`. If, on creation, `__name__` was not specified as the last field, it will be added automatically with the same direction as that of the last field defined. If the final field in the index is not directional, the `__name__` will be ordered ASCENDING (unless explicitly specified). |

> [accordion] searchIndexOptions full type
>
> ```ts theme={null}
> {
>   textLanguageOverrideFieldPath?: string | null,
>   textLanguage?: string | null
> } | null
> ```

> [accordion] fields full type
>
> ```ts theme={null}
> {
>   searchConfig?: {
>     geoSpec?: {
>       geoJsonIndexingDisabled?: boolean | null
>     } | null,
>     textSpec?: {
>       indexSpecs?: {
>         matchType?: string | null,
>         indexType?: string | null
>       }[] | null
>     } | null
>   } | null,
>   vectorConfig?: {
>     flat?: {
>     } | null,
>     dimension?: number | null
>   } | null,
>   fieldPath?: string | null,
>   order?: string | null,
>   arrayConfig?: string | null
> }[] | null
> ```

***

### databases.collectionGroups.indexes.list

`firestore.databases.collectionGroups.indexes.list`

Lists composite indexes (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.collectionGroups.indexes.list({ parent: 'projects/demo-project/databases/(default)/collectionGroups/users' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The number of results to return. |
| `parent` | `string` | Yes | Required. A parent name of the form `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` Format: `projects/<id>/databases/<id>/collectionGroups/<id>`. |
| `filter` | `string` | No | The filter to apply to list results. |
| `pageToken` | `string` | No | A page token, returned from a previous call to FirestoreAdmin.ListIndexes, that may be used to get the next page of results. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A page token that may be used to request another page of results. If blank, this is the last page. |
| `indexes` | `object[] \| null` | No | The requested indexes. |

> [accordion] indexes full type
>
> ```ts theme={null}
> {
>   density?: string | null,
>   searchIndexOptions?: {
>     textLanguageOverrideFieldPath?: string | null,
>     textLanguage?: string | null
>   } | null,
>   multikey?: boolean | null,
>   state?: string | null,
>   unique?: boolean | null,
>   queryScope?: string | null,
>   apiScope?: string | null,
>   name?: string | null,
>   shardCount?: number | null,
>   fields?: {
>     searchConfig?: {
>       geoSpec?: {
>         geoJsonIndexingDisabled?: boolean | null
>       } | null,
>       textSpec?: {
>         indexSpecs?: {
>           matchType?: string | null,
>           indexType?: string | null
>         }[] | null
>       } | null
>     } | null,
>     vectorConfig?: {
>       flat?: {
>       } | null,
>       dimension?: number | null
>     } | null,
>     fieldPath?: string | null,
>     order?: string | null,
>     arrayConfig?: string | null
>   }[] | null
> }[] | null
> ```

***

### databases.create

`firestore.databases.create`

Create a database

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.create({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. A parent name of the form `projects/{project_id}` Format: `projects/<id>`. |
| `databaseId` | `string` | No | Required. The ID to use for the database, which will become the final component of the database's resource name. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /\[0-9a-f]\{8}(-\[0-9a-f]\{4})\{3}-\[0-9a-f]\{12}/. "(default)" database ID is also valid if the database is Standard edition. |
| `firestoreDataAccessMode` | `DATA_ACCESS_MODE_UNSPECIFIED \| DATA_ACCESS_MODE_ENABLED \| DATA_ACCESS_MODE_DISABLED` | No | Optional. The Firestore API data access mode to use for this database. If not set on write: - the default value is DATA\_ACCESS\_MODE\_DISABLED for Enterprise edition. - the default value is DATA\_ACCESS\_MODE\_ENABLED for Standard edition. |
| `concurrencyMode` | `CONCURRENCY_MODE_UNSPECIFIED \| OPTIMISTIC \| PESSIMISTIC \| OPTIMISTIC_WITH_ENTITY_GROUPS` | No | The default concurrency control mode to use for this database. If unspecified in a CreateDatabase request, this will default based on the database edition: Optimistic for Enterprise and Pessimistic for all other databases. While transactions can explicitly specify their own concurrency mode, this setting defines the default behavior when left unspecified. Important: This database-level setting is not respected for Firestore with MongoDB compatibility. All transactions through the MongoDB compatibility layer will use optimistic concurrency control, regardless of this setting. |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
| `databaseEdition` | `DATABASE_EDITION_UNSPECIFIED \| STANDARD \| ENTERPRISE` | No | Immutable. The edition of the database. |
| `locationId` | `string` | No | Required. The location of the database. Available locations are listed at [https://cloud.google.com/firestore/docs/locations](https://cloud.google.com/firestore/docs/locations). |
| `realtimeUpdatesMode` | `REALTIME_UPDATES_MODE_UNSPECIFIED \| REALTIME_UPDATES_MODE_ENABLED \| REALTIME_UPDATES_MODE_DISABLED` | No | Immutable. The default Realtime Updates mode to use for this database. |
| `tags` | `Record<string, string>` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" |
| `cmekConfig` | `object` | No | The CMEK (Customer Managed Encryption Key) configuration for a Firestore database. If not present, the database is secured by the default Google encryption key. |
| `type` | `DATABASE_TYPE_UNSPECIFIED \| FIRESTORE_NATIVE \| DATASTORE_MODE` | No | Required. The type of the database. See [https://cloud.google.com/datastore/docs/firestore-or-datastore](https://cloud.google.com/datastore/docs/firestore-or-datastore) for information about how to choose. |
| `appEngineIntegrationMode` | `APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED \| ENABLED \| DISABLED` | No | The App Engine integration mode to use for this database. |
| `pointInTimeRecoveryEnablement` | `POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED \| POINT_IN_TIME_RECOVERY_ENABLED \| POINT_IN_TIME_RECOVERY_DISABLED` | No | Whether to enable the PITR feature on this database. |
| `deleteProtectionState` | `DELETE_PROTECTION_STATE_UNSPECIFIED \| DELETE_PROTECTION_DISABLED \| DELETE_PROTECTION_ENABLED` | No | State of delete protection for the database. |
| `mongodbCompatibleDataAccessMode` | `DATA_ACCESS_MODE_UNSPECIFIED \| DATA_ACCESS_MODE_ENABLED \| DATA_ACCESS_MODE_DISABLED` | No | Optional. The MongoDB compatible API data access mode to use for this database. If not set on write, the default value is DATA\_ACCESS\_MODE\_ENABLED for Enterprise edition. The value is always DATA\_ACCESS\_MODE\_DISABLED for Standard edition. |
| `name` | `string` | No | The resource name of the Database. Format: `projects/{project}/databases/{database}` |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### databases.delete

`firestore.databases.delete`

Deletes a database

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.firestore.databases.delete({ name: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. A name of the form `projects/{project_id}/databases/{database_id}` Format: `projects/<id>/databases/<id>`. |
| `etag` | `string` | No | The current etag of the Database. If an etag is provided and does not match the current etag of the database, deletion will be blocked and a FAILED\_PRECONDITION error will be returned. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### databases.documents.batchGet

`firestore.databases.documents.batchGet`

Gets multiple documents. Documents returned by this method are not guaranteed to be returned in the same order that they were requested

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.documents.batchGet({ database: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `database` | `string` | Yes | Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`. Format: `projects/<id>/databases/<id>`. |
| `documents` | `string[]` | No | The names of the documents to retrieve. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. The request will fail if any of the document is not a child resource of the given `database`. Duplicate names will be elided. |
| `requestOptions` | `object` | No | Options for a request. |
| `newTransaction` | `object` | No | Options for creating a new transaction. |
| `readTime` | `string` | No | Reads documents as they were at the given time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days. |
| `mask` | `object` | No | A set of field paths on a document. Used to restrict a get or update operation on a document to a subset of its fields. This is different from standard field masks, as this is always scoped to a Document, and takes in account the dynamic nature of Value. |
| `transaction` | `string` | No | Reads documents in a transaction. (base64) |

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

> [accordion] newTransaction full type
>
> ```ts theme={null}
> {
>   readOnly?: {
>     readTime?: string
>   },
>   readWrite?: {
>     retryTransaction?: string,
>     concurrencyMode?: CONCURRENCY_MODE_UNSPECIFIED | OPTIMISTIC | PESSIMISTIC
>   }
> }
> ```

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

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   found?: {
>     name?: string | null,
>     updateTime?: string | null,
>     createTime?: string | null,
>     fields?: Record<string, {
>       fieldReferenceValue?: string | null,
>       pipelineValue?: {
>       } | null,
>       functionValue?: {
>       } | null,
>       geoPointValue?: {
>         latitude?: number | null,
>         longitude?: number | null
>       } | null,
>       booleanValue?: boolean | null,
>       mapValue?: {
>       } | null,
>       nullValue?: string | null,
>       doubleValue?: number | string | null,
>       bytesValue?: string | null,
>       arrayValue?: {
>       } | null,
>       referenceValue?: string | null,
>       timestampValue?: string | null,
>       integerValue?: string | number | null,
>       stringValue?: string | null,
>       variableReferenceValue?: string | null
>     }> | null
>   } | null,
>   transaction?: string | null,
>   readTime?: string | null,
>   missing?: string | null
> }[]
> ```

***

### databases.documents.batchWrite

`firestore.databases.documents.batchWrite`

Applies a batch of write operations. The BatchWrite method does not apply the write operations atomically and can apply them out of order

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.documents.batchWrite({ database: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `database` | `string` | Yes | Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`. Format: `projects/<id>/databases/<id>`. |
| `writes` | `object[]` | No | The writes to apply. Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request. |
| `requestOptions` | `object` | No | Options for a request. |
| `labels` | `Record<string, string>` | No | Labels associated with this batch write. |

> [accordion] writes full type
>
> ```ts theme={null}
> {
>   transform?: {
>     fieldTransforms?: {
>       increment?: {
>         fieldReferenceValue?: string,
>         pipelineValue?: {
>         },
>         functionValue?: {
>         },
>         geoPointValue?: {
>           latitude?: number,
>           longitude?: number
>         },
>         booleanValue?: boolean,
>         mapValue?: {
>         },
>         nullValue?: NULL_VALUE,
>         doubleValue?: number | NaN | Infinity | -Infinity,
>         bytesValue?: string,
>         arrayValue?: {
>         },
>         referenceValue?: string,
>         timestampValue?: string,
>         integerValue?: string | number,
>         stringValue?: string,
>         variableReferenceValue?: string
>       },
>       setToServerValue?: SERVER_VALUE_UNSPECIFIED | REQUEST_TIME,
>       minimum?: {
>         fieldReferenceValue?: string,
>         pipelineValue?: {
>         },
>         functionValue?: {
>         },
>         geoPointValue?: {
>           latitude?: number,
>           longitude?: number
>         },
>         booleanValue?: boolean,
>         mapValue?: {
>         },
>         nullValue?: NULL_VALUE,
>         doubleValue?: number | NaN | Infinity | -Infinity,
>         bytesValue?: string,
>         arrayValue?: {
>         },
>         referenceValue?: string,
>         timestampValue?: string,
>         integerValue?: string | number,
>         stringValue?: string,
>         variableReferenceValue?: string
>       },
>       fieldPath?: string,
>       maximum?: {
>         fieldReferenceValue?: string,
>         pipelineValue?: {
>         },
>         functionValue?: {
>         },
>         geoPointValue?: {
>           latitude?: number,
>           longitude?: number
>         },
>         booleanValue?: boolean,
>         mapValue?: {
>         },
>         nullValue?: NULL_VALUE,
>         doubleValue?: number | NaN | Infinity | -Infinity,
>         bytesValue?: string,
>         arrayValue?: {
>         },
>         referenceValue?: string,
>         timestampValue?: string,
>         integerValue?: string | number,
>         stringValue?: string,
>         variableReferenceValue?: string
>       },
>       removeAllFromArray?: {
>         values?: {
>           fieldReferenceValue?: string,
>           pipelineValue?: {
>           },
>           functionValue?: {
>           },
>           geoPointValue?: {
>             latitude?: number,
>             longitude?: number
>           },
>           booleanValue?: boolean,
>           mapValue?: {
>           },
>           nullValue?: NULL_VALUE,
>           doubleValue?: number | NaN | Infinity | -Infinity,
>           bytesValue?: string,
>           arrayValue?: {
>           },
>           referenceValue?: string,
>           timestampValue?: string,
>           integerValue?: string | number,
>           stringValue?: string,
>           variableReferenceValue?: string
>         }[]
>       },
>       appendMissingElements?: {
>         values?: {
>           fieldReferenceValue?: string,
>           pipelineValue?: {
>           },
>           functionValue?: {
>           },
>           geoPointValue?: {
>             latitude?: number,
>             longitude?: number
>           },
>           booleanValue?: boolean,
>           mapValue?: {
>           },
>           nullValue?: NULL_VALUE,
>           doubleValue?: number | NaN | Infinity | -Infinity,
>           bytesValue?: string,
>           arrayValue?: {
>           },
>           referenceValue?: string,
>           timestampValue?: string,
>           integerValue?: string | number,
>           stringValue?: string,
>           variableReferenceValue?: string
>         }[]
>       }
>     }[],
>     document?: string
>   },
>   update?: {
>     name?: string,
>     updateTime?: string,
>     createTime?: string,
>     fields?: Record<string, {
>       fieldReferenceValue?: string,
>       pipelineValue?: {
>       },
>       functionValue?: {
>       },
>       geoPointValue?: {
>         latitude?: number,
>         longitude?: number
>       },
>       booleanValue?: boolean,
>       mapValue?: {
>       },
>       nullValue?: NULL_VALUE,
>       doubleValue?: number | NaN | Infinity | -Infinity,
>       bytesValue?: string,
>       arrayValue?: {
>       },
>       referenceValue?: string,
>       timestampValue?: string,
>       integerValue?: string | number,
>       stringValue?: string,
>       variableReferenceValue?: string
>     }>
>   },
>   updateTransforms?: {
>     increment?: {
>       fieldReferenceValue?: string,
>       pipelineValue?: {
>       },
>       functionValue?: {
>       },
>       geoPointValue?: {
>         latitude?: number,
>         longitude?: number
>       },
>       booleanValue?: boolean,
>       mapValue?: {
>       },
>       nullValue?: NULL_VALUE,
>       doubleValue?: number | NaN | Infinity | -Infinity,
>       bytesValue?: string,
>       arrayValue?: {
>       },
>       referenceValue?: string,
>       timestampValue?: string,
>       integerValue?: string | number,
>       stringValue?: string,
>       variableReferenceValue?: string
>     },
>     setToServerValue?: SERVER_VALUE_UNSPECIFIED | REQUEST_TIME,
>     minimum?: {
>       fieldReferenceValue?: string,
>       pipelineValue?: {
>       },
>       functionValue?: {
>       },
>       geoPointValue?: {
>         latitude?: number,
>         longitude?: number
>       },
>       booleanValue?: boolean,
>       mapValue?: {
>       },
>       nullValue?: NULL_VALUE,
>       doubleValue?: number | NaN | Infinity | -Infinity,
>       bytesValue?: string,
>       arrayValue?: {
>       },
>       referenceValue?: string,
>       timestampValue?: string,
>       integerValue?: string | number,
>       stringValue?: string,
>       variableReferenceValue?: string
>     },
>     fieldPath?: string,
>     maximum?: {
>       fieldReferenceValue?: string,
>       pipelineValue?: {
>       },
>       functionValue?: {
>       },
>       geoPointValue?: {
>         latitude?: number,
>         longitude?: number
>       },
>       booleanValue?: boolean,
>       mapValue?: {
>       },
>       nullValue?: NULL_VALUE,
>       doubleValue?: number | NaN | Infinity | -Infinity,
>       bytesValue?: string,
>       arrayValue?: {
>       },
>       referenceValue?: string,
>       timestampValue?: string,
>       integerValue?: string | number,
>       stringValue?: string,
>       variableReferenceValue?: string
>     },
>     removeAllFromArray?: {
>       values?: {
>         fieldReferenceValue?: string,
>         pipelineValue?: {
>         },
>         functionValue?: {
>         },
>         geoPointValue?: {
>           latitude?: number,
>           longitude?: number
>         },
>         booleanValue?: boolean,
>         mapValue?: {
>         },
>         nullValue?: NULL_VALUE,
>         doubleValue?: number | NaN | Infinity | -Infinity,
>         bytesValue?: string,
>         arrayValue?: {
>         },
>         referenceValue?: string,
>         timestampValue?: string,
>         integerValue?: string | number,
>         stringValue?: string,
>         variableReferenceValue?: string
>       }[]
>     },
>     appendMissingElements?: {
>       values?: {
>         fieldReferenceValue?: string,
>         pipelineValue?: {
>         },
>         functionValue?: {
>         },
>         geoPointValue?: {
>           latitude?: number,
>           longitude?: number
>         },
>         booleanValue?: boolean,
>         mapValue?: {
>         },
>         nullValue?: NULL_VALUE,
>         doubleValue?: number | NaN | Infinity | -Infinity,
>         bytesValue?: string,
>         arrayValue?: {
>         },
>         referenceValue?: string,
>         timestampValue?: string,
>         integerValue?: string | number,
>         stringValue?: string,
>         variableReferenceValue?: string
>       }[]
>     }
>   }[],
>   updateMask?: {
>     fieldPaths?: string[]
>   },
>   delete?: string,
>   currentDocument?: {
>     updateTime?: string,
>     exists?: boolean
>   }
> }[]
> ```

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `writeResults` | `object[] \| null` | No | The result of applying the writes. This i-th write result corresponds to the i-th write in the request. |
| `status` | `object[] \| null` | No | The status of applying the writes. This i-th write status corresponds to the i-th write in the request. |

> [accordion] writeResults full type
>
> ```ts theme={null}
> {
>   updateTime?: string | null,
>   transformResults?: {
>     fieldReferenceValue?: string | null,
>     pipelineValue?: {
>     } | null,
>     functionValue?: {
>     } | null,
>     geoPointValue?: {
>       latitude?: number | null,
>       longitude?: number | null
>     } | null,
>     booleanValue?: boolean | null,
>     mapValue?: {
>     } | null,
>     nullValue?: string | null,
>     doubleValue?: number | string | null,
>     bytesValue?: string | null,
>     arrayValue?: {
>     } | null,
>     referenceValue?: string | null,
>     timestampValue?: string | null,
>     integerValue?: string | number | null,
>     stringValue?: string | null,
>     variableReferenceValue?: string | null
>   }[] | null
> }[] | null
> ```

> [accordion] status full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> }[] | null
> ```

***

### databases.documents.beginTransaction

`firestore.databases.documents.beginTransaction`

Starts a new transaction

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.documents.beginTransaction({ database: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `database` | `string` | Yes | Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`. Format: `projects/<id>/databases/<id>`. |
| `options` | `object` | No | Options for creating a new transaction. |
| `requestOptions` | `object` | No | Options for a request. |

> [accordion] options full type
>
> ```ts theme={null}
> {
>   readOnly?: {
>     readTime?: string
>   },
>   readWrite?: {
>     retryTransaction?: string,
>     concurrencyMode?: CONCURRENCY_MODE_UNSPECIFIED | OPTIMISTIC | PESSIMISTIC
>   }
> }
> ```

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `transaction` | `string \| null` | No | The transaction that was started. (base64) |

***

### databases.documents.commit

`firestore.databases.documents.commit`

Commits a transaction, while optionally updating documents

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.documents.commit({ database: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `database` | `string` | Yes | Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`. Format: `projects/<id>/databases/<id>`. |
| `requestOptions` | `object` | No | Options for a request. |
| `writes` | `object[]` | No | The writes to apply. Always executed atomically and in order. |
| `transaction` | `string` | No | If set, applies all writes in this transaction, and commits it. (base64) |

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

> [accordion] writes full type
>
> ```ts theme={null}
> {
>   transform?: {
>     fieldTransforms?: {
>       increment?: {
>         fieldReferenceValue?: string,
>         pipelineValue?: {
>         },
>         functionValue?: {
>         },
>         geoPointValue?: {
>           latitude?: number,
>           longitude?: number
>         },
>         booleanValue?: boolean,
>         mapValue?: {
>         },
>         nullValue?: NULL_VALUE,
>         doubleValue?: number | NaN | Infinity | -Infinity,
>         bytesValue?: string,
>         arrayValue?: {
>         },
>         referenceValue?: string,
>         timestampValue?: string,
>         integerValue?: string | number,
>         stringValue?: string,
>         variableReferenceValue?: string
>       },
>       setToServerValue?: SERVER_VALUE_UNSPECIFIED | REQUEST_TIME,
>       minimum?: {
>         fieldReferenceValue?: string,
>         pipelineValue?: {
>         },
>         functionValue?: {
>         },
>         geoPointValue?: {
>           latitude?: number,
>           longitude?: number
>         },
>         booleanValue?: boolean,
>         mapValue?: {
>         },
>         nullValue?: NULL_VALUE,
>         doubleValue?: number | NaN | Infinity | -Infinity,
>         bytesValue?: string,
>         arrayValue?: {
>         },
>         referenceValue?: string,
>         timestampValue?: string,
>         integerValue?: string | number,
>         stringValue?: string,
>         variableReferenceValue?: string
>       },
>       fieldPath?: string,
>       maximum?: {
>         fieldReferenceValue?: string,
>         pipelineValue?: {
>         },
>         functionValue?: {
>         },
>         geoPointValue?: {
>           latitude?: number,
>           longitude?: number
>         },
>         booleanValue?: boolean,
>         mapValue?: {
>         },
>         nullValue?: NULL_VALUE,
>         doubleValue?: number | NaN | Infinity | -Infinity,
>         bytesValue?: string,
>         arrayValue?: {
>         },
>         referenceValue?: string,
>         timestampValue?: string,
>         integerValue?: string | number,
>         stringValue?: string,
>         variableReferenceValue?: string
>       },
>       removeAllFromArray?: {
>         values?: {
>           fieldReferenceValue?: string,
>           pipelineValue?: {
>           },
>           functionValue?: {
>           },
>           geoPointValue?: {
>             latitude?: number,
>             longitude?: number
>           },
>           booleanValue?: boolean,
>           mapValue?: {
>           },
>           nullValue?: NULL_VALUE,
>           doubleValue?: number | NaN | Infinity | -Infinity,
>           bytesValue?: string,
>           arrayValue?: {
>           },
>           referenceValue?: string,
>           timestampValue?: string,
>           integerValue?: string | number,
>           stringValue?: string,
>           variableReferenceValue?: string
>         }[]
>       },
>       appendMissingElements?: {
>         values?: {
>           fieldReferenceValue?: string,
>           pipelineValue?: {
>           },
>           functionValue?: {
>           },
>           geoPointValue?: {
>             latitude?: number,
>             longitude?: number
>           },
>           booleanValue?: boolean,
>           mapValue?: {
>           },
>           nullValue?: NULL_VALUE,
>           doubleValue?: number | NaN | Infinity | -Infinity,
>           bytesValue?: string,
>           arrayValue?: {
>           },
>           referenceValue?: string,
>           timestampValue?: string,
>           integerValue?: string | number,
>           stringValue?: string,
>           variableReferenceValue?: string
>         }[]
>       }
>     }[],
>     document?: string
>   },
>   update?: {
>     name?: string,
>     updateTime?: string,
>     createTime?: string,
>     fields?: Record<string, {
>       fieldReferenceValue?: string,
>       pipelineValue?: {
>       },
>       functionValue?: {
>       },
>       geoPointValue?: {
>         latitude?: number,
>         longitude?: number
>       },
>       booleanValue?: boolean,
>       mapValue?: {
>       },
>       nullValue?: NULL_VALUE,
>       doubleValue?: number | NaN | Infinity | -Infinity,
>       bytesValue?: string,
>       arrayValue?: {
>       },
>       referenceValue?: string,
>       timestampValue?: string,
>       integerValue?: string | number,
>       stringValue?: string,
>       variableReferenceValue?: string
>     }>
>   },
>   updateTransforms?: {
>     increment?: {
>       fieldReferenceValue?: string,
>       pipelineValue?: {
>       },
>       functionValue?: {
>       },
>       geoPointValue?: {
>         latitude?: number,
>         longitude?: number
>       },
>       booleanValue?: boolean,
>       mapValue?: {
>       },
>       nullValue?: NULL_VALUE,
>       doubleValue?: number | NaN | Infinity | -Infinity,
>       bytesValue?: string,
>       arrayValue?: {
>       },
>       referenceValue?: string,
>       timestampValue?: string,
>       integerValue?: string | number,
>       stringValue?: string,
>       variableReferenceValue?: string
>     },
>     setToServerValue?: SERVER_VALUE_UNSPECIFIED | REQUEST_TIME,
>     minimum?: {
>       fieldReferenceValue?: string,
>       pipelineValue?: {
>       },
>       functionValue?: {
>       },
>       geoPointValue?: {
>         latitude?: number,
>         longitude?: number
>       },
>       booleanValue?: boolean,
>       mapValue?: {
>       },
>       nullValue?: NULL_VALUE,
>       doubleValue?: number | NaN | Infinity | -Infinity,
>       bytesValue?: string,
>       arrayValue?: {
>       },
>       referenceValue?: string,
>       timestampValue?: string,
>       integerValue?: string | number,
>       stringValue?: string,
>       variableReferenceValue?: string
>     },
>     fieldPath?: string,
>     maximum?: {
>       fieldReferenceValue?: string,
>       pipelineValue?: {
>       },
>       functionValue?: {
>       },
>       geoPointValue?: {
>         latitude?: number,
>         longitude?: number
>       },
>       booleanValue?: boolean,
>       mapValue?: {
>       },
>       nullValue?: NULL_VALUE,
>       doubleValue?: number | NaN | Infinity | -Infinity,
>       bytesValue?: string,
>       arrayValue?: {
>       },
>       referenceValue?: string,
>       timestampValue?: string,
>       integerValue?: string | number,
>       stringValue?: string,
>       variableReferenceValue?: string
>     },
>     removeAllFromArray?: {
>       values?: {
>         fieldReferenceValue?: string,
>         pipelineValue?: {
>         },
>         functionValue?: {
>         },
>         geoPointValue?: {
>           latitude?: number,
>           longitude?: number
>         },
>         booleanValue?: boolean,
>         mapValue?: {
>         },
>         nullValue?: NULL_VALUE,
>         doubleValue?: number | NaN | Infinity | -Infinity,
>         bytesValue?: string,
>         arrayValue?: {
>         },
>         referenceValue?: string,
>         timestampValue?: string,
>         integerValue?: string | number,
>         stringValue?: string,
>         variableReferenceValue?: string
>       }[]
>     },
>     appendMissingElements?: {
>       values?: {
>         fieldReferenceValue?: string,
>         pipelineValue?: {
>         },
>         functionValue?: {
>         },
>         geoPointValue?: {
>           latitude?: number,
>           longitude?: number
>         },
>         booleanValue?: boolean,
>         mapValue?: {
>         },
>         nullValue?: NULL_VALUE,
>         doubleValue?: number | NaN | Infinity | -Infinity,
>         bytesValue?: string,
>         arrayValue?: {
>         },
>         referenceValue?: string,
>         timestampValue?: string,
>         integerValue?: string | number,
>         stringValue?: string,
>         variableReferenceValue?: string
>       }[]
>     }
>   }[],
>   updateMask?: {
>     fieldPaths?: string[]
>   },
>   delete?: string,
>   currentDocument?: {
>     updateTime?: string,
>     exists?: boolean
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `writeResults` | `object[] \| null` | No | The result of applying the writes. This i-th write result corresponds to the i-th write in the request. |
| `commitTime` | `string \| null` | No | The time at which the commit occurred. Any read with an equal or greater `read_time` is guaranteed to see the effects of the commit. |

> [accordion] writeResults full type
>
> ```ts theme={null}
> {
>   updateTime?: string | null,
>   transformResults?: {
>     fieldReferenceValue?: string | null,
>     pipelineValue?: {
>     } | null,
>     functionValue?: {
>     } | null,
>     geoPointValue?: {
>       latitude?: number | null,
>       longitude?: number | null
>     } | null,
>     booleanValue?: boolean | null,
>     mapValue?: {
>     } | null,
>     nullValue?: string | null,
>     doubleValue?: number | string | null,
>     bytesValue?: string | null,
>     arrayValue?: {
>     } | null,
>     referenceValue?: string | null,
>     timestampValue?: string | null,
>     integerValue?: string | number | null,
>     stringValue?: string | null,
>     variableReferenceValue?: string | null
>   }[] | null
> }[] | null
> ```

***

### databases.documents.createDocument

`firestore.databases.documents.createDocument`

Create a document in a collection (parent = projects/\<p>/databases/(default)/documents, collectionId), with fields as Firestore Values (\{ stringValue }, \{ integerValue } ...)

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.documents.createDocument({
	parent: 'projects/demo-project/databases/(default)/documents',
	collectionId: 'users',
	documentId: 'ada',
	fields: {
		name: { stringValue: 'Ada' },
		born: { integerValue: '1815' },
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent resource. For example: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` Format: `projects/<id>/databases/<id>/documents/<path>`. |
| `mask.fieldPaths` | `string[]` | No | The list of field paths in the mask. See Document.fields for a field path syntax reference. |
| `requestOptions.requestTags` | `string[]` | No | Optional. The request tags for the request. Request tags are user-provided strings used for usage monitoring, cost management, and observability. Callers can associate custom application context (such as component, microservice, feature name, or operation type) with database requests. These tags are collected and aggregated in usage and monitoring reports, allowing billable operations and usage metrics to be sliced and analyzed by tag. These tags *only* show up in monitoring and are visible in administrative operations (such as usage reports). |
| `documentId` | `string` | No | The client-assigned document ID to use for this document. Optional. If not specified, an ID will be assigned by the service. |
| `collectionId` | `string` | Yes | Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`. |
| `name` | `string` | No | The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. |
| `updateTime` | `string` | No | Output only. The time at which the document was last changed. This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query. |
| `createTime` | `string` | No | Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query. |
| `fields` | `object` | No | The document's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The field names, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by a dot-delimited (`.`) string of segments. Each segment is either a simple field name (defined below) or a quoted field name. |

> [accordion] fields full type
>
> ```ts theme={null}
> Record<string, {
>   fieldReferenceValue?: string,
>   pipelineValue?: {
>   },
>   functionValue?: {
>   },
>   geoPointValue?: {
>     latitude?: number,
>     longitude?: number
>   },
>   booleanValue?: boolean,
>   mapValue?: {
>   },
>   nullValue?: NULL_VALUE,
>   doubleValue?: number | NaN | Infinity | -Infinity,
>   bytesValue?: string,
>   arrayValue?: {
>   },
>   referenceValue?: string,
>   timestampValue?: string,
>   integerValue?: string | number,
>   stringValue?: string,
>   variableReferenceValue?: string
> }>
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. |
| `updateTime` | `string \| null` | No | Output only. The time at which the document was last changed. This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query. |
| `createTime` | `string \| null` | No | Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query. |
| `fields` | `object \| null` | No | The document's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The field names, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by a dot-delimited (`.`) string of segments. Each segment is either a simple field name (defined below) or a quoted field name. |

> [accordion] fields full type
>
> ```ts theme={null}
> Record<string, {
>   fieldReferenceValue?: string | null,
>   pipelineValue?: {
>   } | null,
>   functionValue?: {
>   } | null,
>   geoPointValue?: {
>     latitude?: number | null,
>     longitude?: number | null
>   } | null,
>   booleanValue?: boolean | null,
>   mapValue?: {
>   } | null,
>   nullValue?: string | null,
>   doubleValue?: number | string | null,
>   bytesValue?: string | null,
>   arrayValue?: {
>   } | null,
>   referenceValue?: string | null,
>   timestampValue?: string | null,
>   integerValue?: string | number | null,
>   stringValue?: string | null,
>   variableReferenceValue?: string | null
> }> | null
> ```

***

### databases.documents.delete

`firestore.databases.documents.delete`

Deletes a document

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.firestore.databases.documents.delete({ name: 'projects/demo-project/databases/(default)/documents/users/ada' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `currentDocument.exists` | `boolean` | No | When set to `true`, the target document must exist. When set to `false`, the target document must not exist. |
| `name` | `string` | Yes | Required. The resource name of the Document to delete. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. Format: `projects/<id>/databases/<id>/documents/<id>/<path>`. |
| `currentDocument.updateTime` | `string` | No | When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned. |
| `requestOptions.requestTags` | `string[]` | No | Optional. The request tags for the request. Request tags are user-provided strings used for usage monitoring, cost management, and observability. Callers can associate custom application context (such as component, microservice, feature name, or operation type) with database requests. These tags are collected and aggregated in usage and monitoring reports, allowing billable operations and usage metrics to be sliced and analyzed by tag. These tags *only* show up in monitoring and are visible in administrative operations (such as usage reports). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### databases.documents.executePipeline

`firestore.databases.documents.executePipeline`

Executes a pipeline query

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.documents.executePipeline({ database: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `database` | `string` | Yes | Required. Database identifier, in the form `projects/{project}/databases/{database}`. Format: `projects/<id>/databases/<id>`. |
| `requestOptions` | `object` | No | Options for a request. |
| `readTime` | `string` | No | Execute the pipeline in a snapshot transaction at the given time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days. |
| `structuredPipeline` | `object` | No | A Firestore query represented as an ordered list of operations / stages. This is considered the top-level function which plans and executes a query. It is logically equivalent to `query(stages, options)`, but prevents the client from having to build a function wrapper. |
| `transaction` | `string` | No | Run the query within an already active transaction. The value here is the opaque transaction ID to execute the query in. (base64) |
| `newTransaction` | `object` | No | Options for creating a new transaction. |
| `autoCommitTransaction` | `boolean` | No | Optional. Automatically commits the transaction after the pipeline has been executed. Only permitted in combination with `transaction` or `new_transaction`. |

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

> [accordion] structuredPipeline full type
>
> ```ts theme={null}
> {
>   options?: Record<string, {
>     fieldReferenceValue?: string,
>     pipelineValue?: {
>     },
>     functionValue?: {
>     },
>     geoPointValue?: {
>       latitude?: number,
>       longitude?: number
>     },
>     booleanValue?: boolean,
>     mapValue?: {
>     },
>     nullValue?: NULL_VALUE,
>     doubleValue?: number | NaN | Infinity | -Infinity,
>     bytesValue?: string,
>     arrayValue?: {
>     },
>     referenceValue?: string,
>     timestampValue?: string,
>     integerValue?: string | number,
>     stringValue?: string,
>     variableReferenceValue?: string
>   }>,
>   pipeline?: {
>     stages?: {
>       args?: {
>         fieldReferenceValue?: string,
>         pipelineValue?: {
>         },
>         functionValue?: {
>         },
>         geoPointValue?: {
>           latitude?: number,
>           longitude?: number
>         },
>         booleanValue?: boolean,
>         mapValue?: {
>         },
>         nullValue?: NULL_VALUE,
>         doubleValue?: number | NaN | Infinity | -Infinity,
>         bytesValue?: string,
>         arrayValue?: {
>         },
>         referenceValue?: string,
>         timestampValue?: string,
>         integerValue?: string | number,
>         stringValue?: string,
>         variableReferenceValue?: string
>       }[],
>       options?: Record<string, {
>         fieldReferenceValue?: string,
>         pipelineValue?: {
>         },
>         functionValue?: {
>         },
>         geoPointValue?: {
>           latitude?: number,
>           longitude?: number
>         },
>         booleanValue?: boolean,
>         mapValue?: {
>         },
>         nullValue?: NULL_VALUE,
>         doubleValue?: number | NaN | Infinity | -Infinity,
>         bytesValue?: string,
>         arrayValue?: {
>         },
>         referenceValue?: string,
>         timestampValue?: string,
>         integerValue?: string | number,
>         stringValue?: string,
>         variableReferenceValue?: string
>       }>,
>       name?: string
>     }[]
>   }
> }
> ```

> [accordion] newTransaction full type
>
> ```ts theme={null}
> {
>   readOnly?: {
>     readTime?: string
>   },
>   readWrite?: {
>     retryTransaction?: string,
>     concurrencyMode?: CONCURRENCY_MODE_UNSPECIFIED | OPTIMISTIC | PESSIMISTIC
>   }
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   transaction?: string | null,
>   executionTime?: string | null,
>   explainStats?: {
>     data?: Record<string, any> | null
>   } | null,
>   results?: {
>     name?: string | null,
>     updateTime?: string | null,
>     createTime?: string | null,
>     fields?: Record<string, {
>       fieldReferenceValue?: string | null,
>       pipelineValue?: {
>       } | null,
>       functionValue?: {
>       } | null,
>       geoPointValue?: {
>         latitude?: number | null,
>         longitude?: number | null
>       } | null,
>       booleanValue?: boolean | null,
>       mapValue?: {
>       } | null,
>       nullValue?: string | null,
>       doubleValue?: number | string | null,
>       bytesValue?: string | null,
>       arrayValue?: {
>       } | null,
>       referenceValue?: string | null,
>       timestampValue?: string | null,
>       integerValue?: string | number | null,
>       stringValue?: string | null,
>       variableReferenceValue?: string | null
>     }> | null
>   }[] | null
> }[]
> ```

***

### databases.documents.get

`firestore.databases.documents.get`

Get one Firestore document by its full name (projects/\<p>/databases/(default)/documents/\<collection>/\<id>)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.documents.get({ name: 'projects/demo-project/databases/(default)/documents/users/ada' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `mask.fieldPaths` | `string[]` | No | The list of field paths in the mask. See Document.fields for a field path syntax reference. |
| `requestOptions.requestTags` | `string[]` | No | Optional. The request tags for the request. Request tags are user-provided strings used for usage monitoring, cost management, and observability. Callers can associate custom application context (such as component, microservice, feature name, or operation type) with database requests. These tags are collected and aggregated in usage and monitoring reports, allowing billable operations and usage metrics to be sliced and analyzed by tag. These tags *only* show up in monitoring and are visible in administrative operations (such as usage reports). |
| `readTime` | `string` | No | Reads the version of the document at the given time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days. |
| `name` | `string` | Yes | Required. The resource name of the Document to get. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. Format: `projects/<id>/databases/<id>/documents/<id>/<path>`. |
| `transaction` | `string` | No | Reads the document in a transaction. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. |
| `updateTime` | `string \| null` | No | Output only. The time at which the document was last changed. This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query. |
| `createTime` | `string \| null` | No | Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query. |
| `fields` | `object \| null` | No | The document's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The field names, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by a dot-delimited (`.`) string of segments. Each segment is either a simple field name (defined below) or a quoted field name. |

> [accordion] fields full type
>
> ```ts theme={null}
> Record<string, {
>   fieldReferenceValue?: string | null,
>   pipelineValue?: {
>   } | null,
>   functionValue?: {
>   } | null,
>   geoPointValue?: {
>     latitude?: number | null,
>     longitude?: number | null
>   } | null,
>   booleanValue?: boolean | null,
>   mapValue?: {
>   } | null,
>   nullValue?: string | null,
>   doubleValue?: number | string | null,
>   bytesValue?: string | null,
>   arrayValue?: {
>   } | null,
>   referenceValue?: string | null,
>   timestampValue?: string | null,
>   integerValue?: string | number | null,
>   stringValue?: string | null,
>   variableReferenceValue?: string | null
> }> | null
> ```

***

### databases.documents.list

`firestore.databases.documents.list`

Lists documents (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.documents.list({ collectionId: 'users', parent: 'projects/demo-project/databases/(default)/documents/users/ada' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of documents to return in a single response. Firestore may return fewer than this value. |
| `transaction` | `string` | No | Perform the read as part of an already active transaction. |
| `readTime` | `string` | No | Perform the read at the provided time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days. |
| `pageToken` | `string` | No | Optional. A page token, received from a previous `ListDocuments` response. Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of `page_size`) must match the values set in the request that generated the page token. |
| `mask.fieldPaths` | `string[]` | No | The list of field paths in the mask. See Document.fields for a field path syntax reference. |
| `collectionId` | `string` | Yes | Optional. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`. This is optional, and when not provided, Firestore will list documents from all collections under the provided `parent`. |
| `showMissing` | `boolean` | No | If the list should show missing documents. A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, `create_time`, or `update_time` set. Requests with `show_missing` may not specify `where` or `order_by`. |
| `requestOptions.requestTags` | `string[]` | No | Optional. The request tags for the request. Request tags are user-provided strings used for usage monitoring, cost management, and observability. Callers can associate custom application context (such as component, microservice, feature name, or operation type) with database requests. These tags are collected and aggregated in usage and monitoring reports, allowing billable operations and usage metrics to be sliced and analyzed by tag. These tags *only* show up in monitoring and are visible in administrative operations (such as usage reports). |
| `orderBy` | `string` | No | Optional. The optional ordering of the documents to return. For example: `priority desc, __name__ desc`. This mirrors the `ORDER BY` used in Firestore queries but in a string representation. When absent, documents are ordered based on `__name__ ASC`. |
| `recursive` | `boolean` | No | Optional. If the list should recursively include all documents nested under the parent at any level. If the request specifies a `collection_id`, then the list will include all nested documents in the collection under the parent. This is optional, and when not provided, Firestore will only list documents nested immediately under the parent. Requests with `recursive` may not specify `show_missing`. |
| `parent` | `string` | Yes | Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` Format: `projects/<id>/databases/<id>/documents/<id>/<path>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `documents` | `object[] \| null` | No | The Documents found. |
| `nextPageToken` | `string \| null` | No | A token to retrieve the next page of documents. If this field is omitted, there are no subsequent pages. |

> [accordion] documents full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   updateTime?: string | null,
>   createTime?: string | null,
>   fields?: Record<string, {
>     fieldReferenceValue?: string | null,
>     pipelineValue?: {
>     } | null,
>     functionValue?: {
>     } | null,
>     geoPointValue?: {
>       latitude?: number | null,
>       longitude?: number | null
>     } | null,
>     booleanValue?: boolean | null,
>     mapValue?: {
>     } | null,
>     nullValue?: string | null,
>     doubleValue?: number | string | null,
>     bytesValue?: string | null,
>     arrayValue?: {
>     } | null,
>     referenceValue?: string | null,
>     timestampValue?: string | null,
>     integerValue?: string | number | null,
>     stringValue?: string | null,
>     variableReferenceValue?: string | null
>   }> | null
> }[] | null
> ```

***

### databases.documents.listCollectionIds

`firestore.databases.documents.listCollectionIds`

Lists all the collection IDs underneath a document

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.documents.listCollectionIds({ parent: 'projects/demo-project/databases/(default)/documents/users/ada' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent document. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` Use `projects/{project_id}/databases/{database_id}/documents` to list top-level collections. Format: `projects/<id>/databases/<id>/documents/<id>/<path>`. |
| `pageSize` | `number` | No | The maximum number of results to return. |
| `readTime` | `string` | No | Reads documents as they were at the given time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days. |
| `requestOptions` | `object` | No | Options for a request. |
| `pageToken` | `string` | No | A page token. Must be a value from ListCollectionIdsResponse. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `collectionIds` | `string[] \| null` | No | The collection ids. |
| `nextPageToken` | `string \| null` | No | A page token that may be used to continue the list. |

***

### databases.documents.listDocuments

`firestore.databases.documents.listDocuments`

Lists documents (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.documents.listDocuments({ collectionId: 'users', parent: 'projects/demo-project/databases/(default)/documents' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `mask.fieldPaths` | `string[]` | No | The list of field paths in the mask. See Document.fields for a field path syntax reference. |
| `collectionId` | `string` | Yes | Optional. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`. This is optional, and when not provided, Firestore will list documents from all collections under the provided `parent`. |
| `orderBy` | `string` | No | Optional. The optional ordering of the documents to return. For example: `priority desc, __name__ desc`. This mirrors the `ORDER BY` used in Firestore queries but in a string representation. When absent, documents are ordered based on `__name__ ASC`. |
| `showMissing` | `boolean` | No | If the list should show missing documents. A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, `create_time`, or `update_time` set. Requests with `show_missing` may not specify `where` or `order_by`. |
| `pageToken` | `string` | No | Optional. A page token, received from a previous `ListDocuments` response. Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of `page_size`) must match the values set in the request that generated the page token. |
| `parent` | `string` | Yes | Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` Format: `projects/<id>/databases/<id>/documents`. |
| `readTime` | `string` | No | Perform the read at the provided time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days. |
| `requestOptions.requestTags` | `string[]` | No | Optional. The request tags for the request. Request tags are user-provided strings used for usage monitoring, cost management, and observability. Callers can associate custom application context (such as component, microservice, feature name, or operation type) with database requests. These tags are collected and aggregated in usage and monitoring reports, allowing billable operations and usage metrics to be sliced and analyzed by tag. These tags *only* show up in monitoring and are visible in administrative operations (such as usage reports). |
| `recursive` | `boolean` | No | Optional. If the list should recursively include all documents nested under the parent at any level. If the request specifies a `collection_id`, then the list will include all nested documents in the collection under the parent. This is optional, and when not provided, Firestore will only list documents nested immediately under the parent. Requests with `recursive` may not specify `show_missing`. |
| `transaction` | `string` | No | Perform the read as part of an already active transaction. |
| `pageSize` | `number` | No | Optional. The maximum number of documents to return in a single response. Firestore may return fewer than this value. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `documents` | `object[] \| null` | No | The Documents found. |
| `nextPageToken` | `string \| null` | No | A token to retrieve the next page of documents. If this field is omitted, there are no subsequent pages. |

> [accordion] documents full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   updateTime?: string | null,
>   createTime?: string | null,
>   fields?: Record<string, {
>     fieldReferenceValue?: string | null,
>     pipelineValue?: {
>     } | null,
>     functionValue?: {
>     } | null,
>     geoPointValue?: {
>       latitude?: number | null,
>       longitude?: number | null
>     } | null,
>     booleanValue?: boolean | null,
>     mapValue?: {
>     } | null,
>     nullValue?: string | null,
>     doubleValue?: number | string | null,
>     bytesValue?: string | null,
>     arrayValue?: {
>     } | null,
>     referenceValue?: string | null,
>     timestampValue?: string | null,
>     integerValue?: string | number | null,
>     stringValue?: string | null,
>     variableReferenceValue?: string | null
>   }> | null
> }[] | null
> ```

***

### databases.documents.partitionQuery

`firestore.databases.documents.partitionQuery`

Partitions a query by returning partition cursors that can be used to run the query in parallel. The returned partition cursors are split points that can be used by RunQuery as starting/end points for the query results

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.documents.partitionQuery({
	parent: 'projects/demo-project/databases/(default)/documents',
	structuredQuery: {
		from: [{ collectionId: 'users', allDescendants: true }],
		orderBy: [{
			field: { fieldPath: '__name__' },
			direction: 'ASCENDING',
		}],
	},
	partitionCount: '4',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The documents root: `projects/<project>/databases/<database>/documents` (a document path is refused). |
| `pageToken` | `string` | No | The `next_page_token` value returned from a previous call to PartitionQuery that may be used to get an additional set of results. There are no ordering guarantees between sets of results. Thus, using multiple sets of results will require merging the different result sets. |
| `structuredQuery` | `object` | No | A Firestore query. The query stages are executed in the following order: 1. from 2. where 3. select 4. order\_by + start\_at + end\_at 5. offset 6. limit 7. find\_nearest |
| `pageSize` | `number` | No | The maximum number of partitions to return in this call, subject to `partition_count`. For example, if `partition_count` = 10 and `page_size` = 8, the first call to PartitionQuery will return up to 8 partitions and a `next_page_token` if more results exist. A second call to PartitionQuery will return up to 2 partitions, to complete the total of 10 specified in `partition_count`. |
| `requestOptions` | `object` | No | Options for a request. |
| `readTime` | `string` | No | Reads documents as they were at the given time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days. |
| `partitionCount` | `string \| number` | No | The desired maximum number of partition points. The partitions may be returned across multiple pages of results. The number must be positive. The actual number of partitions returned may be fewer. For example, this may be set to one fewer than the number of parallel queries to be run, or in running a data pipeline job, one fewer than the number of workers or compute instances available. |

> [accordion] structuredQuery full type
>
> ```ts theme={null}
> {
>   endAt?: {
>     values?: {
>       fieldReferenceValue?: string,
>       pipelineValue?: {
>       },
>       functionValue?: {
>       },
>       geoPointValue?: {
>         latitude?: number,
>         longitude?: number
>       },
>       booleanValue?: boolean,
>       mapValue?: {
>       },
>       nullValue?: NULL_VALUE,
>       doubleValue?: number | NaN | Infinity | -Infinity,
>       bytesValue?: string,
>       arrayValue?: {
>       },
>       referenceValue?: string,
>       timestampValue?: string,
>       integerValue?: string | number,
>       stringValue?: string,
>       variableReferenceValue?: string
>     }[],
>     before?: boolean
>   },
>   startAt?: {
>     values?: {
>       fieldReferenceValue?: string,
>       pipelineValue?: {
>       },
>       functionValue?: {
>       },
>       geoPointValue?: {
>         latitude?: number,
>         longitude?: number
>       },
>       booleanValue?: boolean,
>       mapValue?: {
>       },
>       nullValue?: NULL_VALUE,
>       doubleValue?: number | NaN | Infinity | -Infinity,
>       bytesValue?: string,
>       arrayValue?: {
>       },
>       referenceValue?: string,
>       timestampValue?: string,
>       integerValue?: string | number,
>       stringValue?: string,
>       variableReferenceValue?: string
>     }[],
>     before?: boolean
>   },
>   from?: {
>     allDescendants?: boolean,
>     collectionId?: string
>   }[],
>   offset?: number,
>   where?: {
>     unaryFilter?: {
>       field?: {
>         fieldPath?: string
>       },
>       op?: OPERATOR_UNSPECIFIED | IS_NAN | IS_NULL | IS_NOT_NAN | IS_NOT_NULL
>     },
>     compositeFilter?: {
>       op?: OPERATOR_UNSPECIFIED | AND | OR,
>       filters?: {
>         unaryFilter?: {
>           field?: {
>             fieldPath?: string
>           },
>           op?: OPERATOR_UNSPECIFIED | IS_NAN | IS_NULL | IS_NOT_NAN | IS_NOT_NULL
>         },
>         compositeFilter?: {
>           op?: OPERATOR_UNSPECIFIED | AND | OR,
>           filters?: (recursive)[]
>         },
>         fieldFilter?: {
>           field?: {
>             fieldPath?: string
>           },
>           value?: {
>             fieldReferenceValue?: string,
>             pipelineValue?: {
>             },
>             functionValue?: {
>             },
>             geoPointValue?: {
>               latitude?: number,
>               longitude?: number
>             },
>             booleanValue?: boolean,
>             mapValue?: {
>             },
>             nullValue?: NULL_VALUE,
>             doubleValue?: number | NaN | Infinity | -Infinity,
>             bytesValue?: string,
>             arrayValue?: {
>             },
>             referenceValue?: string,
>             timestampValue?: string,
>             integerValue?: string | number,
>             stringValue?: string,
>             variableReferenceValue?: string
>           },
>           op?: OPERATOR_UNSPECIFIED | LESS_THAN | LESS_THAN_OR_EQUAL | GREATER_THAN | GREATER_THAN_OR_EQUAL | EQUAL | NOT_EQUAL | ARRAY_CONTAINS | IN | ARRAY_CONTAINS_ANY | NOT_IN
>         }
>       }[]
>     },
>     fieldFilter?: {
>       field?: {
>         fieldPath?: string
>       },
>       value?: {
>         fieldReferenceValue?: string,
>         pipelineValue?: {
>         },
>         functionValue?: {
>         },
>         geoPointValue?: {
>           latitude?: number,
>           longitude?: number
>         },
>         booleanValue?: boolean,
>         mapValue?: {
>         },
>         nullValue?: NULL_VALUE,
>         doubleValue?: number | NaN | Infinity | -Infinity,
>         bytesValue?: string,
>         arrayValue?: {
>         },
>         referenceValue?: string,
>         timestampValue?: string,
>         integerValue?: string | number,
>         stringValue?: string,
>         variableReferenceValue?: string
>       },
>       op?: OPERATOR_UNSPECIFIED | LESS_THAN | LESS_THAN_OR_EQUAL | GREATER_THAN | GREATER_THAN_OR_EQUAL | EQUAL | NOT_EQUAL | ARRAY_CONTAINS | IN | ARRAY_CONTAINS_ANY | NOT_IN
>     }
>   },
>   select?: {
>     fields?: {
>       fieldPath?: string
>     }[]
>   },
>   orderBy?: {
>     field?: {
>       fieldPath?: string
>     },
>     direction?: DIRECTION_UNSPECIFIED | ASCENDING | DESCENDING
>   }[],
>   limit?: number,
>   findNearest?: {
>     limit?: number,
>     distanceResultField?: string,
>     vectorField?: {
>       fieldPath?: string
>     },
>     queryVector?: {
>       fieldReferenceValue?: string,
>       pipelineValue?: {
>       },
>       functionValue?: {
>       },
>       geoPointValue?: {
>         latitude?: number,
>         longitude?: number
>       },
>       booleanValue?: boolean,
>       mapValue?: {
>       },
>       nullValue?: NULL_VALUE,
>       doubleValue?: number | NaN | Infinity | -Infinity,
>       bytesValue?: string,
>       arrayValue?: {
>       },
>       referenceValue?: string,
>       timestampValue?: string,
>       integerValue?: string | number,
>       stringValue?: string,
>       variableReferenceValue?: string
>     },
>     distanceThreshold?: number,
>     distanceMeasure?: DISTANCE_MEASURE_UNSPECIFIED | EUCLIDEAN | COSINE | DOT_PRODUCT
>   }
> }
> ```

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `partitions` | `object[] \| null` | No | Partition results. Each partition is a split point that can be used by RunQuery as a starting or end point for the query results. The RunQuery requests must be made with the same query supplied to this PartitionQuery request. The partition cursors will be ordered according to same ordering as the results of the query supplied to PartitionQuery. |
| `nextPageToken` | `string \| null` | No | A page token that may be used to request an additional set of results, up to the number specified by `partition_count` in the PartitionQuery request. If blank, there are no more results. |

> [accordion] partitions full type
>
> ```ts theme={null}
> {
>   values?: {
>     fieldReferenceValue?: string | null,
>     pipelineValue?: {
>     } | null,
>     functionValue?: {
>     } | null,
>     geoPointValue?: {
>       latitude?: number | null,
>       longitude?: number | null
>     } | null,
>     booleanValue?: boolean | null,
>     mapValue?: {
>     } | null,
>     nullValue?: string | null,
>     doubleValue?: number | string | null,
>     bytesValue?: string | null,
>     arrayValue?: {
>     } | null,
>     referenceValue?: string | null,
>     timestampValue?: string | null,
>     integerValue?: string | number | null,
>     stringValue?: string | null,
>     variableReferenceValue?: string | null
>   }[] | null,
>   before?: boolean | null
> }[] | null
> ```

***

### databases.documents.patch

`firestore.databases.documents.patch`

Update or create a document: the fields given replace the stored ones (updateMask.fieldPaths limits which)

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.documents.patch({ name: 'projects/demo-project/databases/(default)/documents/users/ada' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `currentDocument.updateTime` | `string` | No | When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned. |
| `updateMask.fieldPaths` | `string[]` | No | The list of field paths in the mask. See Document.fields for a field path syntax reference. |
| `currentDocument.exists` | `boolean` | No | When set to `true`, the target document must exist. When set to `false`, the target document must not exist. |
| `name` | `string` | Yes | The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. Format: `projects/<id>/databases/<id>/documents/<id>/<path>`. |
| `requestOptions.requestTags` | `string[]` | No | Optional. The request tags for the request. Request tags are user-provided strings used for usage monitoring, cost management, and observability. Callers can associate custom application context (such as component, microservice, feature name, or operation type) with database requests. These tags are collected and aggregated in usage and monitoring reports, allowing billable operations and usage metrics to be sliced and analyzed by tag. These tags *only* show up in monitoring and are visible in administrative operations (such as usage reports). |
| `mask.fieldPaths` | `string[]` | No | The list of field paths in the mask. See Document.fields for a field path syntax reference. |
| `body_name` | `string` | No | The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. |
| `updateTime` | `string` | No | Output only. The time at which the document was last changed. This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query. |
| `createTime` | `string` | No | Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query. |
| `fields` | `object` | No | The document's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The field names, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by a dot-delimited (`.`) string of segments. Each segment is either a simple field name (defined below) or a quoted field name. |

> [accordion] fields full type
>
> ```ts theme={null}
> Record<string, {
>   fieldReferenceValue?: string,
>   pipelineValue?: {
>   },
>   functionValue?: {
>   },
>   geoPointValue?: {
>     latitude?: number,
>     longitude?: number
>   },
>   booleanValue?: boolean,
>   mapValue?: {
>   },
>   nullValue?: NULL_VALUE,
>   doubleValue?: number | NaN | Infinity | -Infinity,
>   bytesValue?: string,
>   arrayValue?: {
>   },
>   referenceValue?: string,
>   timestampValue?: string,
>   integerValue?: string | number,
>   stringValue?: string,
>   variableReferenceValue?: string
> }>
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. |
| `updateTime` | `string \| null` | No | Output only. The time at which the document was last changed. This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query. |
| `createTime` | `string \| null` | No | Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query. |
| `fields` | `object \| null` | No | The document's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The field names, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by a dot-delimited (`.`) string of segments. Each segment is either a simple field name (defined below) or a quoted field name. |

> [accordion] fields full type
>
> ```ts theme={null}
> Record<string, {
>   fieldReferenceValue?: string | null,
>   pipelineValue?: {
>   } | null,
>   functionValue?: {
>   } | null,
>   geoPointValue?: {
>     latitude?: number | null,
>     longitude?: number | null
>   } | null,
>   booleanValue?: boolean | null,
>   mapValue?: {
>   } | null,
>   nullValue?: string | null,
>   doubleValue?: number | string | null,
>   bytesValue?: string | null,
>   arrayValue?: {
>   } | null,
>   referenceValue?: string | null,
>   timestampValue?: string | null,
>   integerValue?: string | number | null,
>   stringValue?: string | null,
>   variableReferenceValue?: string | null
> }> | null
> ```

***

### databases.documents.rollback

`firestore.databases.documents.rollback`

Rolls back a transaction

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.firestore.databases.documents.rollback({ database: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `database` | `string` | Yes | Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`. Format: `projects/<id>/databases/<id>`. |
| `transaction` | `string` | No | Required. The transaction to roll back. (base64) |
| `requestOptions` | `object` | No | Options for a request. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### databases.documents.runAggregationQuery

`firestore.databases.documents.runAggregationQuery`

Runs an aggregation query. Rather than producing Document results like Firestore.RunQuery, this API allows running an aggregation to produce a series of AggregationResult server-side

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.documents.runAggregationQuery({ parent: 'projects/demo-project/databases/(default)/documents/users/ada' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` Format: `projects/<id>/databases/<id>/documents/<id>/<path>`. |
| `transaction` | `string` | No | Run the aggregation within an already active transaction. The value here is the opaque transaction ID to execute the query in. (base64) |
| `explainOptions` | `object` | No | Explain options for the query. |
| `requestOptions` | `object` | No | Options for a request. |
| `readTime` | `string` | No | Executes the query at the given timestamp. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days. |
| `newTransaction` | `object` | No | Options for creating a new transaction. |
| `structuredAggregationQuery` | `object` | No | Firestore query for running an aggregation over a StructuredQuery. |

> [accordion] explainOptions full type
>
> ```ts theme={null}
> {
>   analyze?: boolean
> }
> ```

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

> [accordion] newTransaction full type
>
> ```ts theme={null}
> {
>   readOnly?: {
>     readTime?: string
>   },
>   readWrite?: {
>     retryTransaction?: string,
>     concurrencyMode?: CONCURRENCY_MODE_UNSPECIFIED | OPTIMISTIC | PESSIMISTIC
>   }
> }
> ```

> [accordion] structuredAggregationQuery full type
>
> ```ts theme={null}
> {
>   aggregations?: {
>     sum?: {
>       field?: {
>         fieldPath?: string
>       }
>     },
>     avg?: {
>       field?: {
>         fieldPath?: string
>       }
>     },
>     count?: {
>       upTo?: string | number
>     },
>     alias?: string
>   }[],
>   structuredQuery?: {
>     endAt?: {
>       values?: {
>         fieldReferenceValue?: string,
>         pipelineValue?: {
>         },
>         functionValue?: {
>         },
>         geoPointValue?: {
>           latitude?: number,
>           longitude?: number
>         },
>         booleanValue?: boolean,
>         mapValue?: {
>         },
>         nullValue?: NULL_VALUE,
>         doubleValue?: number | NaN | Infinity | -Infinity,
>         bytesValue?: string,
>         arrayValue?: {
>         },
>         referenceValue?: string,
>         timestampValue?: string,
>         integerValue?: string | number,
>         stringValue?: string,
>         variableReferenceValue?: string
>       }[],
>       before?: boolean
>     },
>     startAt?: {
>       values?: {
>         fieldReferenceValue?: string,
>         pipelineValue?: {
>         },
>         functionValue?: {
>         },
>         geoPointValue?: {
>           latitude?: number,
>           longitude?: number
>         },
>         booleanValue?: boolean,
>         mapValue?: {
>         },
>         nullValue?: NULL_VALUE,
>         doubleValue?: number | NaN | Infinity | -Infinity,
>         bytesValue?: string,
>         arrayValue?: {
>         },
>         referenceValue?: string,
>         timestampValue?: string,
>         integerValue?: string | number,
>         stringValue?: string,
>         variableReferenceValue?: string
>       }[],
>       before?: boolean
>     },
>     from?: {
>       allDescendants?: boolean,
>       collectionId?: string
>     }[],
>     offset?: number,
>     where?: {
>       unaryFilter?: {
>         field?: {
>           fieldPath?: string
>         },
>         op?: OPERATOR_UNSPECIFIED | IS_NAN | IS_NULL | IS_NOT_NAN | IS_NOT_NULL
>       },
>       compositeFilter?: {
>         op?: OPERATOR_UNSPECIFIED | AND | OR,
>         filters?: {
>           unaryFilter?: {
>             field?: {
>               fieldPath?: string
>             },
>             op?: OPERATOR_UNSPECIFIED | IS_NAN | IS_NULL | IS_NOT_NAN | IS_NOT_NULL
>           },
>           compositeFilter?: {
>             op?: OPERATOR_UNSPECIFIED | AND | OR,
>             filters?: (recursive)[]
>           },
>           fieldFilter?: {
>             field?: {
>               fieldPath?: string
>             },
>             value?: {
>               fieldReferenceValue?: string,
>               pipelineValue?: {
>               },
>               functionValue?: {
>               },
>               geoPointValue?: {
>                 latitude?: number,
>                 longitude?: number
>               },
>               booleanValue?: boolean,
>               mapValue?: {
>               },
>               nullValue?: NULL_VALUE,
>               doubleValue?: number | NaN | Infinity | -Infinity,
>               bytesValue?: string,
>               arrayValue?: {
>               },
>               referenceValue?: string,
>               timestampValue?: string,
>               integerValue?: string | number,
>               stringValue?: string,
>               variableReferenceValue?: string
>             },
>             op?: OPERATOR_UNSPECIFIED | LESS_THAN | LESS_THAN_OR_EQUAL | GREATER_THAN | GREATER_THAN_OR_EQUAL | EQUAL | NOT_EQUAL | ARRAY_CONTAINS | IN | ARRAY_CONTAINS_ANY | NOT_IN
>           }
>         }[]
>       },
>       fieldFilter?: {
>         field?: {
>           fieldPath?: string
>         },
>         value?: {
>           fieldReferenceValue?: string,
>           pipelineValue?: {
>           },
>           functionValue?: {
>           },
>           geoPointValue?: {
>             latitude?: number,
>             longitude?: number
>           },
>           booleanValue?: boolean,
>           mapValue?: {
>           },
>           nullValue?: NULL_VALUE,
>           doubleValue?: number | NaN | Infinity | -Infinity,
>           bytesValue?: string,
>           arrayValue?: {
>           },
>           referenceValue?: string,
>           timestampValue?: string,
>           integerValue?: string | number,
>           stringValue?: string,
>           variableReferenceValue?: string
>         },
>         op?: OPERATOR_UNSPECIFIED | LESS_THAN | LESS_THAN_OR_EQUAL | GREATER_THAN | GREATER_THAN_OR_EQUAL | EQUAL | NOT_EQUAL | ARRAY_CONTAINS | IN | ARRAY_CONTAINS_ANY | NOT_IN
>       }
>     },
>     select?: {
>       fields?: {
>         fieldPath?: string
>       }[]
>     },
>     orderBy?: {
>       field?: {
>         fieldPath?: string
>       },
>       direction?: DIRECTION_UNSPECIFIED | ASCENDING | DESCENDING
>     }[],
>     limit?: number,
>     findNearest?: {
>       limit?: number,
>       distanceResultField?: string,
>       vectorField?: {
>         fieldPath?: string
>       },
>       queryVector?: {
>         fieldReferenceValue?: string,
>         pipelineValue?: {
>         },
>         functionValue?: {
>         },
>         geoPointValue?: {
>           latitude?: number,
>           longitude?: number
>         },
>         booleanValue?: boolean,
>         mapValue?: {
>         },
>         nullValue?: NULL_VALUE,
>         doubleValue?: number | NaN | Infinity | -Infinity,
>         bytesValue?: string,
>         arrayValue?: {
>         },
>         referenceValue?: string,
>         timestampValue?: string,
>         integerValue?: string | number,
>         stringValue?: string,
>         variableReferenceValue?: string
>       },
>       distanceThreshold?: number,
>       distanceMeasure?: DISTANCE_MEASURE_UNSPECIFIED | EUCLIDEAN | COSINE | DOT_PRODUCT
>     }
>   }
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   explainMetrics?: {
>     planSummary?: {
>       indexesUsed?: Record<string, any>[] | null
>     } | null,
>     executionStats?: {
>       debugStats?: Record<string, any> | null,
>       readOperations?: string | number | null,
>       resultsReturned?: string | number | null,
>       executionDuration?: string | null
>     } | null
>   } | null,
>   transaction?: string | null,
>   readTime?: string | null,
>   result?: {
>     aggregateFields?: Record<string, {
>       fieldReferenceValue?: string | null,
>       pipelineValue?: {
>       } | null,
>       functionValue?: {
>       } | null,
>       geoPointValue?: {
>         latitude?: number | null,
>         longitude?: number | null
>       } | null,
>       booleanValue?: boolean | null,
>       mapValue?: {
>       } | null,
>       nullValue?: string | null,
>       doubleValue?: number | string | null,
>       bytesValue?: string | null,
>       arrayValue?: {
>       } | null,
>       referenceValue?: string | null,
>       timestampValue?: string | null,
>       integerValue?: string | number | null,
>       stringValue?: string | null,
>       variableReferenceValue?: string | null
>     }> | null
>   } | null
> }[]
> ```

***

### databases.documents.runQuery

`firestore.databases.documents.runQuery`

Run a structured query and return the matching documents (one entry per result, as Firestore streams them)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.documents.runQuery({
	parent: 'projects/demo-project/databases/(default)/documents',
	structuredQuery: {
		from: [{ collectionId: 'users' }],
		where: {
			fieldFilter: {
				field: { fieldPath: 'born' },
				op: 'LESS_THAN',
				value: { integerValue: '1900' },
			},
		},
		limit: 10,
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` Format: `projects/<id>/databases/<id>/documents/<id>/<path>`. |
| `structuredQuery` | `object` | No | A Firestore query. The query stages are executed in the following order: 1. from 2. where 3. select 4. order\_by + start\_at + end\_at 5. offset 6. limit 7. find\_nearest |
| `explainOptions` | `object` | No | Explain options for the query. |
| `requestOptions` | `object` | No | Options for a request. |
| `readTime` | `string` | No | Reads documents as they were at the given time. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days. |
| `transaction` | `string` | No | Run the query within an already active transaction. The value here is the opaque transaction ID to execute the query in. (base64) |
| `newTransaction` | `object` | No | Options for creating a new transaction. |

> [accordion] structuredQuery full type
>
> ```ts theme={null}
> {
>   endAt?: {
>     values?: {
>       fieldReferenceValue?: string,
>       pipelineValue?: {
>       },
>       functionValue?: {
>       },
>       geoPointValue?: {
>         latitude?: number,
>         longitude?: number
>       },
>       booleanValue?: boolean,
>       mapValue?: {
>       },
>       nullValue?: NULL_VALUE,
>       doubleValue?: number | NaN | Infinity | -Infinity,
>       bytesValue?: string,
>       arrayValue?: {
>       },
>       referenceValue?: string,
>       timestampValue?: string,
>       integerValue?: string | number,
>       stringValue?: string,
>       variableReferenceValue?: string
>     }[],
>     before?: boolean
>   },
>   startAt?: {
>     values?: {
>       fieldReferenceValue?: string,
>       pipelineValue?: {
>       },
>       functionValue?: {
>       },
>       geoPointValue?: {
>         latitude?: number,
>         longitude?: number
>       },
>       booleanValue?: boolean,
>       mapValue?: {
>       },
>       nullValue?: NULL_VALUE,
>       doubleValue?: number | NaN | Infinity | -Infinity,
>       bytesValue?: string,
>       arrayValue?: {
>       },
>       referenceValue?: string,
>       timestampValue?: string,
>       integerValue?: string | number,
>       stringValue?: string,
>       variableReferenceValue?: string
>     }[],
>     before?: boolean
>   },
>   from?: {
>     allDescendants?: boolean,
>     collectionId?: string
>   }[],
>   offset?: number,
>   where?: {
>     unaryFilter?: {
>       field?: {
>         fieldPath?: string
>       },
>       op?: OPERATOR_UNSPECIFIED | IS_NAN | IS_NULL | IS_NOT_NAN | IS_NOT_NULL
>     },
>     compositeFilter?: {
>       op?: OPERATOR_UNSPECIFIED | AND | OR,
>       filters?: {
>         unaryFilter?: {
>           field?: {
>             fieldPath?: string
>           },
>           op?: OPERATOR_UNSPECIFIED | IS_NAN | IS_NULL | IS_NOT_NAN | IS_NOT_NULL
>         },
>         compositeFilter?: {
>           op?: OPERATOR_UNSPECIFIED | AND | OR,
>           filters?: (recursive)[]
>         },
>         fieldFilter?: {
>           field?: {
>             fieldPath?: string
>           },
>           value?: {
>             fieldReferenceValue?: string,
>             pipelineValue?: {
>             },
>             functionValue?: {
>             },
>             geoPointValue?: {
>               latitude?: number,
>               longitude?: number
>             },
>             booleanValue?: boolean,
>             mapValue?: {
>             },
>             nullValue?: NULL_VALUE,
>             doubleValue?: number | NaN | Infinity | -Infinity,
>             bytesValue?: string,
>             arrayValue?: {
>             },
>             referenceValue?: string,
>             timestampValue?: string,
>             integerValue?: string | number,
>             stringValue?: string,
>             variableReferenceValue?: string
>           },
>           op?: OPERATOR_UNSPECIFIED | LESS_THAN | LESS_THAN_OR_EQUAL | GREATER_THAN | GREATER_THAN_OR_EQUAL | EQUAL | NOT_EQUAL | ARRAY_CONTAINS | IN | ARRAY_CONTAINS_ANY | NOT_IN
>         }
>       }[]
>     },
>     fieldFilter?: {
>       field?: {
>         fieldPath?: string
>       },
>       value?: {
>         fieldReferenceValue?: string,
>         pipelineValue?: {
>         },
>         functionValue?: {
>         },
>         geoPointValue?: {
>           latitude?: number,
>           longitude?: number
>         },
>         booleanValue?: boolean,
>         mapValue?: {
>         },
>         nullValue?: NULL_VALUE,
>         doubleValue?: number | NaN | Infinity | -Infinity,
>         bytesValue?: string,
>         arrayValue?: {
>         },
>         referenceValue?: string,
>         timestampValue?: string,
>         integerValue?: string | number,
>         stringValue?: string,
>         variableReferenceValue?: string
>       },
>       op?: OPERATOR_UNSPECIFIED | LESS_THAN | LESS_THAN_OR_EQUAL | GREATER_THAN | GREATER_THAN_OR_EQUAL | EQUAL | NOT_EQUAL | ARRAY_CONTAINS | IN | ARRAY_CONTAINS_ANY | NOT_IN
>     }
>   },
>   select?: {
>     fields?: {
>       fieldPath?: string
>     }[]
>   },
>   orderBy?: {
>     field?: {
>       fieldPath?: string
>     },
>     direction?: DIRECTION_UNSPECIFIED | ASCENDING | DESCENDING
>   }[],
>   limit?: number,
>   findNearest?: {
>     limit?: number,
>     distanceResultField?: string,
>     vectorField?: {
>       fieldPath?: string
>     },
>     queryVector?: {
>       fieldReferenceValue?: string,
>       pipelineValue?: {
>       },
>       functionValue?: {
>       },
>       geoPointValue?: {
>         latitude?: number,
>         longitude?: number
>       },
>       booleanValue?: boolean,
>       mapValue?: {
>       },
>       nullValue?: NULL_VALUE,
>       doubleValue?: number | NaN | Infinity | -Infinity,
>       bytesValue?: string,
>       arrayValue?: {
>       },
>       referenceValue?: string,
>       timestampValue?: string,
>       integerValue?: string | number,
>       stringValue?: string,
>       variableReferenceValue?: string
>     },
>     distanceThreshold?: number,
>     distanceMeasure?: DISTANCE_MEASURE_UNSPECIFIED | EUCLIDEAN | COSINE | DOT_PRODUCT
>   }
> }
> ```

> [accordion] explainOptions full type
>
> ```ts theme={null}
> {
>   analyze?: boolean
> }
> ```

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

> [accordion] newTransaction full type
>
> ```ts theme={null}
> {
>   readOnly?: {
>     readTime?: string
>   },
>   readWrite?: {
>     retryTransaction?: string,
>     concurrencyMode?: CONCURRENCY_MODE_UNSPECIFIED | OPTIMISTIC | PESSIMISTIC
>   }
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   transaction?: string | null,
>   explainMetrics?: {
>     planSummary?: {
>       indexesUsed?: Record<string, any>[] | null
>     } | null,
>     executionStats?: {
>       debugStats?: Record<string, any> | null,
>       readOperations?: string | number | null,
>       resultsReturned?: string | number | null,
>       executionDuration?: string | null
>     } | null
>   } | null,
>   skippedResults?: number | null,
>   document?: {
>     name?: string | null,
>     updateTime?: string | null,
>     createTime?: string | null,
>     fields?: Record<string, {
>       fieldReferenceValue?: string | null,
>       pipelineValue?: {
>       } | null,
>       functionValue?: {
>       } | null,
>       geoPointValue?: {
>         latitude?: number | null,
>         longitude?: number | null
>       } | null,
>       booleanValue?: boolean | null,
>       mapValue?: {
>       } | null,
>       nullValue?: string | null,
>       doubleValue?: number | string | null,
>       bytesValue?: string | null,
>       arrayValue?: {
>       } | null,
>       referenceValue?: string | null,
>       timestampValue?: string | null,
>       integerValue?: string | number | null,
>       stringValue?: string | null,
>       variableReferenceValue?: string | null
>     }> | null
>   } | null,
>   readTime?: string | null,
>   done?: boolean | null
> }[]
> ```

***

### databases.exportDocuments

`firestore.databases.exportDocuments`

Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the export

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.exportDocuments({ name: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Database to export. Should be of the form: `projects/{project_id}/databases/{database_id}`. Format: `projects/<id>/databases/<id>`. |
| `collectionIds` | `string[]` | No | IDs of the collection groups to export. Unspecified means all collection groups. Each collection group in this list must be unique. |
| `snapshotTime` | `string` | No | The timestamp that corresponds to the version of the database to be exported. The timestamp must be in the past, rounded to the minute and not older than earliestVersionTime. If specified, then the exported documents will represent a consistent view of the database at the provided time. Otherwise, there are no guarantees about the consistency of the exported documents. |
| `outputUriPrefix` | `string` | No | The output URI. Currently only supports Google Cloud Storage URIs of the form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional Google Cloud Storage namespace path. When choosing a name, be sure to consider Google Cloud Storage naming guidelines: [https://cloud.google.com/storage/docs/naming](https://cloud.google.com/storage/docs/naming). If the URI is a bucket (without a namespace path), a prefix will be generated based on the start time. |
| `namespaceIds` | `string[]` | No | An empty list represents all namespaces. This is the preferred usage for databases that don't use namespaces. An empty string element represents the default namespace. This should be used if the database has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### databases.get

`firestore.databases.get`

Gets information about a database

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.get({ name: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. A name of the form `projects/{project_id}/databases/{database_id}` Format: `projects/<id>/databases/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `uid` | `string \| null` | No | Output only. The system-generated UUID4 for this Database. |
| `firestoreDataAccessMode` | `string \| null` | No | Optional. The Firestore API data access mode to use for this database. If not set on write: - the default value is DATA\_ACCESS\_MODE\_DISABLED for Enterprise edition. - the default value is DATA\_ACCESS\_MODE\_ENABLED for Standard edition. |
| `earliestVersionTime` | `string \| null` | No | Output only. The earliest timestamp at which older versions of the data can be read from the database. See \[version\_retention\_period] above; this field is populated with `now - version_retention_period`. This value is continuously updated, and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery. |
| `createTime` | `string \| null` | No | Output only. The timestamp at which this database was created. Databases created before 2016 do not populate create\_time. |
| `concurrencyMode` | `string \| null` | No | The default concurrency control mode to use for this database. If unspecified in a CreateDatabase request, this will default based on the database edition: Optimistic for Enterprise and Pessimistic for all other databases. While transactions can explicitly specify their own concurrency mode, this setting defines the default behavior when left unspecified. Important: This database-level setting is not respected for Firestore with MongoDB compatibility. All transactions through the MongoDB compatibility layer will use optimistic concurrency control, regardless of this setting. |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
| `sourceInfo` | `object \| null` | No | Information about the provenance of this database. |
| `previousId` | `string \| null` | No | Output only. The database resource's prior database ID. This field is only populated for deleted databases. |
| `databaseEdition` | `string \| null` | No | Immutable. The edition of the database. |
| `locationId` | `string \| null` | No | Required. The location of the database. Available locations are listed at [https://cloud.google.com/firestore/docs/locations](https://cloud.google.com/firestore/docs/locations). |
| `freeTier` | `boolean \| null` | No | Output only. Background: Free tier is the ability of a Firestore database to use a small amount of resources every day without being charged. Once usage exceeds the free tier limit further usage is charged. Whether this database can make use of the free tier. Only one database per project can be eligible for the free tier. The first (or next) database that is created in a project without a free tier database will be marked as eligible for the free tier. Databases that are created while there is a free tier database will not be eligible for the free tier. |
| `realtimeUpdatesMode` | `string \| null` | No | Immutable. The default Realtime Updates mode to use for this database. |
| `keyPrefix` | `string \| null` | No | Output only. The key\_prefix for this database. This key\_prefix is used, in combination with the project ID ("~~") to construct the application ID that is returned from the Cloud Datastore APIs in Google App Engine first generation runtimes. This value may be empty in which case the appid to use for URL-encoded keys is the project\_id (eg: foo instead of v~~foo). |
| `deleteTime` | `string \| null` | No | Output only. The timestamp at which this database was deleted. Only set if the database has been deleted. |
| `tags` | `Record<string, string> \| null` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" |
| `cmekConfig` | `object \| null` | No | The CMEK (Customer Managed Encryption Key) configuration for a Firestore database. If not present, the database is secured by the default Google encryption key. |
| `versionRetentionPeriod` | `string \| null` | No | Output only. The period during which past versions of data are retained in the database. Any read or query can specify a `read_time` within this window, and will read the state of the database at that time. If the PITR feature is enabled, the retention period is 7 days. Otherwise, the retention period is 1 hour. |
| `type` | `string \| null` | No | Required. The type of the database. See [https://cloud.google.com/datastore/docs/firestore-or-datastore](https://cloud.google.com/datastore/docs/firestore-or-datastore) for information about how to choose. |
| `appEngineIntegrationMode` | `string \| null` | No | The App Engine integration mode to use for this database. |
| `pointInTimeRecoveryEnablement` | `string \| null` | No | Whether to enable the PITR feature on this database. |
| `updateTime` | `string \| null` | No | Output only. The timestamp at which this database was most recently updated. Note this only includes updates to the database resource and not data contained by the database. |
| `deleteProtectionState` | `string \| null` | No | State of delete protection for the database. |
| `mongodbCompatibleDataAccessMode` | `string \| null` | No | Optional. The MongoDB compatible API data access mode to use for this database. If not set on write, the default value is DATA\_ACCESS\_MODE\_ENABLED for Enterprise edition. The value is always DATA\_ACCESS\_MODE\_DISABLED for Standard edition. |
| `name` | `string \| null` | No | The resource name of the Database. Format: `projects/{project}/databases/{database}` |

> [accordion] sourceInfo full type
>
> ```ts theme={null}
> {
>   operation?: string | null,
>   backup?: {
>     backup?: string | null
>   } | null
> } | null
> ```

> [accordion] cmekConfig full type
>
> ```ts theme={null}
> {
>   activeKeyVersion?: string[] | null,
>   kmsKeyName?: string | null
> } | null
> ```

***

### databases.importDocuments

`firestore.databases.importDocuments`

Imports documents into Google Cloud Firestore. Existing documents with the same name are overwritten

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.firestore.databases.importDocuments({ name: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Database to import into. Should be of the form: `projects/{project_id}/databases/{database_id}`. Format: `projects/<id>/databases/<id>`. |
| `collectionIds` | `string[]` | No | IDs of the collection groups to import. Unspecified means all collection groups that were included in the export. Each collection group in this list must be unique. |
| `inputUriPrefix` | `string` | No | Location of the exported files. This must match the output\_uri\_prefix of an ExportDocumentsResponse from an export that has completed successfully. See: google.firestore.admin.v1.ExportDocumentsResponse.output\_uri\_prefix. |
| `namespaceIds` | `string[]` | No | An empty list represents all namespaces. This is the preferred usage for databases that don't use namespaces. An empty string element represents the default namespace. This should be used if the database has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### databases.list

`firestore.databases.list`

List all the databases in the project

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `showDeleted` | `boolean` | No | If true, also returns deleted resources. |
| `parent` | `string` | Yes | Required. A parent name of the form `projects/{project_id}` Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `unreachable` | `string[] \| null` | No | In the event that data about individual databases cannot be listed they will be recorded here. An example entry might be: projects/some\_project/locations/some\_location This can happen if the Cloud Region that the Database resides in is currently unavailable. In this case we can't fetch all the details about the database. You may be able to get a more detailed error message (or possibly fetch the resource) by sending a 'Get' request for the resource or a 'List' request for the specific location. |
| `databases` | `object[] \| null` | No | The databases in the project. |

> [accordion] databases full type
>
> ```ts theme={null}
> {
>   uid?: string | null,
>   firestoreDataAccessMode?: string | null,
>   earliestVersionTime?: string | null,
>   createTime?: string | null,
>   concurrencyMode?: string | null,
>   etag?: string | null,
>   sourceInfo?: {
>     operation?: string | null,
>     backup?: {
>       backup?: string | null
>     } | null
>   } | null,
>   previousId?: string | null,
>   databaseEdition?: string | null,
>   locationId?: string | null,
>   freeTier?: boolean | null,
>   realtimeUpdatesMode?: string | null,
>   keyPrefix?: string | null,
>   deleteTime?: string | null,
>   tags?: Record<string, string> | null,
>   cmekConfig?: {
>     activeKeyVersion?: string[] | null,
>     kmsKeyName?: string | null
>   } | null,
>   versionRetentionPeriod?: string | null,
>   type?: string | null,
>   appEngineIntegrationMode?: string | null,
>   pointInTimeRecoveryEnablement?: string | null,
>   updateTime?: string | null,
>   deleteProtectionState?: string | null,
>   mongodbCompatibleDataAccessMode?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### databases.operations.cancel

`firestore.databases.operations.cancel`

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.operations.cancel({ name: 'projects/demo-project/databases/(default)/operations/op-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource to be cancelled. Format: `projects/<id>/databases/<id>/operations/<id>`. |
| `body` | `object` | No | The request message for Operations.CancelOperation. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### databases.operations.delete

`firestore.databases.operations.delete`

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.firestore.databases.operations.delete({ name: 'projects/demo-project/databases/(default)/operations/op-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource to be deleted. Format: `projects/<id>/databases/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### databases.operations.get

`firestore.databases.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.operations.get({ name: 'projects/demo-project/databases/(default)/operations/op-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `projects/<id>/databases/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### databases.operations.list

`firestore.databases.operations.list`

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED` (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.operations.list({ name: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The standard list page size. |
| `filter` | `string` | No | The standard list filter. |
| `name` | `string` | Yes | The name of the operation's parent resource. Format: `projects/<id>/databases/<id>`. |
| `pageToken` | `string` | No | The standard list page token. |
| `returnPartialSuccess` | `boolean` | No | When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `"projects/example/locations/-"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `unreachable` | `string[] \| null` | No | Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations. |
| `nextPageToken` | `string \| null` | No | The standard List next-page token. |
| `operations` | `object[] \| null` | No | A list of operations that matches the specified filter in the request. |

> [accordion] operations full type
>
> ```ts theme={null}
> {
>   response?: Record<string, any> | null,
>   name?: string | null,
>   metadata?: Record<string, any> | null,
>   done?: boolean | null,
>   error?: {
>     message?: string | null,
>     details?: Record<string, any>[] | null,
>     code?: number | null
>   } | null
> }[] | null
> ```

***

### databases.patch

`firestore.databases.patch`

Updates a database

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.patch({ name: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the Database. Format: `projects/{project}/databases/{database}` Format: `projects/<id>/databases/<id>`. |
| `updateMask` | `string` | No | The list of fields to be updated. |
| `firestoreDataAccessMode` | `DATA_ACCESS_MODE_UNSPECIFIED \| DATA_ACCESS_MODE_ENABLED \| DATA_ACCESS_MODE_DISABLED` | No | Optional. The Firestore API data access mode to use for this database. If not set on write: - the default value is DATA\_ACCESS\_MODE\_DISABLED for Enterprise edition. - the default value is DATA\_ACCESS\_MODE\_ENABLED for Standard edition. |
| `concurrencyMode` | `CONCURRENCY_MODE_UNSPECIFIED \| OPTIMISTIC \| PESSIMISTIC \| OPTIMISTIC_WITH_ENTITY_GROUPS` | No | The default concurrency control mode to use for this database. If unspecified in a CreateDatabase request, this will default based on the database edition: Optimistic for Enterprise and Pessimistic for all other databases. While transactions can explicitly specify their own concurrency mode, this setting defines the default behavior when left unspecified. Important: This database-level setting is not respected for Firestore with MongoDB compatibility. All transactions through the MongoDB compatibility layer will use optimistic concurrency control, regardless of this setting. |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
| `databaseEdition` | `DATABASE_EDITION_UNSPECIFIED \| STANDARD \| ENTERPRISE` | No | Immutable. The edition of the database. |
| `locationId` | `string` | No | Required. The location of the database. Available locations are listed at [https://cloud.google.com/firestore/docs/locations](https://cloud.google.com/firestore/docs/locations). |
| `realtimeUpdatesMode` | `REALTIME_UPDATES_MODE_UNSPECIFIED \| REALTIME_UPDATES_MODE_ENABLED \| REALTIME_UPDATES_MODE_DISABLED` | No | Immutable. The default Realtime Updates mode to use for this database. |
| `tags` | `Record<string, string>` | No | Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" |
| `cmekConfig` | `object` | No | The CMEK (Customer Managed Encryption Key) configuration for a Firestore database. If not present, the database is secured by the default Google encryption key. |
| `type` | `DATABASE_TYPE_UNSPECIFIED \| FIRESTORE_NATIVE \| DATASTORE_MODE` | No | Required. The type of the database. See [https://cloud.google.com/datastore/docs/firestore-or-datastore](https://cloud.google.com/datastore/docs/firestore-or-datastore) for information about how to choose. |
| `appEngineIntegrationMode` | `APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED \| ENABLED \| DISABLED` | No | The App Engine integration mode to use for this database. |
| `pointInTimeRecoveryEnablement` | `POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED \| POINT_IN_TIME_RECOVERY_ENABLED \| POINT_IN_TIME_RECOVERY_DISABLED` | No | Whether to enable the PITR feature on this database. |
| `deleteProtectionState` | `DELETE_PROTECTION_STATE_UNSPECIFIED \| DELETE_PROTECTION_DISABLED \| DELETE_PROTECTION_ENABLED` | No | State of delete protection for the database. |
| `mongodbCompatibleDataAccessMode` | `DATA_ACCESS_MODE_UNSPECIFIED \| DATA_ACCESS_MODE_ENABLED \| DATA_ACCESS_MODE_DISABLED` | No | Optional. The MongoDB compatible API data access mode to use for this database. If not set on write, the default value is DATA\_ACCESS\_MODE\_ENABLED for Enterprise edition. The value is always DATA\_ACCESS\_MODE\_DISABLED for Standard edition. |
| `body_name` | `string` | No | The resource name of the Database. Format: `projects/{project}/databases/{database}` |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### databases.restore

`firestore.databases.restore`

Creates a new database by restoring from an existing backup. The new database must be in the same cloud region or multi-region location as the existing backup

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.firestore.databases.restore({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The project to restore the database in. Format is `projects/{project_id}`. Format: `projects/<id>`. |
| `backup` | `string` | No | Required. Backup to restore from. Must be from the same project as the parent. The restored database will be created in the same location as the source backup. Format is: `projects/{project_id}/locations/{location}/backups/{backup}` |
| `tags` | `Record<string, string>` | No | Optional. Immutable. Tags to be bound to the restored database. The tags should be provided in the format of `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. |
| `databaseId` | `string` | No | Required. The ID to use for the database, which will become the final component of the database's resource name. This database ID must not be associated with an existing database. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /\[0-9a-f]\{8}(-\[0-9a-f]\{4})\{3}-\[0-9a-f]\{12}/. "(default)" database ID is also valid if the database is Standard edition. |
| `encryptionConfig` | `object` | No | Encryption configuration for a new database being created from another source. The source could be a Backup or a PitrSnapshot. |

> [accordion] encryptionConfig full type
>
> ```ts theme={null}
> {
>   useSourceEncryption?: {
>   },
>   customerManagedEncryption?: {
>     kmsKeyName?: string
>   },
>   googleDefaultEncryption?: {
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   message?: string | null,
>   details?: Record<string, any>[] | null,
>   code?: number | null
> } | null
> ```

***

### databases.userCreds.create

`firestore.databases.userCreds.create`

Create a user creds

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.userCreds.create({ parent: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. A parent name of the form `projects/{project_id}/databases/{database_id}` Format: `projects/<id>/databases/<id>`. |
| `userCredsId` | `string` | No | Required. The ID to use for the user creds, which will become the final component of the user creds's resource name. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /\[0-9a-f]\{8}(-\[0-9a-f]\{4})\{3}-\[0-9a-f]\{12}/. |
| `name` | `string` | No | Identifier. The resource name of the UserCreds. Format: `projects/{project}/databases/{database}/userCreds/{user_creds}` |
| `resourceIdentity` | `object` | No | Describes a Resource Identity principal. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Identifier. The resource name of the UserCreds. Format: `projects/{project}/databases/{database}/userCreds/{user_creds}` |
| `securePassword` | `string \| null` | No | Output only. The plaintext server-generated password for the user creds. Only populated in responses for CreateUserCreds and ResetUserPassword. |
| `updateTime` | `string \| null` | No | Output only. The time the user creds were last updated. |
| `state` | `string \| null` | No | Output only. Whether the user creds are enabled or disabled. Defaults to ENABLED on creation. |
| `createTime` | `string \| null` | No | Output only. The time the user creds were created. |
| `resourceIdentity` | `object \| null` | No | Describes a Resource Identity principal. |

> [accordion] resourceIdentity full type
>
> ```ts theme={null}
> {
>   principal?: string | null
> } | null
> ```

***

### databases.userCreds.delete

`firestore.databases.userCreds.delete`

Deletes a user creds

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.firestore.databases.userCreds.delete({ name: 'projects/demo-project/databases/(default)/userCreds/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. A name of the form `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` Format: `projects/<id>/databases/<id>/userCreds/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### databases.userCreds.disable

`firestore.databases.userCreds.disable`

Disables a user creds. No-op if the user creds are already disabled

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.userCreds.disable({ name: 'projects/demo-project/databases/(default)/userCreds/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. A name of the form `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` Format: `projects/<id>/databases/<id>/userCreds/<id>`. |
| `body` | `object` | No | The request for FirestoreAdmin.DisableUserCreds. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Identifier. The resource name of the UserCreds. Format: `projects/{project}/databases/{database}/userCreds/{user_creds}` |
| `securePassword` | `string \| null` | No | Output only. The plaintext server-generated password for the user creds. Only populated in responses for CreateUserCreds and ResetUserPassword. |
| `updateTime` | `string \| null` | No | Output only. The time the user creds were last updated. |
| `state` | `string \| null` | No | Output only. Whether the user creds are enabled or disabled. Defaults to ENABLED on creation. |
| `createTime` | `string \| null` | No | Output only. The time the user creds were created. |
| `resourceIdentity` | `object \| null` | No | Describes a Resource Identity principal. |

> [accordion] resourceIdentity full type
>
> ```ts theme={null}
> {
>   principal?: string | null
> } | null
> ```

***

### databases.userCreds.enable

`firestore.databases.userCreds.enable`

Enables a user creds. No-op if the user creds are already enabled

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.userCreds.enable({ name: 'projects/demo-project/databases/(default)/userCreds/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. A name of the form `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` Format: `projects/<id>/databases/<id>/userCreds/<id>`. |
| `body` | `object` | No | The request for FirestoreAdmin.EnableUserCreds. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Identifier. The resource name of the UserCreds. Format: `projects/{project}/databases/{database}/userCreds/{user_creds}` |
| `securePassword` | `string \| null` | No | Output only. The plaintext server-generated password for the user creds. Only populated in responses for CreateUserCreds and ResetUserPassword. |
| `updateTime` | `string \| null` | No | Output only. The time the user creds were last updated. |
| `state` | `string \| null` | No | Output only. Whether the user creds are enabled or disabled. Defaults to ENABLED on creation. |
| `createTime` | `string \| null` | No | Output only. The time the user creds were created. |
| `resourceIdentity` | `object \| null` | No | Describes a Resource Identity principal. |

> [accordion] resourceIdentity full type
>
> ```ts theme={null}
> {
>   principal?: string | null
> } | null
> ```

***

### databases.userCreds.get

`firestore.databases.userCreds.get`

Gets a user creds resource. Note that the returned resource does not contain the secret value itself

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.userCreds.get({ name: 'projects/demo-project/databases/(default)/userCreds/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. A name of the form `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` Format: `projects/<id>/databases/<id>/userCreds/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Identifier. The resource name of the UserCreds. Format: `projects/{project}/databases/{database}/userCreds/{user_creds}` |
| `securePassword` | `string \| null` | No | Output only. The plaintext server-generated password for the user creds. Only populated in responses for CreateUserCreds and ResetUserPassword. |
| `updateTime` | `string \| null` | No | Output only. The time the user creds were last updated. |
| `state` | `string \| null` | No | Output only. Whether the user creds are enabled or disabled. Defaults to ENABLED on creation. |
| `createTime` | `string \| null` | No | Output only. The time the user creds were created. |
| `resourceIdentity` | `object \| null` | No | Describes a Resource Identity principal. |

> [accordion] resourceIdentity full type
>
> ```ts theme={null}
> {
>   principal?: string | null
> } | null
> ```

***

### databases.userCreds.list

`firestore.databases.userCreds.list`

List all user creds in the database. Note that the returned resource does not contain the secret value itself

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.databases.userCreds.list({ parent: 'projects/demo-project/databases/(default)' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. A parent database name of the form `projects/{project_id}/databases/{database_id}` Format: `projects/<id>/databases/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `userCreds` | `object[] \| null` | No | The user creds for the database. |

> [accordion] userCreds full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   securePassword?: string | null,
>   updateTime?: string | null,
>   state?: string | null,
>   createTime?: string | null,
>   resourceIdentity?: {
>     principal?: string | null
>   } | null
> }[] | null
> ```

***

### databases.userCreds.resetPassword

`firestore.databases.userCreds.resetPassword`

Resets the password of a user creds

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.firestore.databases.userCreds.resetPassword({ name: 'projects/demo-project/databases/(default)/userCreds/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. A name of the form `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` Format: `projects/<id>/databases/<id>/userCreds/<id>`. |
| `body` | `object` | No | The request for FirestoreAdmin.ResetUserPassword. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Identifier. The resource name of the UserCreds. Format: `projects/{project}/databases/{database}/userCreds/{user_creds}` |
| `securePassword` | `string \| null` | No | Output only. The plaintext server-generated password for the user creds. Only populated in responses for CreateUserCreds and ResetUserPassword. |
| `updateTime` | `string \| null` | No | Output only. The time the user creds were last updated. |
| `state` | `string \| null` | No | Output only. Whether the user creds are enabled or disabled. Defaults to ENABLED on creation. |
| `createTime` | `string \| null` | No | Output only. The time the user creds were created. |
| `resourceIdentity` | `object \| null` | No | Describes a Resource Identity principal. |

> [accordion] resourceIdentity full type
>
> ```ts theme={null}
> {
>   principal?: string | null
> } | null
> ```

***

### locations.backups.delete

`firestore.locations.backups.delete`

Deletes a backup

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.firestore.locations.backups.delete({ name: 'projects/demo-project/locations/us-central1/backups/backup-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Name of the backup to delete. format is `projects/{project}/locations/{location}/backups/{backup}`. Format: `projects/<id>/locations/<id>/backups/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### locations.backups.get

`firestore.locations.backups.get`

Gets information about a backup

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.locations.backups.get({ name: 'projects/demo-project/locations/us-central1/backups/backup-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Name of the backup to fetch. Format is `projects/{project}/locations/{location}/backups/{backup}`. Format: `projects/<id>/locations/<id>/backups/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `stats` | `object \| null` | No | Backup specific statistics. |
| `snapshotTime` | `string \| null` | No | Output only. The backup contains an externally consistent copy of the database at this time. |
| `state` | `string \| null` | No | Output only. The current state of the backup. |
| `name` | `string \| null` | No | Output only. The unique resource name of the Backup. Format is `projects/{project}/locations/{location}/backups/{backup}`. The location in the name will be the Standard Managed Multi-Region (SMMR) location (e.g. `us`) if the backup was created with an SMMR location, or the Google Managed Multi-Region (GMMR) location (e.g. `nam5`) if the backup was created with a GMMR location. |
| `expireTime` | `string \| null` | No | Output only. The timestamp at which this backup expires. |
| `database` | `string \| null` | No | Output only. Name of the Firestore database that the backup is from. Format is `projects/{project}/databases/{database}`. |
| `databaseUid` | `string \| null` | No | Output only. The system-generated UUID4 for the Firestore database that the backup is from. |

> [accordion] stats full type
>
> ```ts theme={null}
> {
>   indexCount?: string | number | null,
>   sizeBytes?: string | number | null,
>   documentCount?: string | number | null
> } | null
> ```

***

### locations.backups.list

`firestore.locations.backups.list`

Lists all the backups

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.locations.backups.list({ parent: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The location to list backups from. Format is `projects/{project}/locations/{location}`. Use `{location} = '-'` to list backups from all locations for the given project. This allows listing backups from a single location or from all locations. Format: `projects/<id>/locations/<id>`. |
| `filter` | `string` | No | An expression that filters the list of returned backups. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Backup are eligible for filtering: \* `database_uid` (supports `=` only) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `backups` | `object[] \| null` | No | List of all backups for the project. |
| `unreachable` | `string[] \| null` | No | List of locations that existing backups were not able to be fetched from. Instead of failing the entire requests when a single location is unreachable, this response returns a partial result set and list of locations unable to be reached here. The request can be retried against a single location to get a concrete error. |

> [accordion] backups full type
>
> ```ts theme={null}
> {
>   stats?: {
>     indexCount?: string | number | null,
>     sizeBytes?: string | number | null,
>     documentCount?: string | number | null
>   } | null,
>   snapshotTime?: string | null,
>   state?: string | null,
>   name?: string | null,
>   expireTime?: string | null,
>   database?: string | null,
>   databaseUid?: string | null
> }[] | null
> ```

***

### locations.get

`firestore.locations.get`

Gets information about a location

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.locations.get({ name: 'projects/demo-project/locations/us-central1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Resource name for the location. Format: `projects/<id>/locations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `displayName` | `string \| null` | No | The friendly name for this location, typically a nearby city name. For example, "Tokyo". |
| `locationId` | `string \| null` | No | The canonical id for this location. For example: `"us-east1"`. |
| `labels` | `Record<string, string> \| null` | No | Cross-service attributes for the location. For example \{"cloud.googleapis.com/region": "us-east1"} |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata. For example the available capacity at the given location. |
| `name` | `string \| null` | No | Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` |

***

### locations.list

`firestore.locations.list`

List the Firestore locations available to a project (name = projects/\<project>) (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.firestore.locations.list({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. |
| `filter` | `string` | No | A filter to narrow down results to a preferred subset. The filtering language accepts strings like `"displayName=tokyo"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160). |
| `extraLocationTypes` | `string[]` | No | Optional. Do not use this field unless explicitly documented otherwise. This is primarily for internal usage. |
| `name` | `string` | Yes | The resource that owns the locations collection, if applicable. Format: `projects/<id>`. |
| `pageSize` | `number` | No | The maximum number of results to return. If not set, the service selects a default. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The standard List next-page token. |
| `locations` | `object[] \| null` | No | A list of locations that matches the specified filter in the request. |

> [accordion] locations full type
>
> ```ts theme={null}
> {
>   displayName?: string | null,
>   locationId?: string | null,
>   labels?: Record<string, string> | null,
>   metadata?: Record<string, any> | null,
>   name?: string | null
> }[] | null
> ```

***

## Hosting

### operations.get

`hosting.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.operations.get({ name: 'projects/demo-project/operations/op-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `projects/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   message?: string | null,
>   code?: number | null
> } | null
> ```

***

### sites.channels.create

`hosting.sites.channels.create`

Creates a new channel in the specified site

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.hosting.sites.channels.create({ parent: 'sites/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The site in which to create this channel, in the format: sites/ SITE\_ID Format: `sites/<id>`. |
| `channelId` | `string` | No | Required. Immutable. A unique ID within the site that identifies the channel. |
| `name` | `string` | No | The fully-qualified resource name for the channel, in the format: sites/ SITE\_ID/channels/CHANNEL\_ID |
| `ttl` | `string` | No | Input only. A time-to-live for this channel. Sets `expire_time` to the provided duration past the time of the request. |
| `retainedReleaseCount` | `number` | No | The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels. |
| `expireTime` | `string` | No | The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the `ttl` field. |
| `labels` | `Record<string, string>` | No | Text labels used for extra metadata and/or filtering. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The fully-qualified resource name for the channel, in the format: sites/ SITE\_ID/channels/CHANNEL\_ID |
| `ttl` | `string \| null` | No | Input only. A time-to-live for this channel. Sets `expire_time` to the provided duration past the time of the request. |
| `updateTime` | `string \| null` | No | Output only. The time at which the channel was last updated. |
| `retainedReleaseCount` | `number \| null` | No | The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels. |
| `createTime` | `string \| null` | No | Output only. The time at which the channel was created. |
| `expireTime` | `string \| null` | No | The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the `ttl` field. |
| `labels` | `Record<string, string> \| null` | No | Text labels used for extra metadata and/or filtering. |
| `release` | `object \| null` | No | A `Release` is a particular collection of configurations and files that is set to be public at a particular time. |
| `url` | `string \| null` | No | Output only. The URL at which the content of this channel's current release can be viewed. This URL is a Firebase-provided subdomain of `web.app`. The content of this channel's current release can also be viewed at the Firebase-provided subdomain of `firebaseapp.com`. If this channel is the `live` channel for the Hosting site, then the content of this channel's current release can also be viewed at any connected custom domains. |

> [accordion] release full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   version?: {
>     createUser?: {
>       email?: string | null,
>       imageUrl?: string | null
>     } | null,
>     status?: string | null,
>     labels?: Record<string, string> | null,
>     deleteTime?: string | null,
>     createTime?: string | null,
>     name?: string | null,
>     fileCount?: string | number | null,
>     deleteUser?: {
>       email?: string | null,
>       imageUrl?: string | null
>     } | null,
>     finalizeUser?: {
>       email?: string | null,
>       imageUrl?: string | null
>     } | null,
>     finalizeTime?: string | null,
>     versionBytes?: string | number | null,
>     config?: {
>       trailingSlashBehavior?: string | null,
>       redirects?: {
>         glob?: string | null,
>         statusCode?: number | null,
>         location?: string | null,
>         regex?: string | null
>       }[] | null,
>       cleanUrls?: boolean | null,
>       rewrites?: {
>         functionRegion?: string | null,
>         regex?: string | null,
>         dynamicLinks?: boolean | null,
>         path?: string | null,
>         function?: string | null,
>         run?: {
>           region?: string | null,
>           tag?: string | null,
>           serviceId?: string | null
>         } | null,
>         glob?: string | null
>       }[] | null,
>       headers?: {
>         glob?: string | null,
>         headers?: Record<string, string> | null,
>         regex?: string | null
>       }[] | null,
>       i18n?: {
>         root?: string | null
>       } | null,
>       appAssociation?: string | null
>     } | null
>   } | null,
>   message?: string | null,
>   releaseTime?: string | null,
>   releaseUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   type?: string | null
> } | null
> ```

***

### sites.channels.delete

`hosting.sites.channels.delete`

Deletes the specified channel of the specified site. The `live` channel cannot be deleted

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.hosting.sites.channels.delete({ name: 'sites/demo-project/channels/preview' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The fully-qualified resource name for the channel, in the format: sites/SITE\_ID/channels/CHANNEL\_ID Format: `sites/<id>/channels/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### sites.channels.get

`hosting.sites.channels.get`

Retrieves information for the specified channel of the specified site

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.channels.get({ name: 'sites/demo-project/channels/preview' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The fully-qualified resource name for the channel, in the format: sites/SITE\_ID/channels/CHANNEL\_ID Format: `sites/<id>/channels/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The fully-qualified resource name for the channel, in the format: sites/ SITE\_ID/channels/CHANNEL\_ID |
| `ttl` | `string \| null` | No | Input only. A time-to-live for this channel. Sets `expire_time` to the provided duration past the time of the request. |
| `updateTime` | `string \| null` | No | Output only. The time at which the channel was last updated. |
| `retainedReleaseCount` | `number \| null` | No | The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels. |
| `createTime` | `string \| null` | No | Output only. The time at which the channel was created. |
| `expireTime` | `string \| null` | No | The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the `ttl` field. |
| `labels` | `Record<string, string> \| null` | No | Text labels used for extra metadata and/or filtering. |
| `release` | `object \| null` | No | A `Release` is a particular collection of configurations and files that is set to be public at a particular time. |
| `url` | `string \| null` | No | Output only. The URL at which the content of this channel's current release can be viewed. This URL is a Firebase-provided subdomain of `web.app`. The content of this channel's current release can also be viewed at the Firebase-provided subdomain of `firebaseapp.com`. If this channel is the `live` channel for the Hosting site, then the content of this channel's current release can also be viewed at any connected custom domains. |

> [accordion] release full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   version?: {
>     createUser?: {
>       email?: string | null,
>       imageUrl?: string | null
>     } | null,
>     status?: string | null,
>     labels?: Record<string, string> | null,
>     deleteTime?: string | null,
>     createTime?: string | null,
>     name?: string | null,
>     fileCount?: string | number | null,
>     deleteUser?: {
>       email?: string | null,
>       imageUrl?: string | null
>     } | null,
>     finalizeUser?: {
>       email?: string | null,
>       imageUrl?: string | null
>     } | null,
>     finalizeTime?: string | null,
>     versionBytes?: string | number | null,
>     config?: {
>       trailingSlashBehavior?: string | null,
>       redirects?: {
>         glob?: string | null,
>         statusCode?: number | null,
>         location?: string | null,
>         regex?: string | null
>       }[] | null,
>       cleanUrls?: boolean | null,
>       rewrites?: {
>         functionRegion?: string | null,
>         regex?: string | null,
>         dynamicLinks?: boolean | null,
>         path?: string | null,
>         function?: string | null,
>         run?: {
>           region?: string | null,
>           tag?: string | null,
>           serviceId?: string | null
>         } | null,
>         glob?: string | null
>       }[] | null,
>       headers?: {
>         glob?: string | null,
>         headers?: Record<string, string> | null,
>         regex?: string | null
>       }[] | null,
>       i18n?: {
>         root?: string | null
>       } | null,
>       appAssociation?: string | null
>     } | null
>   } | null,
>   message?: string | null,
>   releaseTime?: string | null,
>   releaseUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   type?: string | null
> } | null
> ```

***

### sites.channels.list

`hosting.sites.channels.list`

Lists the channels for the specified site. All sites have a default `live` channel (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.channels.list({ parent: 'sites/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The site for which to list channels, in the format: sites/SITE\_ID Format: `sites/<id>`. |
| `pageSize` | `number` | No | The maximum number of channels to return. The service may return a lower number if fewer channels exist than this maximum number. If unspecified, defaults to 10. The maximum value is 100; values above 100 will be coerced to 100. |
| `pageToken` | `string` | No | A token from a previous call to `ListChannels` that tells the server where to resume listing. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `channels` | `object[] \| null` | No | The list of channels. |
| `nextPageToken` | `string \| null` | No | The pagination token, if more results exist beyond the ones in this response. Include this token in your next call to `ListChannels`. Page tokens are short-lived and should not be stored. |

> [accordion] channels full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   ttl?: string | null,
>   updateTime?: string | null,
>   retainedReleaseCount?: number | null,
>   createTime?: string | null,
>   expireTime?: string | null,
>   labels?: Record<string, string> | null,
>   release?: {
>     name?: string | null,
>     version?: {
>       createUser?: {
>         email?: string | null,
>         imageUrl?: string | null
>       } | null,
>       status?: string | null,
>       labels?: Record<string, string> | null,
>       deleteTime?: string | null,
>       createTime?: string | null,
>       name?: string | null,
>       fileCount?: string | number | null,
>       deleteUser?: {
>         email?: string | null,
>         imageUrl?: string | null
>       } | null,
>       finalizeUser?: {
>         email?: string | null,
>         imageUrl?: string | null
>       } | null,
>       finalizeTime?: string | null,
>       versionBytes?: string | number | null,
>       config?: {
>         trailingSlashBehavior?: string | null,
>         redirects?: {
>           glob?: string | null,
>           statusCode?: number | null,
>           location?: string | null,
>           regex?: string | null
>         }[] | null,
>         cleanUrls?: boolean | null,
>         rewrites?: {
>           functionRegion?: string | null,
>           regex?: string | null,
>           dynamicLinks?: boolean | null,
>           path?: string | null,
>           function?: string | null,
>           run?: {
>             region?: string | null,
>             tag?: string | null,
>             serviceId?: string | null
>           } | null,
>           glob?: string | null
>         }[] | null,
>         headers?: {
>           glob?: string | null,
>           headers?: Record<string, string> | null,
>           regex?: string | null
>         }[] | null,
>         i18n?: {
>           root?: string | null
>         } | null,
>         appAssociation?: string | null
>       } | null
>     } | null,
>     message?: string | null,
>     releaseTime?: string | null,
>     releaseUser?: {
>       email?: string | null,
>       imageUrl?: string | null
>     } | null,
>     type?: string | null
>   } | null,
>   url?: string | null
> }[] | null
> ```

***

### sites.channels.patch

`hosting.sites.channels.patch`

Updates information for the specified channel of the specified site. Implicitly creates the channel if it doesn't already exist

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.hosting.sites.channels.patch({ name: 'sites/demo-project/channels/preview' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | A comma-separated list of fields to be updated in this request. |
| `name` | `string` | Yes | The fully-qualified resource name for the channel, in the format: sites/ SITE\_ID/channels/CHANNEL\_ID Format: `sites/<id>/channels/<id>`. |
| `body_name` | `string` | No | The fully-qualified resource name for the channel, in the format: sites/ SITE\_ID/channels/CHANNEL\_ID |
| `ttl` | `string` | No | Input only. A time-to-live for this channel. Sets `expire_time` to the provided duration past the time of the request. |
| `retainedReleaseCount` | `number` | No | The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels. |
| `expireTime` | `string` | No | The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the `ttl` field. |
| `labels` | `Record<string, string>` | No | Text labels used for extra metadata and/or filtering. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | The fully-qualified resource name for the channel, in the format: sites/ SITE\_ID/channels/CHANNEL\_ID |
| `ttl` | `string \| null` | No | Input only. A time-to-live for this channel. Sets `expire_time` to the provided duration past the time of the request. |
| `updateTime` | `string \| null` | No | Output only. The time at which the channel was last updated. |
| `retainedReleaseCount` | `number \| null` | No | The number of previous releases to retain on the channel for rollback or other purposes. Must be a number between 1-100. Defaults to 10 for new channels. |
| `createTime` | `string \| null` | No | Output only. The time at which the channel was created. |
| `expireTime` | `string \| null` | No | The time at which the channel will be automatically deleted. If null, the channel will not be automatically deleted. This field is present in the output whether it's set directly or via the `ttl` field. |
| `labels` | `Record<string, string> \| null` | No | Text labels used for extra metadata and/or filtering. |
| `release` | `object \| null` | No | A `Release` is a particular collection of configurations and files that is set to be public at a particular time. |
| `url` | `string \| null` | No | Output only. The URL at which the content of this channel's current release can be viewed. This URL is a Firebase-provided subdomain of `web.app`. The content of this channel's current release can also be viewed at the Firebase-provided subdomain of `firebaseapp.com`. If this channel is the `live` channel for the Hosting site, then the content of this channel's current release can also be viewed at any connected custom domains. |

> [accordion] release full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   version?: {
>     createUser?: {
>       email?: string | null,
>       imageUrl?: string | null
>     } | null,
>     status?: string | null,
>     labels?: Record<string, string> | null,
>     deleteTime?: string | null,
>     createTime?: string | null,
>     name?: string | null,
>     fileCount?: string | number | null,
>     deleteUser?: {
>       email?: string | null,
>       imageUrl?: string | null
>     } | null,
>     finalizeUser?: {
>       email?: string | null,
>       imageUrl?: string | null
>     } | null,
>     finalizeTime?: string | null,
>     versionBytes?: string | number | null,
>     config?: {
>       trailingSlashBehavior?: string | null,
>       redirects?: {
>         glob?: string | null,
>         statusCode?: number | null,
>         location?: string | null,
>         regex?: string | null
>       }[] | null,
>       cleanUrls?: boolean | null,
>       rewrites?: {
>         functionRegion?: string | null,
>         regex?: string | null,
>         dynamicLinks?: boolean | null,
>         path?: string | null,
>         function?: string | null,
>         run?: {
>           region?: string | null,
>           tag?: string | null,
>           serviceId?: string | null
>         } | null,
>         glob?: string | null
>       }[] | null,
>       headers?: {
>         glob?: string | null,
>         headers?: Record<string, string> | null,
>         regex?: string | null
>       }[] | null,
>       i18n?: {
>         root?: string | null
>       } | null,
>       appAssociation?: string | null
>     } | null
>   } | null,
>   message?: string | null,
>   releaseTime?: string | null,
>   releaseUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   type?: string | null
> } | null
> ```

***

### sites.channels.releases.create

`hosting.sites.channels.releases.create`

Creates a new release, which makes the content of the specified version actively display on the appropriate URL(s)

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.hosting.sites.channels.releases.create({ parent: 'sites/demo-project/channels/preview' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE\_ID - sites/SITE\_ID/channels/CHANNEL\_ID Format: `sites/<id>/channels/<id>`. |
| `versionName` | `string` | No | The unique identifier for a version, in the format: sites/SITE\_ID/versions/ VERSION\_ID The SITE\_ID in this version identifier must match the SITE\_ID in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. |
| `name` | `string` | No | Output only. The unique identifier for the release, in either of the following formats: - sites/SITE\_ID/releases/RELEASE\_ID - sites/SITE\_ID/channels/CHANNEL\_ID/releases/RELEASE\_ID This name is provided in the response body when you call `releases.create` or `channels.releases.create`. |
| `version` | `object` | No | A `Version` is a configuration and a collection of static files which determine how a site is displayed. |
| `message` | `string` | No | The deploy description when the release was created. The value can be up to 512 characters. |
| `releaseTime` | `string` | No | Output only. The time at which the version is set to be public. |
| `releaseUser` | `object` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `type` | `TYPE_UNSPECIFIED \| DEPLOY \| ROLLBACK \| SITE_DISABLE` | No | Explains the reason for the release. Specify a value for this field only when creating a `SITE_DISABLE` type release. |

> [accordion] version full type
>
> ```ts theme={null}
> {
>   createUser?: {
>     email?: string,
>     imageUrl?: string
>   },
>   status?: VERSION_STATUS_UNSPECIFIED | CREATED | FINALIZED | DELETED | ABANDONED | EXPIRED | CLONING,
>   labels?: Record<string, string>,
>   deleteTime?: string,
>   createTime?: string,
>   name?: string,
>   fileCount?: string | number,
>   deleteUser?: {
>     email?: string,
>     imageUrl?: string
>   },
>   finalizeUser?: {
>     email?: string,
>     imageUrl?: string
>   },
>   finalizeTime?: string,
>   versionBytes?: string | number,
>   config?: {
>     trailingSlashBehavior?: TRAILING_SLASH_BEHAVIOR_UNSPECIFIED | ADD | REMOVE,
>     redirects?: {
>       glob?: string,
>       statusCode?: number,
>       location?: string,
>       regex?: string
>     }[],
>     cleanUrls?: boolean,
>     rewrites?: {
>       functionRegion?: string,
>       regex?: string,
>       dynamicLinks?: boolean,
>       path?: string,
>       function?: string,
>       run?: {
>         region?: string,
>         tag?: string,
>         serviceId?: string
>       },
>       glob?: string
>     }[],
>     headers?: {
>       glob?: string,
>       headers?: Record<string, string>,
>       regex?: string
>     }[],
>     i18n?: {
>       root?: string
>     },
>     appAssociation?: AUTO | NONE
>   }
> }
> ```

> [accordion] releaseUser full type
>
> ```ts theme={null}
> {
>   email?: string,
>   imageUrl?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Output only. The unique identifier for the release, in either of the following formats: - sites/SITE\_ID/releases/RELEASE\_ID - sites/SITE\_ID/channels/CHANNEL\_ID/releases/RELEASE\_ID This name is provided in the response body when you call `releases.create` or `channels.releases.create`. |
| `version` | `object \| null` | No | A `Version` is a configuration and a collection of static files which determine how a site is displayed. |
| `message` | `string \| null` | No | The deploy description when the release was created. The value can be up to 512 characters. |
| `releaseTime` | `string \| null` | No | Output only. The time at which the version is set to be public. |
| `releaseUser` | `object \| null` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `type` | `string \| null` | No | Explains the reason for the release. Specify a value for this field only when creating a `SITE_DISABLE` type release. |

> [accordion] version full type
>
> ```ts theme={null}
> {
>   createUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   status?: string | null,
>   labels?: Record<string, string> | null,
>   deleteTime?: string | null,
>   createTime?: string | null,
>   name?: string | null,
>   fileCount?: string | number | null,
>   deleteUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   finalizeUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   finalizeTime?: string | null,
>   versionBytes?: string | number | null,
>   config?: {
>     trailingSlashBehavior?: string | null,
>     redirects?: {
>       glob?: string | null,
>       statusCode?: number | null,
>       location?: string | null,
>       regex?: string | null
>     }[] | null,
>     cleanUrls?: boolean | null,
>     rewrites?: {
>       functionRegion?: string | null,
>       regex?: string | null,
>       dynamicLinks?: boolean | null,
>       path?: string | null,
>       function?: string | null,
>       run?: {
>         region?: string | null,
>         tag?: string | null,
>         serviceId?: string | null
>       } | null,
>       glob?: string | null
>     }[] | null,
>     headers?: {
>       glob?: string | null,
>       headers?: Record<string, string> | null,
>       regex?: string | null
>     }[] | null,
>     i18n?: {
>       root?: string | null
>     } | null,
>     appAssociation?: string | null
>   } | null
> } | null
> ```

> [accordion] releaseUser full type
>
> ```ts theme={null}
> {
>   email?: string | null,
>   imageUrl?: string | null
> } | null
> ```

***

### sites.channels.releases.get

`hosting.sites.channels.releases.get`

Gets the specified release for a site or channel. When used to get a release for a site, this can get releases for both the default `live` channel and any active preview channels for the specified site

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.channels.releases.get({ name: 'sites/demo-project/channels/preview/releases/r1a2b3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The fully-qualified resource name for the Hosting release, in either of the following formats: - sites/SITE\_ID/channels/CHANNEL\_ID/releases/RELEASE\_ID - sites/SITE\_ID/releases/RELEASE\_ID Format: `sites/<id>/channels/<id>/releases/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Output only. The unique identifier for the release, in either of the following formats: - sites/SITE\_ID/releases/RELEASE\_ID - sites/SITE\_ID/channels/CHANNEL\_ID/releases/RELEASE\_ID This name is provided in the response body when you call `releases.create` or `channels.releases.create`. |
| `version` | `object \| null` | No | A `Version` is a configuration and a collection of static files which determine how a site is displayed. |
| `message` | `string \| null` | No | The deploy description when the release was created. The value can be up to 512 characters. |
| `releaseTime` | `string \| null` | No | Output only. The time at which the version is set to be public. |
| `releaseUser` | `object \| null` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `type` | `string \| null` | No | Explains the reason for the release. Specify a value for this field only when creating a `SITE_DISABLE` type release. |

> [accordion] version full type
>
> ```ts theme={null}
> {
>   createUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   status?: string | null,
>   labels?: Record<string, string> | null,
>   deleteTime?: string | null,
>   createTime?: string | null,
>   name?: string | null,
>   fileCount?: string | number | null,
>   deleteUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   finalizeUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   finalizeTime?: string | null,
>   versionBytes?: string | number | null,
>   config?: {
>     trailingSlashBehavior?: string | null,
>     redirects?: {
>       glob?: string | null,
>       statusCode?: number | null,
>       location?: string | null,
>       regex?: string | null
>     }[] | null,
>     cleanUrls?: boolean | null,
>     rewrites?: {
>       functionRegion?: string | null,
>       regex?: string | null,
>       dynamicLinks?: boolean | null,
>       path?: string | null,
>       function?: string | null,
>       run?: {
>         region?: string | null,
>         tag?: string | null,
>         serviceId?: string | null
>       } | null,
>       glob?: string | null
>     }[] | null,
>     headers?: {
>       glob?: string | null,
>       headers?: Record<string, string> | null,
>       regex?: string | null
>     }[] | null,
>     i18n?: {
>       root?: string | null
>     } | null,
>     appAssociation?: string | null
>   } | null
> } | null
> ```

> [accordion] releaseUser full type
>
> ```ts theme={null}
> {
>   email?: string | null,
>   imageUrl?: string | null
> } | null
> ```

***

### sites.channels.releases.list

`hosting.sites.channels.releases.list`

Lists the releases that have been created for the specified site or channel. When used to list releases for a site, this list includes releases for both the default `live` channel and any active preview channels for the specified site (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.channels.releases.list({ parent: 'sites/demo-project/channels/preview' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE\_ID - sites/SITE\_ID/channels/CHANNEL\_ID Format: `sites/<id>/channels/<id>`. |
| `pageToken` | `string` | No | A token from a previous call to `releases.list` or `channels.releases.list` that tells the server where to resume listing. |
| `pageSize` | `number` | No | The maximum number of releases to return. The service may return a lower number if fewer releases exist than this maximum number. If unspecified, defaults to 100. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `releases` | `object[] \| null` | No | The list of hashes of files that still need to be uploaded, if any exist. |
| `nextPageToken` | `string \| null` | No | The pagination token, if more results exist beyond the ones in this response. Include this token in your next call to `ListReleases`. Page tokens are short-lived and should not be stored. |

> [accordion] releases full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   version?: {
>     createUser?: {
>       email?: string | null,
>       imageUrl?: string | null
>     } | null,
>     status?: string | null,
>     labels?: Record<string, string> | null,
>     deleteTime?: string | null,
>     createTime?: string | null,
>     name?: string | null,
>     fileCount?: string | number | null,
>     deleteUser?: {
>       email?: string | null,
>       imageUrl?: string | null
>     } | null,
>     finalizeUser?: {
>       email?: string | null,
>       imageUrl?: string | null
>     } | null,
>     finalizeTime?: string | null,
>     versionBytes?: string | number | null,
>     config?: {
>       trailingSlashBehavior?: string | null,
>       redirects?: {
>         glob?: string | null,
>         statusCode?: number | null,
>         location?: string | null,
>         regex?: string | null
>       }[] | null,
>       cleanUrls?: boolean | null,
>       rewrites?: {
>         functionRegion?: string | null,
>         regex?: string | null,
>         dynamicLinks?: boolean | null,
>         path?: string | null,
>         function?: string | null,
>         run?: {
>           region?: string | null,
>           tag?: string | null,
>           serviceId?: string | null
>         } | null,
>         glob?: string | null
>       }[] | null,
>       headers?: {
>         glob?: string | null,
>         headers?: Record<string, string> | null,
>         regex?: string | null
>       }[] | null,
>       i18n?: {
>         root?: string | null
>       } | null,
>       appAssociation?: string | null
>     } | null
>   } | null,
>   message?: string | null,
>   releaseTime?: string | null,
>   releaseUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   type?: string | null
> }[] | null
> ```

***

### sites.create

`hosting.sites.create`

Creates a new Hosting Site in the specified parent Firebase project. Note that Hosting sites can take several minutes to propagate through Firebase systems

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.hosting.sites.create({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `validateOnly` | `boolean` | No | Optional. If set, validates that the site\_id is available and that the request would succeed, returning the expected resulting site or error. |
| `siteId` | `string` | No | Required. Immutable. A globally unique identifier for the Hosting site. This identifier is used to construct the Firebase-provisioned subdomains for the site, so it must also be a valid domain name label. |
| `parent` | `string` | Yes | Required. The Firebase project in which to create a Hosting site, in the format: projects/PROJECT\_IDENTIFIER Refer to the `Site` `name` field for details about PROJECT\_IDENTIFIER values. Format: `projects/<id>`. |
| `labels` | `Record<string, string>` | No | Optional. User-specified labels for the Hosting site. |
| `appId` | `string` | No | Optional. The [ID of a Web App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps#WebApp.FIELDS.app_id) associated with the Hosting site. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `defaultUrl` | `string \| null` | No | Output only. The default URL for the Hosting site. |
| `type` | `string \| null` | No | Output only. The type of Hosting site. Every Firebase project has a `DEFAULT_SITE`, which is created when Hosting is provisioned for the project. All additional sites are `USER_SITE`. |
| `name` | `string \| null` | No | Output only. The fully-qualified resource name of the Hosting site, in the format: projects/PROJECT\_IDENTIFIER/sites/SITE\_ID PROJECT\_IDENTIFIER: the Firebase project's [`ProjectNumber`](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects#FirebaseProject.FIELDS.project_number) ***(recommended)*** or its [`ProjectId`](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects#FirebaseProject.FIELDS.project_id). Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). |
| `labels` | `Record<string, string> \| null` | No | Optional. User-specified labels for the Hosting site. |
| `appId` | `string \| null` | No | Optional. The [ID of a Web App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps#WebApp.FIELDS.app_id) associated with the Hosting site. |

***

### sites.customDomains.create

`hosting.sites.customDomains.create`

Creates a `CustomDomain`

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.hosting.sites.customDomains.create({ parent: 'projects/demo-project/sites/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `customDomainId` | `string` | No | Required. The ID of the `CustomDomain`, which is the domain name you'd like to use with Firebase Hosting. |
| `validateOnly` | `boolean` | No | If true, Hosting validates that it's possible to complete your request but doesn't actually create a new `CustomDomain`. |
| `parent` | `string` | Yes | Required. The custom domain's parent, specifically a Firebase Hosting `Site`. Format: `projects/<id>/sites/<id>`. |
| `name` | `string` | No | Identifier. The fully-qualified name of the `CustomDomain`. |
| `labels` | `Record<string, string>` | No | Labels used for extra metadata and/or filtering. |
| `certPreference` | `TYPE_UNSPECIFIED \| TEMPORARY \| GROUPED \| PROJECT_GROUPED \| DEDICATED` | No | A field that lets you specify which SSL certificate type Hosting creates for your domain name. Spark plan custom domains only have access to the `GROUPED` cert type, while Blaze plan domains can select any option. |
| `redirectTarget` | `string` | No | A domain name that this `CustomDomain` should direct traffic towards. If specified, Hosting will respond to requests against this custom domain with an HTTP 301 code, and route traffic to the specified `redirect_target` instead. |
| `annotations` | `Record<string, string>` | No | Annotations you can add to leave both human- and machine-readable metadata about your `CustomDomain`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   message?: string | null,
>   code?: number | null
> } | null
> ```

***

### sites.customDomains.delete

`hosting.sites.customDomains.delete`

Deletes the specified `CustomDomain`

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.hosting.sites.customDomains.delete({ name: 'projects/demo-project/sites/demo-project/customDomains/www.example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `allowMissing` | `boolean` | No | If true, the request succeeds even if the `CustomDomain` doesn't exist. |
| `name` | `string` | Yes | Required. The name of the `CustomDomain` to delete. Format: `projects/<id>/sites/<id>/customDomains/<id>`. |
| `validateOnly` | `boolean` | No | If true, Hosting validates that it's possible to complete your request but doesn't actually delete the `CustomDomain`. |
| `etag` | `string` | No | A tag that represents the state of the `CustomDomain` as you know it. If present, the supplied tag must match the current value on your `CustomDomain`, or the request fails. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   message?: string | null,
>   code?: number | null
> } | null
> ```

***

### sites.customDomains.get

`hosting.sites.customDomains.get`

Gets the specified `CustomDomain`

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.customDomains.get({ name: 'projects/demo-project/sites/demo-project/customDomains/www.example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the `CustomDomain` to get. Format: `projects/<id>/sites/<id>/customDomains/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ownershipState` | `string \| null` | No | Output only. The `OwnershipState` of the domain name this `CustomDomain` refers to. |
| `expireTime` | `string \| null` | No | Output only. The minimum time before a soft-deleted `CustomDomain` is completely removed from Hosting; null for custom domains that haven't been deleted. |
| `issues` | `object[] \| null` | No | Output only. A set of errors Hosting systems encountered when trying to establish Hosting's ability to serve secure content for your domain name. Resolve these issues to ensure your `CustomDomain` behaves properly. |
| `requiredDnsUpdates` | `object \| null` | No | A set of DNS record updates that you should make to allow Hosting to serve secure content in response to requests against your domain name. These updates present the current state of your domain name's DNS records when Hosting last queried them, and the desired set of records that Hosting needs to see before your custom domain can be fully active. |
| `cert` | `object \| null` | No | An SSL certificate used to provide end-to-end encryption for requests against your domain name. A `Certificate` can be an actual SSL certificate or, for newly-created custom domains, Hosting's intent to create one. |
| `reconciling` | `boolean \| null` | No | Output only. A field that, if true, indicates that Hosting's systems are attmepting to make the custom domain's state match your preferred state. This is most frequently `true` when initially provisioning a `CustomDomain` after a `CreateCustomDomain` request or when creating a new SSL certificate to match an updated `cert_preference` after an `UpdateCustomDomain` request. |
| `deleteTime` | `string \| null` | No | Output only. The time the `CustomDomain` was deleted; null for custom domains that haven't been deleted. Deleted custom domains persist for approximately 30 days, after which time Hosting removes them completely. To restore a deleted custom domain, make an `UndeleteCustomDomain` request. |
| `name` | `string \| null` | No | Identifier. The fully-qualified name of the `CustomDomain`. |
| `labels` | `Record<string, string> \| null` | No | Labels used for extra metadata and/or filtering. |
| `createTime` | `string \| null` | No | Output only. The custom domain's create time. |
| `certPreference` | `string \| null` | No | A field that lets you specify which SSL certificate type Hosting creates for your domain name. Spark plan custom domains only have access to the `GROUPED` cert type, while Blaze plan domains can select any option. |
| `redirectTarget` | `string \| null` | No | A domain name that this `CustomDomain` should direct traffic towards. If specified, Hosting will respond to requests against this custom domain with an HTTP 301 code, and route traffic to the specified `redirect_target` instead. |
| `annotations` | `Record<string, string> \| null` | No | Annotations you can add to leave both human- and machine-readable metadata about your `CustomDomain`. |
| `hostState` | `string \| null` | No | Output only. The `HostState` of the domain name this `CustomDomain` refers to. |
| `updateTime` | `string \| null` | No | Output only. The last time the `CustomDomain` was updated. |
| `etag` | `string \| null` | No | Output only. A string that represents the current state of the `CustomDomain` and allows you to confirm its initial state in requests that would modify it. Use the tag to ensure consistency when making `UpdateCustomDomain`, `DeleteCustomDomain`, and `UndeleteCustomDomain` requests. |

> [accordion] issues full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   message?: string | null,
>   code?: number | null
> }[] | null
> ```

> [accordion] requiredDnsUpdates full type
>
> ```ts theme={null}
> {
>   desired?: {
>     domainName?: string | null,
>     records?: {
>       rdata?: string | null,
>       type?: string | null,
>       domainName?: string | null,
>       requiredAction?: string | null
>     }[] | null,
>     checkError?: {
>       details?: Record<string, any>[] | null,
>       message?: string | null,
>       code?: number | null
>     } | null
>   }[] | null,
>   checkTime?: string | null,
>   discovered?: {
>     domainName?: string | null,
>     records?: {
>       rdata?: string | null,
>       type?: string | null,
>       domainName?: string | null,
>       requiredAction?: string | null
>     }[] | null,
>     checkError?: {
>       details?: Record<string, any>[] | null,
>       message?: string | null,
>       code?: number | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] cert full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   issues?: {
>     details?: Record<string, any>[] | null,
>     message?: string | null,
>     code?: number | null
>   }[] | null,
>   verification?: {
>     http?: {
>       checkError?: {
>         details?: Record<string, any>[] | null,
>         message?: string | null,
>         code?: number | null
>       } | null,
>       desired?: string | null,
>       lastCheckTime?: string | null,
>       discovered?: string | null,
>       path?: string | null
>     } | null,
>     dns?: {
>       desired?: {
>         domainName?: string | null,
>         records?: {
>           rdata?: string | null,
>           type?: string | null,
>           domainName?: string | null,
>           requiredAction?: string | null
>         }[] | null,
>         checkError?: {
>           details?: Record<string, any>[] | null,
>           message?: string | null,
>           code?: number | null
>         } | null
>       }[] | null,
>       checkTime?: string | null,
>       discovered?: {
>         domainName?: string | null,
>         records?: {
>           rdata?: string | null,
>           type?: string | null,
>           domainName?: string | null,
>           requiredAction?: string | null
>         }[] | null,
>         checkError?: {
>           details?: Record<string, any>[] | null,
>           message?: string | null,
>           code?: number | null
>         } | null
>       }[] | null
>     } | null
>   } | null,
>   type?: string | null,
>   createTime?: string | null,
>   expireTime?: string | null
> } | null
> ```

***

### sites.customDomains.list

`hosting.sites.customDomains.list`

Lists each `CustomDomain` associated with the specified parent Hosting site. Returns `CustomDomain`s in a consistent, but undefined, order to facilitate pagination (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.customDomains.list({ parent: 'projects/demo-project/sites/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | A token from a previous call to `ListCustomDomains` that tells the server where to resume listing. |
| `parent` | `string` | Yes | Required. The Firebase Hosting `Site` with `CustomDomain` entities you'd like to list. Format: `projects/<id>/sites/<id>`. |
| `pageSize` | `number` | No | The max number of `CustomDomain` entities to return in a request. Defaults to 10. |
| `showDeleted` | `boolean` | No | If true, the request returns soft-deleted `CustomDomain`s that haven't been fully-deleted yet. To restore deleted `CustomDomain`s, make an `UndeleteCustomDomain` request. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `customDomains` | `object[] \| null` | No | A list of `CustomDomain` entities associated with the specified Firebase `Site`. |
| `nextPageToken` | `string \| null` | No | The pagination token, if more results exist beyond the ones in this response. Include this token in your next call to `ListCustomDomains`. Page tokens are short-lived and should not be stored. |

> [accordion] customDomains full type
>
> ```ts theme={null}
> {
>   ownershipState?: string | null,
>   expireTime?: string | null,
>   issues?: {
>     details?: Record<string, any>[] | null,
>     message?: string | null,
>     code?: number | null
>   }[] | null,
>   requiredDnsUpdates?: {
>     desired?: {
>       domainName?: string | null,
>       records?: {
>         rdata?: string | null,
>         type?: string | null,
>         domainName?: string | null,
>         requiredAction?: string | null
>       }[] | null,
>       checkError?: {
>         details?: Record<string, any>[] | null,
>         message?: string | null,
>         code?: number | null
>       } | null
>     }[] | null,
>     checkTime?: string | null,
>     discovered?: {
>       domainName?: string | null,
>       records?: {
>         rdata?: string | null,
>         type?: string | null,
>         domainName?: string | null,
>         requiredAction?: string | null
>       }[] | null,
>       checkError?: {
>         details?: Record<string, any>[] | null,
>         message?: string | null,
>         code?: number | null
>       } | null
>     }[] | null
>   } | null,
>   cert?: {
>     state?: string | null,
>     issues?: {
>       details?: Record<string, any>[] | null,
>       message?: string | null,
>       code?: number | null
>     }[] | null,
>     verification?: {
>       http?: {
>         checkError?: {
>           details?: Record<string, any>[] | null,
>           message?: string | null,
>           code?: number | null
>         } | null,
>         desired?: string | null,
>         lastCheckTime?: string | null,
>         discovered?: string | null,
>         path?: string | null
>       } | null,
>       dns?: {
>         desired?: {
>           domainName?: string | null,
>           records?: {
>             rdata?: string | null,
>             type?: string | null,
>             domainName?: string | null,
>             requiredAction?: string | null
>           }[] | null,
>           checkError?: {
>             details?: Record<string, any>[] | null,
>             message?: string | null,
>             code?: number | null
>           } | null
>         }[] | null,
>         checkTime?: string | null,
>         discovered?: {
>           domainName?: string | null,
>           records?: {
>             rdata?: string | null,
>             type?: string | null,
>             domainName?: string | null,
>             requiredAction?: string | null
>           }[] | null,
>           checkError?: {
>             details?: Record<string, any>[] | null,
>             message?: string | null,
>             code?: number | null
>           } | null
>         }[] | null
>       } | null
>     } | null,
>     type?: string | null,
>     createTime?: string | null,
>     expireTime?: string | null
>   } | null,
>   reconciling?: boolean | null,
>   deleteTime?: string | null,
>   name?: string | null,
>   labels?: Record<string, string> | null,
>   createTime?: string | null,
>   certPreference?: string | null,
>   redirectTarget?: string | null,
>   annotations?: Record<string, string> | null,
>   hostState?: string | null,
>   updateTime?: string | null,
>   etag?: string | null
> }[] | null
> ```

***

### sites.customDomains.operations.get

`hosting.sites.customDomains.operations.get`

Gets the latest state of a long-running operation. Use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.customDomains.operations.get({ name: 'projects/demo-project/sites/demo-project/customDomains/www.example.com/operations/op-123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `projects/<id>/sites/<id>/customDomains/<id>/operations/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   message?: string | null,
>   code?: number | null
> } | null
> ```

***

### sites.customDomains.operations.list

`hosting.sites.customDomains.operations.list`

Lists operations that match the specified filter in the request (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.customDomains.operations.list({ name: 'projects/demo-project/sites/demo-project/customDomains/www.example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | The standard list filter. |
| `pageSize` | `number` | No | The standard list page size. |
| `name` | `string` | Yes | The name of the operation's parent resource. Format: `projects/<id>/sites/<id>/customDomains/<id>`. |
| `pageToken` | `string` | No | The standard list page token. |
| `returnPartialSuccess` | `boolean` | No | When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `"projects/example/locations/-"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The standard List next-page token. |
| `unreachable` | `string[] \| null` | No | Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations. |
| `operations` | `object[] \| null` | No | A list of operations that matches the specified filter in the request. |

> [accordion] operations full type
>
> ```ts theme={null}
> {
>   error?: {
>     details?: Record<string, any>[] | null,
>     message?: string | null,
>     code?: number | null
>   } | null,
>   done?: boolean | null,
>   name?: string | null,
>   metadata?: Record<string, any> | null,
>   response?: Record<string, any> | null
> }[] | null
> ```

***

### sites.customDomains.patch

`hosting.sites.customDomains.patch`

Updates the specified `CustomDomain`

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.hosting.sites.customDomains.patch({ name: 'projects/demo-project/sites/demo-project/customDomains/www.example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `validateOnly` | `boolean` | No | If true, Hosting validates that it's possible to complete your request but doesn't actually create or update the `CustomDomain`. |
| `name` | `string` | Yes | Identifier. The fully-qualified name of the `CustomDomain`. Format: `projects/<id>/sites/<id>/customDomains/<id>`. |
| `updateMask` | `string` | No | The set of field names from your `CustomDomain` that you want to update. A field will be overwritten if, and only if, it's in the mask. If you don't provide a mask, Hosting updates the entire `CustomDomain`. |
| `allowMissing` | `boolean` | No | If true, Hosting creates the `CustomDomain` if it doesn't already exist. |
| `body_name` | `string` | No | Identifier. The fully-qualified name of the `CustomDomain`. |
| `labels` | `Record<string, string>` | No | Labels used for extra metadata and/or filtering. |
| `certPreference` | `TYPE_UNSPECIFIED \| TEMPORARY \| GROUPED \| PROJECT_GROUPED \| DEDICATED` | No | A field that lets you specify which SSL certificate type Hosting creates for your domain name. Spark plan custom domains only have access to the `GROUPED` cert type, while Blaze plan domains can select any option. |
| `redirectTarget` | `string` | No | A domain name that this `CustomDomain` should direct traffic towards. If specified, Hosting will respond to requests against this custom domain with an HTTP 301 code, and route traffic to the specified `redirect_target` instead. |
| `annotations` | `Record<string, string>` | No | Annotations you can add to leave both human- and machine-readable metadata about your `CustomDomain`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   message?: string | null,
>   code?: number | null
> } | null
> ```

***

### sites.customDomains.undelete

`hosting.sites.customDomains.undelete`

Undeletes the specified `CustomDomain` if it has been soft-deleted. Hosting retains soft-deleted custom domains for around 30 days before permanently deleting them

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.hosting.sites.customDomains.undelete({ name: 'projects/demo-project/sites/demo-project/customDomains/www.example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the `CustomDomain` to delete. Format: `projects/<id>/sites/<id>/customDomains/<id>`. |
| `validateOnly` | `boolean` | No | If true, Hosting validates that it's possible to complete your request but doesn't actually delete the `CustomDomain`. |
| `etag` | `string` | No | A tag that represents the state of the `CustomDomain` as you know it. If present, the supplied tag must match the current value on your `CustomDomain`, or the request fails. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   message?: string | null,
>   code?: number | null
> } | null
> ```

***

### sites.delete

`hosting.sites.delete`

Deletes the specified Hosting Site from the specified parent Firebase project

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.hosting.sites.delete({ name: 'projects/demo-project/sites/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The fully-qualified resource name for the Hosting site, in the format: projects/PROJECT\_IDENTIFIER/sites/SITE\_ID Refer to the `Site` `name` field for details about PROJECT\_IDENTIFIER values. Format: `projects/<id>/sites/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### sites.domains.create

`hosting.sites.domains.create`

Creates a domain mapping on the specified site

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.hosting.sites.domains.create({ parent: 'sites/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent to create the domain association for, in the format: sites/site-name Format: `sites/<id>`. |
| `provisioning` | `object` | No | The current certificate provisioning status information for a domain. |
| `updateTime` | `string` | No | Output only. The time at which the domain was last updated. |
| `status` | `DOMAIN_STATUS_UNSPECIFIED \| DOMAIN_CHANGE_PENDING \| DOMAIN_ACTIVE \| DOMAIN_VERIFICATION_REQUIRED \| DOMAIN_VERIFICATION_LOST` | No | Output only. Additional status of the domain association. |
| `domainName` | `string` | No | Required. The domain name of the association. |
| `domainRedirect` | `object` | No | Defines the behavior of a domain-level redirect. Domain redirects preserve the path of the redirect but replace the requested domain with the one specified in the redirect configuration. |
| `site` | `string` | No | Required. The site name of the association. |

> [accordion] provisioning full type
>
> ```ts theme={null}
> {
>   certChallengeDiscoveredTxt?: string[],
>   certChallengeDns?: {
>     domainName?: string,
>     token?: string
>   },
>   discoveredIps?: string[],
>   certStatus?: CERT_STATUS_UNSPECIFIED | CERT_PENDING | CERT_MISSING | CERT_PROCESSING | CERT_PROPAGATING | CERT_ACTIVE | CERT_ERROR,
>   dnsFetchTime?: string,
>   expectedIps?: string[],
>   dnsStatus?: DNS_STATUS_UNSPECIFIED | DNS_PENDING | DNS_MISSING | DNS_PARTIAL_MATCH | DNS_MATCH | DNS_EXTRANEOUS_MATCH,
>   certChallengeHttp?: {
>     token?: string,
>     path?: string
>   }
> }
> ```

> [accordion] domainRedirect full type
>
> ```ts theme={null}
> {
>   domainName?: string,
>   type?: REDIRECT_TYPE_UNSPECIFIED | MOVED_PERMANENTLY
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `provisioning` | `object \| null` | No | The current certificate provisioning status information for a domain. |
| `updateTime` | `string \| null` | No | Output only. The time at which the domain was last updated. |
| `status` | `string \| null` | No | Output only. Additional status of the domain association. |
| `domainName` | `string \| null` | No | Required. The domain name of the association. |
| `domainRedirect` | `object \| null` | No | Defines the behavior of a domain-level redirect. Domain redirects preserve the path of the redirect but replace the requested domain with the one specified in the redirect configuration. |
| `site` | `string \| null` | No | Required. The site name of the association. |

> [accordion] provisioning full type
>
> ```ts theme={null}
> {
>   certChallengeDiscoveredTxt?: string[] | null,
>   certChallengeDns?: {
>     domainName?: string | null,
>     token?: string | null
>   } | null,
>   discoveredIps?: string[] | null,
>   certStatus?: string | null,
>   dnsFetchTime?: string | null,
>   expectedIps?: string[] | null,
>   dnsStatus?: string | null,
>   certChallengeHttp?: {
>     token?: string | null,
>     path?: string | null
>   } | null
> } | null
> ```

> [accordion] domainRedirect full type
>
> ```ts theme={null}
> {
>   domainName?: string | null,
>   type?: string | null
> } | null
> ```

***

### sites.domains.delete

`hosting.sites.domains.delete`

Deletes the existing domain mapping on the specified site

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.hosting.sites.domains.delete({ name: 'sites/demo-project/domains/www.example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the domain association to delete. Format: `sites/<id>/domains/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### sites.domains.get

`hosting.sites.domains.get`

Gets a domain mapping on the specified site

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.domains.get({ name: 'sites/demo-project/domains/www.example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the domain configuration to get. Format: `sites/<id>/domains/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `provisioning` | `object \| null` | No | The current certificate provisioning status information for a domain. |
| `updateTime` | `string \| null` | No | Output only. The time at which the domain was last updated. |
| `status` | `string \| null` | No | Output only. Additional status of the domain association. |
| `domainName` | `string \| null` | No | Required. The domain name of the association. |
| `domainRedirect` | `object \| null` | No | Defines the behavior of a domain-level redirect. Domain redirects preserve the path of the redirect but replace the requested domain with the one specified in the redirect configuration. |
| `site` | `string \| null` | No | Required. The site name of the association. |

> [accordion] provisioning full type
>
> ```ts theme={null}
> {
>   certChallengeDiscoveredTxt?: string[] | null,
>   certChallengeDns?: {
>     domainName?: string | null,
>     token?: string | null
>   } | null,
>   discoveredIps?: string[] | null,
>   certStatus?: string | null,
>   dnsFetchTime?: string | null,
>   expectedIps?: string[] | null,
>   dnsStatus?: string | null,
>   certChallengeHttp?: {
>     token?: string | null,
>     path?: string | null
>   } | null
> } | null
> ```

> [accordion] domainRedirect full type
>
> ```ts theme={null}
> {
>   domainName?: string | null,
>   type?: string | null
> } | null
> ```

***

### sites.domains.list

`hosting.sites.domains.list`

Lists the domains for the specified site (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.domains.list({ parent: 'sites/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent for which to list domains, in the format: sites/ site-name Format: `sites/<id>`. |
| `pageSize` | `number` | No | The page size to return. Defaults to 50. |
| `pageToken` | `string` | No | The next\_page\_token from a previous request, if provided. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The pagination token, if more results exist. |
| `domains` | `object[] \| null` | No | The list of domains, if any exist. |

> [accordion] domains full type
>
> ```ts theme={null}
> {
>   provisioning?: {
>     certChallengeDiscoveredTxt?: string[] | null,
>     certChallengeDns?: {
>       domainName?: string | null,
>       token?: string | null
>     } | null,
>     discoveredIps?: string[] | null,
>     certStatus?: string | null,
>     dnsFetchTime?: string | null,
>     expectedIps?: string[] | null,
>     dnsStatus?: string | null,
>     certChallengeHttp?: {
>       token?: string | null,
>       path?: string | null
>     } | null
>   } | null,
>   updateTime?: string | null,
>   status?: string | null,
>   domainName?: string | null,
>   domainRedirect?: {
>     domainName?: string | null,
>     type?: string | null
>   } | null,
>   site?: string | null
> }[] | null
> ```

***

### sites.domains.update

`hosting.sites.domains.update`

Updates the specified domain mapping, creating the mapping as if it does not exist

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.hosting.sites.domains.update({ name: 'sites/demo-project/domains/www.example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the domain association to update or create, if an association doesn't already exist. Format: `sites/<id>/domains/<id>`. |
| `provisioning` | `object` | No | The current certificate provisioning status information for a domain. |
| `updateTime` | `string` | No | Output only. The time at which the domain was last updated. |
| `status` | `DOMAIN_STATUS_UNSPECIFIED \| DOMAIN_CHANGE_PENDING \| DOMAIN_ACTIVE \| DOMAIN_VERIFICATION_REQUIRED \| DOMAIN_VERIFICATION_LOST` | No | Output only. Additional status of the domain association. |
| `domainName` | `string` | No | Required. The domain name of the association. |
| `domainRedirect` | `object` | No | Defines the behavior of a domain-level redirect. Domain redirects preserve the path of the redirect but replace the requested domain with the one specified in the redirect configuration. |
| `site` | `string` | No | Required. The site name of the association. |

> [accordion] provisioning full type
>
> ```ts theme={null}
> {
>   certChallengeDiscoveredTxt?: string[],
>   certChallengeDns?: {
>     domainName?: string,
>     token?: string
>   },
>   discoveredIps?: string[],
>   certStatus?: CERT_STATUS_UNSPECIFIED | CERT_PENDING | CERT_MISSING | CERT_PROCESSING | CERT_PROPAGATING | CERT_ACTIVE | CERT_ERROR,
>   dnsFetchTime?: string,
>   expectedIps?: string[],
>   dnsStatus?: DNS_STATUS_UNSPECIFIED | DNS_PENDING | DNS_MISSING | DNS_PARTIAL_MATCH | DNS_MATCH | DNS_EXTRANEOUS_MATCH,
>   certChallengeHttp?: {
>     token?: string,
>     path?: string
>   }
> }
> ```

> [accordion] domainRedirect full type
>
> ```ts theme={null}
> {
>   domainName?: string,
>   type?: REDIRECT_TYPE_UNSPECIFIED | MOVED_PERMANENTLY
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `provisioning` | `object \| null` | No | The current certificate provisioning status information for a domain. |
| `updateTime` | `string \| null` | No | Output only. The time at which the domain was last updated. |
| `status` | `string \| null` | No | Output only. Additional status of the domain association. |
| `domainName` | `string \| null` | No | Required. The domain name of the association. |
| `domainRedirect` | `object \| null` | No | Defines the behavior of a domain-level redirect. Domain redirects preserve the path of the redirect but replace the requested domain with the one specified in the redirect configuration. |
| `site` | `string \| null` | No | Required. The site name of the association. |

> [accordion] provisioning full type
>
> ```ts theme={null}
> {
>   certChallengeDiscoveredTxt?: string[] | null,
>   certChallengeDns?: {
>     domainName?: string | null,
>     token?: string | null
>   } | null,
>   discoveredIps?: string[] | null,
>   certStatus?: string | null,
>   dnsFetchTime?: string | null,
>   expectedIps?: string[] | null,
>   dnsStatus?: string | null,
>   certChallengeHttp?: {
>     token?: string | null,
>     path?: string | null
>   } | null
> } | null
> ```

> [accordion] domainRedirect full type
>
> ```ts theme={null}
> {
>   domainName?: string | null,
>   type?: string | null
> } | null
> ```

***

### sites.get

`hosting.sites.get`

Gets the specified Hosting Site

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.get({ name: 'projects/demo-project/sites/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The fully-qualified resource name for the Hosting site, in the format: projects/PROJECT\_IDENTIFIER/sites/SITE\_ID Refer to the `Site` `name` field for details about PROJECT\_IDENTIFIER values. Since a SITE\_ID is a globally unique identifier, you can also use the unique sub-collection resource access pattern, in the format: projects/-/sites/SITE\_ID Format: `projects/<id>/sites/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `defaultUrl` | `string \| null` | No | Output only. The default URL for the Hosting site. |
| `type` | `string \| null` | No | Output only. The type of Hosting site. Every Firebase project has a `DEFAULT_SITE`, which is created when Hosting is provisioned for the project. All additional sites are `USER_SITE`. |
| `name` | `string \| null` | No | Output only. The fully-qualified resource name of the Hosting site, in the format: projects/PROJECT\_IDENTIFIER/sites/SITE\_ID PROJECT\_IDENTIFIER: the Firebase project's [`ProjectNumber`](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects#FirebaseProject.FIELDS.project_number) ***(recommended)*** or its [`ProjectId`](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects#FirebaseProject.FIELDS.project_id). Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). |
| `labels` | `Record<string, string> \| null` | No | Optional. User-specified labels for the Hosting site. |
| `appId` | `string \| null` | No | Optional. The [ID of a Web App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps#WebApp.FIELDS.app_id) associated with the Hosting site. |

***

### sites.getConfig

`hosting.sites.getConfig`

Gets the Hosting metadata for a specific site

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.getConfig({ name: 'sites/demo-project/config' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The site for which to get the SiteConfig, in the format: sites/ site-name/config Format: `sites/<id>/config`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `cloudLoggingEnabled` | `boolean \| null` | No | Whether or not web requests made by site visitors are logged via Cloud Logging. |
| `maxVersions` | `string \| number \| null` | No | The number of FINALIZED versions that will be held for a site before automatic deletion. When a new version is deployed, content for versions in storage in excess of this number will be deleted, and will no longer be billed for storage usage. Oldest versions will be deleted first; sites are created with an unlimited number of max\_versions by default. |

***

### sites.list

`hosting.sites.list`

Lists each Hosting Site associated with the specified parent Firebase project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of sites to return. The service may return a lower number if fewer sites exist than this maximum number. If unspecified, defaults to 40. |
| `parent` | `string` | Yes | Required. The Firebase project for which to list sites, in the format: projects/PROJECT\_IDENTIFIER Refer to the `Site` `name` field for details about PROJECT\_IDENTIFIER values. Format: `projects/<id>`. |
| `pageToken` | `string` | No | Optional. A token from a previous call to `ListSites` that tells the server where to resume listing. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `sites` | `object[] \| null` | No | A list of Site objects associated with the specified Firebase project. |
| `nextPageToken` | `string \| null` | No | The pagination token, if more results exist beyond the ones in this response. Include this token in your next call to `ListSites`. Page tokens are short-lived and should not be stored. |

> [accordion] sites full type
>
> ```ts theme={null}
> {
>   defaultUrl?: string | null,
>   type?: string | null,
>   name?: string | null,
>   labels?: Record<string, string> | null,
>   appId?: string | null
> }[] | null
> ```

***

### sites.patch

`hosting.sites.patch`

Updates attributes of the specified Hosting Site

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.hosting.sites.patch({ name: 'projects/demo-project/sites/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Output only. The fully-qualified resource name of the Hosting site, in the format: projects/PROJECT\_IDENTIFIER/sites/SITE\_ID PROJECT\_IDENTIFIER: the Firebase project's [`ProjectNumber`](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects#FirebaseProject.FIELDS.project_number) ***(recommended)*** or its [`ProjectId`](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects#FirebaseProject.FIELDS.project_id). Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Format: `projects/<id>/sites/<id>`. |
| `updateMask` | `string` | No | A set of field names from your Site that you want to update. |
| `labels` | `Record<string, string>` | No | Optional. User-specified labels for the Hosting site. |
| `appId` | `string` | No | Optional. The [ID of a Web App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps#WebApp.FIELDS.app_id) associated with the Hosting site. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `defaultUrl` | `string \| null` | No | Output only. The default URL for the Hosting site. |
| `type` | `string \| null` | No | Output only. The type of Hosting site. Every Firebase project has a `DEFAULT_SITE`, which is created when Hosting is provisioned for the project. All additional sites are `USER_SITE`. |
| `name` | `string \| null` | No | Output only. The fully-qualified resource name of the Hosting site, in the format: projects/PROJECT\_IDENTIFIER/sites/SITE\_ID PROJECT\_IDENTIFIER: the Firebase project's [`ProjectNumber`](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects#FirebaseProject.FIELDS.project_number) ***(recommended)*** or its [`ProjectId`](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects#FirebaseProject.FIELDS.project_id). Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). |
| `labels` | `Record<string, string> \| null` | No | Optional. User-specified labels for the Hosting site. |
| `appId` | `string \| null` | No | Optional. The [ID of a Web App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps#WebApp.FIELDS.app_id) associated with the Hosting site. |

***

### sites.releases.create

`hosting.sites.releases.create`

Creates a new release, which makes the content of the specified version actively display on the appropriate URL(s)

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.hosting.sites.releases.create({ parent: 'sites/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The site or channel to which the release belongs, in either of the following formats: - sites/SITE\_ID - sites/SITE\_ID/channels/CHANNEL\_ID Format: `sites/<id>`. |
| `versionName` | `string` | No | The unique identifier for a version, in the format: sites/SITE\_ID/versions/ VERSION\_ID The SITE\_ID in this version identifier must match the SITE\_ID in the `parent` parameter. This query parameter must be empty if the `type` field in the request body is `SITE_DISABLE`. |
| `name` | `string` | No | Output only. The unique identifier for the release, in either of the following formats: - sites/SITE\_ID/releases/RELEASE\_ID - sites/SITE\_ID/channels/CHANNEL\_ID/releases/RELEASE\_ID This name is provided in the response body when you call `releases.create` or `channels.releases.create`. |
| `version` | `object` | No | A `Version` is a configuration and a collection of static files which determine how a site is displayed. |
| `message` | `string` | No | The deploy description when the release was created. The value can be up to 512 characters. |
| `releaseTime` | `string` | No | Output only. The time at which the version is set to be public. |
| `releaseUser` | `object` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `type` | `TYPE_UNSPECIFIED \| DEPLOY \| ROLLBACK \| SITE_DISABLE` | No | Explains the reason for the release. Specify a value for this field only when creating a `SITE_DISABLE` type release. |

> [accordion] version full type
>
> ```ts theme={null}
> {
>   createUser?: {
>     email?: string,
>     imageUrl?: string
>   },
>   status?: VERSION_STATUS_UNSPECIFIED | CREATED | FINALIZED | DELETED | ABANDONED | EXPIRED | CLONING,
>   labels?: Record<string, string>,
>   deleteTime?: string,
>   createTime?: string,
>   name?: string,
>   fileCount?: string | number,
>   deleteUser?: {
>     email?: string,
>     imageUrl?: string
>   },
>   finalizeUser?: {
>     email?: string,
>     imageUrl?: string
>   },
>   finalizeTime?: string,
>   versionBytes?: string | number,
>   config?: {
>     trailingSlashBehavior?: TRAILING_SLASH_BEHAVIOR_UNSPECIFIED | ADD | REMOVE,
>     redirects?: {
>       glob?: string,
>       statusCode?: number,
>       location?: string,
>       regex?: string
>     }[],
>     cleanUrls?: boolean,
>     rewrites?: {
>       functionRegion?: string,
>       regex?: string,
>       dynamicLinks?: boolean,
>       path?: string,
>       function?: string,
>       run?: {
>         region?: string,
>         tag?: string,
>         serviceId?: string
>       },
>       glob?: string
>     }[],
>     headers?: {
>       glob?: string,
>       headers?: Record<string, string>,
>       regex?: string
>     }[],
>     i18n?: {
>       root?: string
>     },
>     appAssociation?: AUTO | NONE
>   }
> }
> ```

> [accordion] releaseUser full type
>
> ```ts theme={null}
> {
>   email?: string,
>   imageUrl?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Output only. The unique identifier for the release, in either of the following formats: - sites/SITE\_ID/releases/RELEASE\_ID - sites/SITE\_ID/channels/CHANNEL\_ID/releases/RELEASE\_ID This name is provided in the response body when you call `releases.create` or `channels.releases.create`. |
| `version` | `object \| null` | No | A `Version` is a configuration and a collection of static files which determine how a site is displayed. |
| `message` | `string \| null` | No | The deploy description when the release was created. The value can be up to 512 characters. |
| `releaseTime` | `string \| null` | No | Output only. The time at which the version is set to be public. |
| `releaseUser` | `object \| null` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `type` | `string \| null` | No | Explains the reason for the release. Specify a value for this field only when creating a `SITE_DISABLE` type release. |

> [accordion] version full type
>
> ```ts theme={null}
> {
>   createUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   status?: string | null,
>   labels?: Record<string, string> | null,
>   deleteTime?: string | null,
>   createTime?: string | null,
>   name?: string | null,
>   fileCount?: string | number | null,
>   deleteUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   finalizeUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   finalizeTime?: string | null,
>   versionBytes?: string | number | null,
>   config?: {
>     trailingSlashBehavior?: string | null,
>     redirects?: {
>       glob?: string | null,
>       statusCode?: number | null,
>       location?: string | null,
>       regex?: string | null
>     }[] | null,
>     cleanUrls?: boolean | null,
>     rewrites?: {
>       functionRegion?: string | null,
>       regex?: string | null,
>       dynamicLinks?: boolean | null,
>       path?: string | null,
>       function?: string | null,
>       run?: {
>         region?: string | null,
>         tag?: string | null,
>         serviceId?: string | null
>       } | null,
>       glob?: string | null
>     }[] | null,
>     headers?: {
>       glob?: string | null,
>       headers?: Record<string, string> | null,
>       regex?: string | null
>     }[] | null,
>     i18n?: {
>       root?: string | null
>     } | null,
>     appAssociation?: string | null
>   } | null
> } | null
> ```

> [accordion] releaseUser full type
>
> ```ts theme={null}
> {
>   email?: string | null,
>   imageUrl?: string | null
> } | null
> ```

***

### sites.releases.get

`hosting.sites.releases.get`

Gets the specified release for a site or channel. When used to get a release for a site, this can get releases for both the default `live` channel and any active preview channels for the specified site

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.releases.get({ name: 'sites/demo-project/releases/r1a2b3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The fully-qualified resource name for the Hosting release, in either of the following formats: - sites/SITE\_ID/channels/CHANNEL\_ID/releases/RELEASE\_ID - sites/SITE\_ID/releases/RELEASE\_ID Format: `sites/<id>/releases/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Output only. The unique identifier for the release, in either of the following formats: - sites/SITE\_ID/releases/RELEASE\_ID - sites/SITE\_ID/channels/CHANNEL\_ID/releases/RELEASE\_ID This name is provided in the response body when you call `releases.create` or `channels.releases.create`. |
| `version` | `object \| null` | No | A `Version` is a configuration and a collection of static files which determine how a site is displayed. |
| `message` | `string \| null` | No | The deploy description when the release was created. The value can be up to 512 characters. |
| `releaseTime` | `string \| null` | No | Output only. The time at which the version is set to be public. |
| `releaseUser` | `object \| null` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `type` | `string \| null` | No | Explains the reason for the release. Specify a value for this field only when creating a `SITE_DISABLE` type release. |

> [accordion] version full type
>
> ```ts theme={null}
> {
>   createUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   status?: string | null,
>   labels?: Record<string, string> | null,
>   deleteTime?: string | null,
>   createTime?: string | null,
>   name?: string | null,
>   fileCount?: string | number | null,
>   deleteUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   finalizeUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   finalizeTime?: string | null,
>   versionBytes?: string | number | null,
>   config?: {
>     trailingSlashBehavior?: string | null,
>     redirects?: {
>       glob?: string | null,
>       statusCode?: number | null,
>       location?: string | null,
>       regex?: string | null
>     }[] | null,
>     cleanUrls?: boolean | null,
>     rewrites?: {
>       functionRegion?: string | null,
>       regex?: string | null,
>       dynamicLinks?: boolean | null,
>       path?: string | null,
>       function?: string | null,
>       run?: {
>         region?: string | null,
>         tag?: string | null,
>         serviceId?: string | null
>       } | null,
>       glob?: string | null
>     }[] | null,
>     headers?: {
>       glob?: string | null,
>       headers?: Record<string, string> | null,
>       regex?: string | null
>     }[] | null,
>     i18n?: {
>       root?: string | null
>     } | null,
>     appAssociation?: string | null
>   } | null
> } | null
> ```

> [accordion] releaseUser full type
>
> ```ts theme={null}
> {
>   email?: string | null,
>   imageUrl?: string | null
> } | null
> ```

***

### sites.releases.list

`hosting.sites.releases.list`

Lists the releases that have been created for the specified site or channel. When used to list releases for a site, this list includes releases for both the default `live` channel and any active preview channels for the specified site (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.releases.list({ parent: 'sites/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The maximum number of releases to return. The service may return a lower number if fewer releases exist than this maximum number. If unspecified, defaults to 100. |
| `parent` | `string` | Yes | Required. The site or channel for which to list releases, in either of the following formats: - sites/SITE\_ID - sites/SITE\_ID/channels/CHANNEL\_ID Format: `sites/<id>`. |
| `pageToken` | `string` | No | A token from a previous call to `releases.list` or `channels.releases.list` that tells the server where to resume listing. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `releases` | `object[] \| null` | No | The list of hashes of files that still need to be uploaded, if any exist. |
| `nextPageToken` | `string \| null` | No | The pagination token, if more results exist beyond the ones in this response. Include this token in your next call to `ListReleases`. Page tokens are short-lived and should not be stored. |

> [accordion] releases full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   version?: {
>     createUser?: {
>       email?: string | null,
>       imageUrl?: string | null
>     } | null,
>     status?: string | null,
>     labels?: Record<string, string> | null,
>     deleteTime?: string | null,
>     createTime?: string | null,
>     name?: string | null,
>     fileCount?: string | number | null,
>     deleteUser?: {
>       email?: string | null,
>       imageUrl?: string | null
>     } | null,
>     finalizeUser?: {
>       email?: string | null,
>       imageUrl?: string | null
>     } | null,
>     finalizeTime?: string | null,
>     versionBytes?: string | number | null,
>     config?: {
>       trailingSlashBehavior?: string | null,
>       redirects?: {
>         glob?: string | null,
>         statusCode?: number | null,
>         location?: string | null,
>         regex?: string | null
>       }[] | null,
>       cleanUrls?: boolean | null,
>       rewrites?: {
>         functionRegion?: string | null,
>         regex?: string | null,
>         dynamicLinks?: boolean | null,
>         path?: string | null,
>         function?: string | null,
>         run?: {
>           region?: string | null,
>           tag?: string | null,
>           serviceId?: string | null
>         } | null,
>         glob?: string | null
>       }[] | null,
>       headers?: {
>         glob?: string | null,
>         headers?: Record<string, string> | null,
>         regex?: string | null
>       }[] | null,
>       i18n?: {
>         root?: string | null
>       } | null,
>       appAssociation?: string | null
>     } | null
>   } | null,
>   message?: string | null,
>   releaseTime?: string | null,
>   releaseUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   type?: string | null
> }[] | null
> ```

***

### sites.updateConfig

`hosting.sites.updateConfig`

Sets the Hosting metadata for a specific site

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.hosting.sites.updateConfig({ name: 'sites/demo-project/config' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The site for which to update the SiteConfig, in the format: sites/ site-name/config Format: `sites/<id>/config`. |
| `updateMask` | `string` | No | A set of field names from your site configuration that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only `max_versions` will be used. |
| `cloudLoggingEnabled` | `boolean` | No | Whether or not web requests made by site visitors are logged via Cloud Logging. |
| `maxVersions` | `string \| number` | No | The number of FINALIZED versions that will be held for a site before automatic deletion. When a new version is deployed, content for versions in storage in excess of this number will be deleted, and will no longer be billed for storage usage. Oldest versions will be deleted first; sites are created with an unlimited number of max\_versions by default. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `cloudLoggingEnabled` | `boolean \| null` | No | Whether or not web requests made by site visitors are logged via Cloud Logging. |
| `maxVersions` | `string \| number \| null` | No | The number of FINALIZED versions that will be held for a site before automatic deletion. When a new version is deployed, content for versions in storage in excess of this number will be deleted, and will no longer be billed for storage usage. Oldest versions will be deleted first; sites are created with an unlimited number of max\_versions by default. |

***

### sites.versions.clone

`hosting.sites.versions.clone`

Creates a new version on the specified target site using the content of the specified version

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.hosting.sites.versions.clone({ parent: 'sites/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The target site for the cloned version, in the format: sites/ SITE\_ID Format: `sites/<id>`. |
| `sourceVersion` | `string` | No | Required. The unique identifier for the version to be cloned, in the format: sites/SITE\_ID/versions/VERSION\_ID |
| `include` | `object` | No | A representation of filter path. |
| `finalize` | `boolean` | No | If true, the call to `CloneVersion` immediately finalizes the version after cloning is complete. If false, the cloned version will have a status of `CREATED`. Use `UpdateVersion` to set the status of the version to `FINALIZED`. |
| `exclude` | `object` | No | A representation of filter path. |

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

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   message?: string | null,
>   code?: number | null
> } | null
> ```

***

### sites.versions.create

`hosting.sites.versions.create`

Creates a new version for the specified site

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.hosting.sites.versions.create({ parent: 'sites/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `versionId` | `string` | No | A unique id for the new version. This is was only specified for legacy version creations, and should be blank. |
| `sizeBytes` | `string \| number` | No | The self-reported size of the version. This value is used for a pre-emptive quota check for legacy version uploads. |
| `parent` | `string` | Yes | Required. The site in which to create the version, in the format: sites/ SITE\_ID Format: `sites/<id>`. |
| `createUser` | `object` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `status` | `VERSION_STATUS_UNSPECIFIED \| CREATED \| FINALIZED \| DELETED \| ABANDONED \| EXPIRED \| CLONING` | No | The deploy status of the version. For a successful deploy, call `CreateVersion` to make a new version (`CREATED` status), upload all desired files to the version, then update the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling `DeleteVersion`. |
| `labels` | `Record<string, string>` | No | The labels used for extra metadata and/or filtering. |
| `deleteTime` | `string` | No | Output only. The time at which the version was `DELETED`. |
| `createTime` | `string` | No | Output only. The time at which the version was created. |
| `name` | `string` | No | The fully-qualified resource name for the version, in the format: sites/ SITE\_ID/versions/VERSION\_ID This name is provided in the response body when you call `CreateVersion`. |
| `fileCount` | `string \| number` | No | Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`. |
| `deleteUser` | `object` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `finalizeUser` | `object` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `finalizeTime` | `string` | No | Output only. The time at which the version was `FINALIZED`. |
| `versionBytes` | `string \| number` | No | Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`. |
| `config` | `object` | No | The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific [priority order](https://firebase.google.com/docs/hosting/full-config#hosting_priority_order). |

> [accordion] createUser full type
>
> ```ts theme={null}
> {
>   email?: string,
>   imageUrl?: string
> }
> ```

> [accordion] deleteUser full type
>
> ```ts theme={null}
> {
>   email?: string,
>   imageUrl?: string
> }
> ```

> [accordion] finalizeUser full type
>
> ```ts theme={null}
> {
>   email?: string,
>   imageUrl?: string
> }
> ```

> [accordion] config full type
>
> ```ts theme={null}
> {
>   trailingSlashBehavior?: TRAILING_SLASH_BEHAVIOR_UNSPECIFIED | ADD | REMOVE,
>   redirects?: {
>     glob?: string,
>     statusCode?: number,
>     location?: string,
>     regex?: string
>   }[],
>   cleanUrls?: boolean,
>   rewrites?: {
>     functionRegion?: string,
>     regex?: string,
>     dynamicLinks?: boolean,
>     path?: string,
>     function?: string,
>     run?: {
>       region?: string,
>       tag?: string,
>       serviceId?: string
>     },
>     glob?: string
>   }[],
>   headers?: {
>     glob?: string,
>     headers?: Record<string, string>,
>     regex?: string
>   }[],
>   i18n?: {
>     root?: string
>   },
>   appAssociation?: AUTO | NONE
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `createUser` | `object \| null` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `status` | `string \| null` | No | The deploy status of the version. For a successful deploy, call `CreateVersion` to make a new version (`CREATED` status), upload all desired files to the version, then update the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling `DeleteVersion`. |
| `labels` | `Record<string, string> \| null` | No | The labels used for extra metadata and/or filtering. |
| `deleteTime` | `string \| null` | No | Output only. The time at which the version was `DELETED`. |
| `createTime` | `string \| null` | No | Output only. The time at which the version was created. |
| `name` | `string \| null` | No | The fully-qualified resource name for the version, in the format: sites/ SITE\_ID/versions/VERSION\_ID This name is provided in the response body when you call `CreateVersion`. |
| `fileCount` | `string \| number \| null` | No | Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`. |
| `deleteUser` | `object \| null` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `finalizeUser` | `object \| null` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `finalizeTime` | `string \| null` | No | Output only. The time at which the version was `FINALIZED`. |
| `versionBytes` | `string \| number \| null` | No | Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`. |
| `config` | `object \| null` | No | The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific [priority order](https://firebase.google.com/docs/hosting/full-config#hosting_priority_order). |

> [accordion] createUser full type
>
> ```ts theme={null}
> {
>   email?: string | null,
>   imageUrl?: string | null
> } | null
> ```

> [accordion] deleteUser full type
>
> ```ts theme={null}
> {
>   email?: string | null,
>   imageUrl?: string | null
> } | null
> ```

> [accordion] finalizeUser full type
>
> ```ts theme={null}
> {
>   email?: string | null,
>   imageUrl?: string | null
> } | null
> ```

> [accordion] config full type
>
> ```ts theme={null}
> {
>   trailingSlashBehavior?: string | null,
>   redirects?: {
>     glob?: string | null,
>     statusCode?: number | null,
>     location?: string | null,
>     regex?: string | null
>   }[] | null,
>   cleanUrls?: boolean | null,
>   rewrites?: {
>     functionRegion?: string | null,
>     regex?: string | null,
>     dynamicLinks?: boolean | null,
>     path?: string | null,
>     function?: string | null,
>     run?: {
>       region?: string | null,
>       tag?: string | null,
>       serviceId?: string | null
>     } | null,
>     glob?: string | null
>   }[] | null,
>   headers?: {
>     glob?: string | null,
>     headers?: Record<string, string> | null,
>     regex?: string | null
>   }[] | null,
>   i18n?: {
>     root?: string | null
>   } | null,
>   appAssociation?: string | null
> } | null
> ```

***

### sites.versions.delete

`hosting.sites.versions.delete`

Deletes the specified version

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.hosting.sites.versions.delete({ name: 'sites/demo-project/versions/v1a2b3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The fully-qualified resource name for the version, in the format: sites/SITE\_ID/versions/VERSION\_ID Format: `sites/<id>/versions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### sites.versions.files.list

`hosting.sites.versions.files.list`

Lists the remaining files to be uploaded for the specified version (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.versions.files.list({ parent: 'sites/demo-project/versions/v1a2b3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The maximum number of version files to return. The service may return a lower number if fewer version files exist than this maximum number. If unspecified, defaults to 1000. |
| `status` | `STATUS_UNSPECIFIED \| EXPECTED \| ACTIVE` | No | The type of files that should be listed for the specified version. |
| `pageToken` | `string` | No | A token from a previous call to `ListVersionFiles` that tells the server where to resume listing. |
| `parent` | `string` | Yes | Required. The version for which to list files, in the format: sites/SITE\_ID /versions/VERSION\_ID Format: `sites/<id>/versions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The pagination token, if more results exist beyond the ones in this response. Include this token in your next call to `ListVersionFiles`. Page tokens are short-lived and should not be stored. |
| `files` | `object[] \| null` | No | The list of paths to the hashes of the files in the specified version. |

> [accordion] files full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   path?: string | null,
>   hash?: string | null
> }[] | null
> ```

***

### sites.versions.get

`hosting.sites.versions.get`

Get the specified version that has been created for the specified site. This can include versions that were created for the default `live` channel or for any active preview channels for the specified site

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.versions.get({ name: 'sites/demo-project/versions/v1a2b3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The fully-qualified resource name for the version, in the format: sites/SITE\_ID/versions/VERSION\_ID Format: `sites/<id>/versions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `createUser` | `object \| null` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `status` | `string \| null` | No | The deploy status of the version. For a successful deploy, call `CreateVersion` to make a new version (`CREATED` status), upload all desired files to the version, then update the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling `DeleteVersion`. |
| `labels` | `Record<string, string> \| null` | No | The labels used for extra metadata and/or filtering. |
| `deleteTime` | `string \| null` | No | Output only. The time at which the version was `DELETED`. |
| `createTime` | `string \| null` | No | Output only. The time at which the version was created. |
| `name` | `string \| null` | No | The fully-qualified resource name for the version, in the format: sites/ SITE\_ID/versions/VERSION\_ID This name is provided in the response body when you call `CreateVersion`. |
| `fileCount` | `string \| number \| null` | No | Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`. |
| `deleteUser` | `object \| null` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `finalizeUser` | `object \| null` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `finalizeTime` | `string \| null` | No | Output only. The time at which the version was `FINALIZED`. |
| `versionBytes` | `string \| number \| null` | No | Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`. |
| `config` | `object \| null` | No | The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific [priority order](https://firebase.google.com/docs/hosting/full-config#hosting_priority_order). |

> [accordion] createUser full type
>
> ```ts theme={null}
> {
>   email?: string | null,
>   imageUrl?: string | null
> } | null
> ```

> [accordion] deleteUser full type
>
> ```ts theme={null}
> {
>   email?: string | null,
>   imageUrl?: string | null
> } | null
> ```

> [accordion] finalizeUser full type
>
> ```ts theme={null}
> {
>   email?: string | null,
>   imageUrl?: string | null
> } | null
> ```

> [accordion] config full type
>
> ```ts theme={null}
> {
>   trailingSlashBehavior?: string | null,
>   redirects?: {
>     glob?: string | null,
>     statusCode?: number | null,
>     location?: string | null,
>     regex?: string | null
>   }[] | null,
>   cleanUrls?: boolean | null,
>   rewrites?: {
>     functionRegion?: string | null,
>     regex?: string | null,
>     dynamicLinks?: boolean | null,
>     path?: string | null,
>     function?: string | null,
>     run?: {
>       region?: string | null,
>       tag?: string | null,
>       serviceId?: string | null
>     } | null,
>     glob?: string | null
>   }[] | null,
>   headers?: {
>     glob?: string | null,
>     headers?: Record<string, string> | null,
>     regex?: string | null
>   }[] | null,
>   i18n?: {
>     root?: string | null
>   } | null,
>   appAssociation?: string | null
> } | null
> ```

***

### sites.versions.list

`hosting.sites.versions.list`

Lists the versions that have been created for the specified site. This list includes versions for both the default `live` channel and any active preview channels for the specified site (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.hosting.sites.versions.list({ parent: 'sites/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The maximum number of versions to return. The service may return a lower number if fewer versions exist than this maximum number. If unspecified, defaults to 25. The maximum value is 100; values above 100 will be coerced to 100. |
| `parent` | `string` | Yes | Required. The site or channel for which to list versions, in either of the following formats: - sites/SITE\_ID - sites/SITE\_ID/channels/CHANNEL\_ID Format: `sites/<id>`. |
| `filter` | `string` | No | A filter string used to return a subset of versions in the response. The currently supported fields for filtering are: `name`, `status`, and `create_time`. Learn more about filtering in Google's [AIP 160 standard](https://google.aip.dev/160). |
| `pageToken` | `string` | No | A token from a previous call to `ListVersions` that tells the server where to resume listing. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `versions` | `object[] \| null` | No | The list of versions, if any exist. |
| `nextPageToken` | `string \| null` | No | The pagination token, if more results exist beyond the ones in this response. Include this token in your next call to `ListVersions`. Page tokens are short-lived and should not be stored. |

> [accordion] versions full type
>
> ```ts theme={null}
> {
>   createUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   status?: string | null,
>   labels?: Record<string, string> | null,
>   deleteTime?: string | null,
>   createTime?: string | null,
>   name?: string | null,
>   fileCount?: string | number | null,
>   deleteUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   finalizeUser?: {
>     email?: string | null,
>     imageUrl?: string | null
>   } | null,
>   finalizeTime?: string | null,
>   versionBytes?: string | number | null,
>   config?: {
>     trailingSlashBehavior?: string | null,
>     redirects?: {
>       glob?: string | null,
>       statusCode?: number | null,
>       location?: string | null,
>       regex?: string | null
>     }[] | null,
>     cleanUrls?: boolean | null,
>     rewrites?: {
>       functionRegion?: string | null,
>       regex?: string | null,
>       dynamicLinks?: boolean | null,
>       path?: string | null,
>       function?: string | null,
>       run?: {
>         region?: string | null,
>         tag?: string | null,
>         serviceId?: string | null
>       } | null,
>       glob?: string | null
>     }[] | null,
>     headers?: {
>       glob?: string | null,
>       headers?: Record<string, string> | null,
>       regex?: string | null
>     }[] | null,
>     i18n?: {
>       root?: string | null
>     } | null,
>     appAssociation?: string | null
>   } | null
> }[] | null
> ```

***

### sites.versions.patch

`hosting.sites.versions.patch`

Updates the specified metadata for the specified version. This method will fail with `FAILED_PRECONDITION` in the event of an invalid state transition

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.hosting.sites.versions.patch({ name: 'sites/demo-project/versions/v1a2b3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | A set of field names from your version that you want to update. A field will be overwritten if, and only if, it's in the mask. If a mask is not provided then a default mask of only `status` will be used. |
| `name` | `string` | Yes | The fully-qualified resource name for the version, in the format: sites/ SITE\_ID/versions/VERSION\_ID This name is provided in the response body when you call `CreateVersion`. Format: `sites/<id>/versions/<id>`. |
| `createUser` | `object` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `status` | `VERSION_STATUS_UNSPECIFIED \| CREATED \| FINALIZED \| DELETED \| ABANDONED \| EXPIRED \| CLONING` | No | The deploy status of the version. For a successful deploy, call `CreateVersion` to make a new version (`CREATED` status), upload all desired files to the version, then update the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling `DeleteVersion`. |
| `labels` | `Record<string, string>` | No | The labels used for extra metadata and/or filtering. |
| `deleteTime` | `string` | No | Output only. The time at which the version was `DELETED`. |
| `createTime` | `string` | No | Output only. The time at which the version was created. |
| `body_name` | `string` | No | The fully-qualified resource name for the version, in the format: sites/ SITE\_ID/versions/VERSION\_ID This name is provided in the response body when you call `CreateVersion`. |
| `fileCount` | `string \| number` | No | Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`. |
| `deleteUser` | `object` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `finalizeUser` | `object` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `finalizeTime` | `string` | No | Output only. The time at which the version was `FINALIZED`. |
| `versionBytes` | `string \| number` | No | Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`. |
| `config` | `object` | No | The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific [priority order](https://firebase.google.com/docs/hosting/full-config#hosting_priority_order). |

> [accordion] createUser full type
>
> ```ts theme={null}
> {
>   email?: string,
>   imageUrl?: string
> }
> ```

> [accordion] deleteUser full type
>
> ```ts theme={null}
> {
>   email?: string,
>   imageUrl?: string
> }
> ```

> [accordion] finalizeUser full type
>
> ```ts theme={null}
> {
>   email?: string,
>   imageUrl?: string
> }
> ```

> [accordion] config full type
>
> ```ts theme={null}
> {
>   trailingSlashBehavior?: TRAILING_SLASH_BEHAVIOR_UNSPECIFIED | ADD | REMOVE,
>   redirects?: {
>     glob?: string,
>     statusCode?: number,
>     location?: string,
>     regex?: string
>   }[],
>   cleanUrls?: boolean,
>   rewrites?: {
>     functionRegion?: string,
>     regex?: string,
>     dynamicLinks?: boolean,
>     path?: string,
>     function?: string,
>     run?: {
>       region?: string,
>       tag?: string,
>       serviceId?: string
>     },
>     glob?: string
>   }[],
>   headers?: {
>     glob?: string,
>     headers?: Record<string, string>,
>     regex?: string
>   }[],
>   i18n?: {
>     root?: string
>   },
>   appAssociation?: AUTO | NONE
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `createUser` | `object \| null` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `status` | `string \| null` | No | The deploy status of the version. For a successful deploy, call `CreateVersion` to make a new version (`CREATED` status), upload all desired files to the version, then update the version to the `FINALIZED` status. Note that if you leave the version in the `CREATED` state for more than 12 hours, the system will automatically mark the version as `ABANDONED`. You can also change the status of a version to `DELETED` by calling `DeleteVersion`. |
| `labels` | `Record<string, string> \| null` | No | The labels used for extra metadata and/or filtering. |
| `deleteTime` | `string \| null` | No | Output only. The time at which the version was `DELETED`. |
| `createTime` | `string \| null` | No | Output only. The time at which the version was created. |
| `name` | `string \| null` | No | The fully-qualified resource name for the version, in the format: sites/ SITE\_ID/versions/VERSION\_ID This name is provided in the response body when you call `CreateVersion`. |
| `fileCount` | `string \| number \| null` | No | Output only. The total number of files associated with the version. This value is calculated after a version is `FINALIZED`. |
| `deleteUser` | `object \| null` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `finalizeUser` | `object \| null` | No | Contains metadata about the user who performed an action, such as creating a release or finalizing a version. |
| `finalizeTime` | `string \| null` | No | Output only. The time at which the version was `FINALIZED`. |
| `versionBytes` | `string \| number \| null` | No | Output only. The total stored bytesize of the version. This value is calculated after a version is `FINALIZED`. |
| `config` | `object \| null` | No | The configuration for how incoming requests to a site should be routed and processed before serving content. The URL request paths are matched against the specified URL patterns in the configuration, then Hosting applies the applicable configuration according to a specific [priority order](https://firebase.google.com/docs/hosting/full-config#hosting_priority_order). |

> [accordion] createUser full type
>
> ```ts theme={null}
> {
>   email?: string | null,
>   imageUrl?: string | null
> } | null
> ```

> [accordion] deleteUser full type
>
> ```ts theme={null}
> {
>   email?: string | null,
>   imageUrl?: string | null
> } | null
> ```

> [accordion] finalizeUser full type
>
> ```ts theme={null}
> {
>   email?: string | null,
>   imageUrl?: string | null
> } | null
> ```

> [accordion] config full type
>
> ```ts theme={null}
> {
>   trailingSlashBehavior?: string | null,
>   redirects?: {
>     glob?: string | null,
>     statusCode?: number | null,
>     location?: string | null,
>     regex?: string | null
>   }[] | null,
>   cleanUrls?: boolean | null,
>   rewrites?: {
>     functionRegion?: string | null,
>     regex?: string | null,
>     dynamicLinks?: boolean | null,
>     path?: string | null,
>     function?: string | null,
>     run?: {
>       region?: string | null,
>       tag?: string | null,
>       serviceId?: string | null
>     } | null,
>     glob?: string | null
>   }[] | null,
>   headers?: {
>     glob?: string | null,
>     headers?: Record<string, string> | null,
>     regex?: string | null
>   }[] | null,
>   i18n?: {
>     root?: string | null
>   } | null,
>   appAssociation?: string | null
> } | null
> ```

***

### sites.versions.populateFiles

`hosting.sites.versions.populateFiles`

Adds content files to the specified version. Each file must be under 2 GB

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.hosting.sites.versions.populateFiles({ parent: 'sites/demo-project/versions/v1a2b3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The version to which to add files, in the format: sites/SITE\_ID /versions/VERSION\_ID Format: `sites/<id>/versions/<id>`. |
| `files` | `Record<string, string>` | No | A set of file paths to the hashes corresponding to assets that should be added to the version. A file path to an empty hash will remove the path from the version. Calculate a hash by Gzipping the file then taking the SHA256 hash of the newly compressed file. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `uploadRequiredHashes` | `string[] \| null` | No | The content hashes of the specified files that need to be uploaded to the specified URL. |
| `uploadUrl` | `string \| null` | No | The URL to which the files should be uploaded, in the format: "[https://upload-firebasehosting.googleapis.com/upload/sites/SITE\_ID](https://upload-firebasehosting.googleapis.com/upload/sites/SITE_ID) /versions/VERSION\_ID/files" Perform a multipart `POST` of the Gzipped file contents to the URL using a forward slash and the hash of the file appended to the end. |

***

## Management

### androidApps.create

`management.androidApps.create`

Requests the creation of a new AndroidApp in the specified FirebaseProject. The result of this call is an `Operation` which can be used to track the provisioning process

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.management.androidApps.create({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The resource name of the parent FirebaseProject in which to create an AndroidApp, in the format: projects/PROJECT\_IDENTIFIER/androidApps Refer to the `FirebaseProject` `name` field for details about PROJECT\_IDENTIFIER values. Format: `projects/<id>`. |
| `apiKeyId` | `string` | No | The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the `AndroidApp`. Be aware that this value is the UID of the API key, *not* the [`keyString`](https://cloud.google.com/api-keys/docs/reference/rest/v2/projects.locations.keys#Key.FIELDS.key_string) of the API key. The `keyString` is the value that can be found in the App's configuration artifact. If `api_key_id` is not set in requests to `androidApps.Create`, then Firebase automatically associates an `api_key_id` with the `AndroidApp`. |
| `displayName` | `string` | No | The user-assigned display name for the `AndroidApp`. |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and it may be sent with update requests to ensure the client has an up-to-date value before proceeding. Learn more about `etag` in Google's [AIP-154 standard](https://google.aip.dev/154#declarative-friendly-resources). This etag is strongly validated. |
| `sha1Hashes` | `string[]` | No | The SHA1 certificate hashes for the AndroidApp. |
| `name` | `string` | No | The resource name of the AndroidApp, in the format: projects/ PROJECT\_IDENTIFIER/androidApps/APP\_ID \* PROJECT\_IDENTIFIER: the parent Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. \* APP\_ID: the globally unique, Firebase-assigned identifier for the App (see `appId`). |
| `packageName` | `string` | No | Immutable. The canonical package name of the Android app as would appear in the Google Play Developer Console. |
| `sha256Hashes` | `string[]` | No | The SHA256 certificate hashes for the AndroidApp. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   code?: number | null,
>   message?: string | null
> } | null
> ```

***

### androidApps.get

`management.androidApps.get`

Gets the specified AndroidApp

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.management.androidApps.get({ name: 'projects/demo-project/androidApps/1:1234567890:android:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the AndroidApp, in the format: projects/ PROJECT\_IDENTIFIER/androidApps/APP\_ID Since an APP\_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/androidApps/APP\_ID Refer to the `AndroidApp` `name` field for details about PROJECT\_IDENTIFIER and APP\_ID values. Format: `projects/<id>/androidApps/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `appId` | `string \| null` | No | Output only. Immutable. The globally unique, Firebase-assigned identifier for the `AndroidApp`. This identifier should be treated as an opaque token, as the data format is not specified. |
| `expireTime` | `string \| null` | No | Output only. If the App has been removed from the Project, this is the timestamp of when the App is considered expired and will be permanently deleted. After this time, the App cannot be undeleted (that is, restored to the Project). This value is only provided if the App is in the `DELETED` state. |
| `apiKeyId` | `string \| null` | No | The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the `AndroidApp`. Be aware that this value is the UID of the API key, *not* the [`keyString`](https://cloud.google.com/api-keys/docs/reference/rest/v2/projects.locations.keys#Key.FIELDS.key_string) of the API key. The `keyString` is the value that can be found in the App's configuration artifact. If `api_key_id` is not set in requests to `androidApps.Create`, then Firebase automatically associates an `api_key_id` with the `AndroidApp`. |
| `displayName` | `string \| null` | No | The user-assigned display name for the `AndroidApp`. |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and it may be sent with update requests to ensure the client has an up-to-date value before proceeding. Learn more about `etag` in Google's [AIP-154 standard](https://google.aip.dev/154#declarative-friendly-resources). This etag is strongly validated. |
| `state` | `string \| null` | No | Output only. The lifecycle state of the App. |
| `sha1Hashes` | `string[] \| null` | No | The SHA1 certificate hashes for the AndroidApp. |
| `name` | `string \| null` | No | The resource name of the AndroidApp, in the format: projects/ PROJECT\_IDENTIFIER/androidApps/APP\_ID \* PROJECT\_IDENTIFIER: the parent Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. \* APP\_ID: the globally unique, Firebase-assigned identifier for the App (see `appId`). |
| `packageName` | `string \| null` | No | Immutable. The canonical package name of the Android app as would appear in the Google Play Developer Console. |
| `projectId` | `string \| null` | No | Output only. Immutable. A user-assigned unique identifier of the parent FirebaseProject for the `AndroidApp`. |
| `sha256Hashes` | `string[] \| null` | No | The SHA256 certificate hashes for the AndroidApp. |

***

### androidApps.getConfig

`management.androidApps.getConfig`

Gets the configuration artifact associated with the specified AndroidApp

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.management.androidApps.getConfig({ name: 'projects/demo-project/androidApps/1:1234567890:android:abc123/config' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the AndroidApp configuration to download, in the format: projects/PROJECT\_IDENTIFIER/androidApps/APP\_ID/config Since an APP\_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/androidApps/APP\_ID Refer to the `AndroidApp` `name` field for details about PROJECT\_IDENTIFIER and APP\_ID values. Format: `projects/<id>/androidApps/<id>/config`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `configFilename` | `string \| null` | No | The filename that the configuration artifact for the `AndroidApp` is typically saved as. For example: `google-services.json` |
| `configFileContents` | `string \| null` | No | The contents of the JSON configuration file. (base64) |

***

### androidApps.list

`management.androidApps.list`

Lists each AndroidApp associated with the specified FirebaseProject. The elements are returned in no particular order, but will be a consistent view of the Apps when additional requests are made with a `pageToken`

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.management.androidApps.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `showDeleted` | `boolean` | No | Controls whether Apps in the DELETED state should be returned in the response. If not specified, only `ACTIVE` Apps will be returned. |
| `pageSize` | `number` | No | The maximum number of Apps to return in the response. The server may return fewer than this at its discretion. If no value is specified (or too large a value is specified), then the server will impose its own limit. |
| `pageToken` | `string` | No | Token returned from a previous call to `ListAndroidApps` indicating where in the set of Apps to resume listing. |
| `parent` | `string` | Yes | The resource name of the parent FirebaseProject for which to list each associated AndroidApp, in the format: projects/PROJECT\_IDENTIFIER /androidApps Refer to the `FirebaseProject` `name` field for details about PROJECT\_IDENTIFIER values. Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | If the result list is too large to fit in a single response, then a token is returned. If the string is empty, then this response is the last page of results. This token can be used in a subsequent call to `ListAndroidApps` to find the next group of Apps. Page tokens are short-lived and should not be persisted. |
| `apps` | `object[] \| null` | No | List of each `AndroidApp` associated with the specified `FirebaseProject`. |

> [accordion] apps full type
>
> ```ts theme={null}
> {
>   appId?: string | null,
>   expireTime?: string | null,
>   apiKeyId?: string | null,
>   displayName?: string | null,
>   etag?: string | null,
>   state?: string | null,
>   sha1Hashes?: string[] | null,
>   name?: string | null,
>   packageName?: string | null,
>   projectId?: string | null,
>   sha256Hashes?: string[] | null
> }[] | null
> ```

***

### androidApps.patch

`management.androidApps.patch`

Updates the attributes of the specified AndroidApp

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.management.androidApps.patch({ name: 'projects/demo-project/androidApps/1:1234567890:android:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Specifies which fields of the AndroidApp to update. Note that the following fields are immutable: `name`, `app_id`, `project_id`, and `package_name`. To update `state`, use any of the following endpoints: RemoveAndroidApp or UndeleteAndroidApp. |
| `name` | `string` | Yes | The resource name of the AndroidApp, in the format: projects/ PROJECT\_IDENTIFIER/androidApps/APP\_ID \* PROJECT\_IDENTIFIER: the parent Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. \* APP\_ID: the globally unique, Firebase-assigned identifier for the App (see `appId`). Format: `projects/<id>/androidApps/<id>`. |
| `apiKeyId` | `string` | No | The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the `AndroidApp`. Be aware that this value is the UID of the API key, *not* the [`keyString`](https://cloud.google.com/api-keys/docs/reference/rest/v2/projects.locations.keys#Key.FIELDS.key_string) of the API key. The `keyString` is the value that can be found in the App's configuration artifact. If `api_key_id` is not set in requests to `androidApps.Create`, then Firebase automatically associates an `api_key_id` with the `AndroidApp`. |
| `displayName` | `string` | No | The user-assigned display name for the `AndroidApp`. |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and it may be sent with update requests to ensure the client has an up-to-date value before proceeding. Learn more about `etag` in Google's [AIP-154 standard](https://google.aip.dev/154#declarative-friendly-resources). This etag is strongly validated. |
| `sha1Hashes` | `string[]` | No | The SHA1 certificate hashes for the AndroidApp. |
| `body_name` | `string` | No | The resource name of the AndroidApp, in the format: projects/ PROJECT\_IDENTIFIER/androidApps/APP\_ID \* PROJECT\_IDENTIFIER: the parent Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. \* APP\_ID: the globally unique, Firebase-assigned identifier for the App (see `appId`). |
| `packageName` | `string` | No | Immutable. The canonical package name of the Android app as would appear in the Google Play Developer Console. |
| `sha256Hashes` | `string[]` | No | The SHA256 certificate hashes for the AndroidApp. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `appId` | `string \| null` | No | Output only. Immutable. The globally unique, Firebase-assigned identifier for the `AndroidApp`. This identifier should be treated as an opaque token, as the data format is not specified. |
| `expireTime` | `string \| null` | No | Output only. If the App has been removed from the Project, this is the timestamp of when the App is considered expired and will be permanently deleted. After this time, the App cannot be undeleted (that is, restored to the Project). This value is only provided if the App is in the `DELETED` state. |
| `apiKeyId` | `string \| null` | No | The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the `AndroidApp`. Be aware that this value is the UID of the API key, *not* the [`keyString`](https://cloud.google.com/api-keys/docs/reference/rest/v2/projects.locations.keys#Key.FIELDS.key_string) of the API key. The `keyString` is the value that can be found in the App's configuration artifact. If `api_key_id` is not set in requests to `androidApps.Create`, then Firebase automatically associates an `api_key_id` with the `AndroidApp`. |
| `displayName` | `string \| null` | No | The user-assigned display name for the `AndroidApp`. |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and it may be sent with update requests to ensure the client has an up-to-date value before proceeding. Learn more about `etag` in Google's [AIP-154 standard](https://google.aip.dev/154#declarative-friendly-resources). This etag is strongly validated. |
| `state` | `string \| null` | No | Output only. The lifecycle state of the App. |
| `sha1Hashes` | `string[] \| null` | No | The SHA1 certificate hashes for the AndroidApp. |
| `name` | `string \| null` | No | The resource name of the AndroidApp, in the format: projects/ PROJECT\_IDENTIFIER/androidApps/APP\_ID \* PROJECT\_IDENTIFIER: the parent Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. \* APP\_ID: the globally unique, Firebase-assigned identifier for the App (see `appId`). |
| `packageName` | `string \| null` | No | Immutable. The canonical package name of the Android app as would appear in the Google Play Developer Console. |
| `projectId` | `string \| null` | No | Output only. Immutable. A user-assigned unique identifier of the parent FirebaseProject for the `AndroidApp`. |
| `sha256Hashes` | `string[] \| null` | No | The SHA256 certificate hashes for the AndroidApp. |

***

### androidApps.remove

`management.androidApps.remove`

Removes the specified AndroidApp from the FirebaseProject

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.management.androidApps.remove({ name: 'projects/demo-project/androidApps/1:1234567890:android:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the AndroidApp, in the format: projects/ PROJECT\_IDENTIFIER/androidApps/APP\_ID Since an APP\_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/androidApps/APP\_ID Refer to the AndroidApp name field for details about PROJECT\_IDENTIFIER and APP\_ID values. Format: `projects/<id>/androidApps/<id>`. |
| `validateOnly` | `boolean` | No | If set to true, the request is only validated. The App will *not* be removed. |
| `allowMissing` | `boolean` | No | If set to true, and the App is not found, the request will succeed but no action will be taken on the server. |
| `immediate` | `boolean` | No | Determines whether to *immediately* delete the AndroidApp. If set to true, the App is immediately deleted from the Project and cannot be undeleted (that is, restored to the Project). If not set, defaults to false, which means the App will be set to expire in 30 days. Within the 30 days, the App may be restored to the Project using UndeleteAndroidApp. |
| `etag` | `string` | No | Checksum provided in the AndroidApp resource. If provided, this checksum ensures that the client has an up-to-date value before proceeding. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   code?: number | null,
>   message?: string | null
> } | null
> ```

***

### androidApps.sha.create

`management.androidApps.sha.create`

Adds a ShaCertificate to the specified AndroidApp

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.management.androidApps.sha.create({ parent: 'projects/demo-project/androidApps/1:1234567890:android:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The resource name of the parent AndroidApp to which to add a ShaCertificate, in the format: projects/PROJECT\_IDENTIFIER/androidApps/ APP\_ID Since an APP\_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/androidApps/APP\_ID Refer to the `AndroidApp` `name` field for details about PROJECT\_IDENTIFIER and APP\_ID values. Format: `projects/<id>/androidApps/<id>`. |
| `shaHash` | `string` | No | The certificate hash for the `AndroidApp`. |
| `certType` | `SHA_CERTIFICATE_TYPE_UNSPECIFIED \| SHA_1 \| SHA_256` | No | The type of SHA certificate encoded in the hash. |
| `name` | `string` | No | The resource name of the ShaCertificate for the AndroidApp, in the format: projects/PROJECT\_IDENTIFIER/androidApps/APP\_ID/sha/SHA\_HASH \* PROJECT\_IDENTIFIER: the parent Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. \* APP\_ID: the globally unique, Firebase-assigned identifier for the App (see `appId`). \* SHA\_HASH: the certificate hash for the App (see `shaHash`). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `shaHash` | `string \| null` | No | The certificate hash for the `AndroidApp`. |
| `certType` | `string \| null` | No | The type of SHA certificate encoded in the hash. |
| `name` | `string \| null` | No | The resource name of the ShaCertificate for the AndroidApp, in the format: projects/PROJECT\_IDENTIFIER/androidApps/APP\_ID/sha/SHA\_HASH \* PROJECT\_IDENTIFIER: the parent Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. \* APP\_ID: the globally unique, Firebase-assigned identifier for the App (see `appId`). \* SHA\_HASH: the certificate hash for the App (see `shaHash`). |

***

### androidApps.sha.delete

`management.androidApps.sha.delete`

Removes a ShaCertificate from the specified AndroidApp

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.management.androidApps.sha.delete({ name: 'projects/demo-project/androidApps/1:1234567890:android:abc123/sha/abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the ShaCertificate to remove from the parent AndroidApp, in the format: projects/PROJECT\_IDENTIFIER/androidApps/APP\_ID /sha/SHA\_HASH Refer to the `ShaCertificate` `name` field for details about PROJECT\_IDENTIFIER, APP\_ID, and SHA\_HASH values. You can obtain the full resource name of the `ShaCertificate` from the response of `ListShaCertificates` or the original `CreateShaCertificate`. Format: `projects/<id>/androidApps/<id>/sha/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### androidApps.sha.list

`management.androidApps.sha.list`

Lists the SHA-1 and SHA-256 certificates for the specified AndroidApp

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.management.androidApps.sha.list({ parent: 'projects/demo-project/androidApps/1:1234567890:android:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The resource name of the parent AndroidApp for which to list each associated ShaCertificate, in the format: projects/PROJECT\_IDENTIFIER /androidApps/APP\_ID Since an APP\_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/androidApps/APP\_ID Refer to the `AndroidApp` `name` field for details about PROJECT\_IDENTIFIER and APP\_ID values. Format: `projects/<id>/androidApps/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `certificates` | `object[] \| null` | No | The list of each `ShaCertificate` associated with the `AndroidApp`. |

> [accordion] certificates full type
>
> ```ts theme={null}
> {
>   shaHash?: string | null,
>   certType?: string | null,
>   name?: string | null
> }[] | null
> ```

***

### androidApps.undelete

`management.androidApps.undelete`

Restores the specified AndroidApp to the FirebaseProject

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.management.androidApps.undelete({ name: 'projects/demo-project/androidApps/1:1234567890:android:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the AndroidApp, in the format: projects/ PROJECT\_IDENTIFIER/androidApps/APP\_ID Since an APP\_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/androidApps/APP\_ID Refer to the AndroidApp name field for details about PROJECT\_IDENTIFIER and APP\_ID values. Format: `projects/<id>/androidApps/<id>`. |
| `etag` | `string` | No | Checksum provided in the AndroidApp resource. If provided, this checksum ensures that the client has an up-to-date value before proceeding. |
| `validateOnly` | `boolean` | No | If set to true, the request is only validated. The App will *not* be undeleted. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   code?: number | null,
>   message?: string | null
> } | null
> ```

***

### availableProjects.list

`management.availableProjects.list`

Lists each [Google Cloud `Project`](https://cloud.google.com/resource-manager/reference/rest/v1/projects) that can have Firebase resources added and Firebase services enabled. A Project will only be listed if: - The caller has sufficient [Google IAM](https://cloud.google.com/iam) permissions to call AddFirebase. - The Project is not already a FirebaseProject. - The Project is not in an... (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.management.availableProjects.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Token returned from a previous call to `ListAvailableProjects` indicating where in the set of Projects to resume listing. |
| `pageSize` | `number` | No | The maximum number of Projects to return in the response. The server may return fewer than this value at its discretion. If no value is specified (or too large a value is specified), the server will impose its own limit. This value cannot be negative. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | If the result list is too large to fit in a single response, then a token is returned. If the string is empty, then this response is the last page of results. This token can be used in a subsequent calls to `ListAvailableProjects` to find the next group of Projects. Page tokens are short-lived and should not be persisted. |
| `projectInfo` | `object[] \| null` | No | The list of Google Cloud `Projects` which can have Firebase resources added to them. |

> [accordion] projectInfo full type
>
> ```ts theme={null}
> {
>   project?: string | null,
>   locationId?: string | null,
>   displayName?: string | null
> }[] | null
> ```

***

### iosApps.create

`management.iosApps.create`

Requests the creation of a new IosApp in the specified FirebaseProject. The result of this call is an `Operation` which can be used to track the provisioning process

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.management.iosApps.create({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The resource name of the parent FirebaseProject in which to create an IosApp, in the format: projects/PROJECT\_IDENTIFIER/iosApps Refer to the `FirebaseProject` `name` field for details about PROJECT\_IDENTIFIER values. Format: `projects/<id>`. |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and it may be sent with update requests to ensure the client has an up-to-date value before proceeding. Learn more about `etag` in Google's [AIP-154 standard](https://google.aip.dev/154#declarative-friendly-resources). This etag is strongly validated. |
| `bundleId` | `string` | No | Immutable. The canonical bundle ID of the iOS app as it would appear in the iOS AppStore. |
| `appStoreId` | `string` | No | The automatically generated Apple ID assigned to the iOS app by Apple in the iOS App Store. |
| `teamId` | `string` | No | The Apple Developer Team ID associated with the App in the App Store. |
| `displayName` | `string` | No | The user-assigned display name for the `IosApp`. |
| `apiKeyId` | `string` | No | The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the `IosApp`. Be aware that this value is the UID of the API key, *not* the [`keyString`](https://cloud.google.com/api-keys/docs/reference/rest/v2/projects.locations.keys#Key.FIELDS.key_string) of the API key. The `keyString` is the value that can be found in the App's configuration artifact. If `api_key_id` is not set in requests to `iosApps.Create`, then Firebase automatically associates an `api_key_id` with the `IosApp`. |
| `name` | `string` | No | The resource name of the IosApp, in the format: projects/PROJECT\_IDENTIFIER /iosApps/APP\_ID \* PROJECT\_IDENTIFIER: the parent Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. \* APP\_ID: the globally unique, Firebase-assigned identifier for the App (see `appId`). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   code?: number | null,
>   message?: string | null
> } | null
> ```

***

### iosApps.get

`management.iosApps.get`

Gets the specified IosApp

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.management.iosApps.get({ name: 'projects/demo-project/iosApps/1:1234567890:ios:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the IosApp, in the format: projects/PROJECT\_IDENTIFIER /iosApps/APP\_ID Since an APP\_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/iosApps/APP\_ID Refer to the `IosApp` `name` field for details about PROJECT\_IDENTIFIER and APP\_ID values. Format: `projects/<id>/iosApps/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expireTime` | `string \| null` | No | Output only. If the App has been removed from the Project, this is the timestamp of when the App is considered expired and will be permanently deleted. After this time, the App cannot be undeleted (that is, restored to the Project). This value is only provided if the App is in the `DELETED` state. |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and it may be sent with update requests to ensure the client has an up-to-date value before proceeding. Learn more about `etag` in Google's [AIP-154 standard](https://google.aip.dev/154#declarative-friendly-resources). This etag is strongly validated. |
| `bundleId` | `string \| null` | No | Immutable. The canonical bundle ID of the iOS app as it would appear in the iOS AppStore. |
| `appStoreId` | `string \| null` | No | The automatically generated Apple ID assigned to the iOS app by Apple in the iOS App Store. |
| `teamId` | `string \| null` | No | The Apple Developer Team ID associated with the App in the App Store. |
| `projectId` | `string \| null` | No | Output only. Immutable. A user-assigned unique identifier of the parent FirebaseProject for the `IosApp`. |
| `displayName` | `string \| null` | No | The user-assigned display name for the `IosApp`. |
| `appId` | `string \| null` | No | Output only. Immutable. The globally unique, Firebase-assigned identifier for the `IosApp`. This identifier should be treated as an opaque token, as the data format is not specified. |
| `apiKeyId` | `string \| null` | No | The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the `IosApp`. Be aware that this value is the UID of the API key, *not* the [`keyString`](https://cloud.google.com/api-keys/docs/reference/rest/v2/projects.locations.keys#Key.FIELDS.key_string) of the API key. The `keyString` is the value that can be found in the App's configuration artifact. If `api_key_id` is not set in requests to `iosApps.Create`, then Firebase automatically associates an `api_key_id` with the `IosApp`. |
| `name` | `string \| null` | No | The resource name of the IosApp, in the format: projects/PROJECT\_IDENTIFIER /iosApps/APP\_ID \* PROJECT\_IDENTIFIER: the parent Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. \* APP\_ID: the globally unique, Firebase-assigned identifier for the App (see `appId`). |
| `state` | `string \| null` | No | Output only. The lifecycle state of the App. |

***

### iosApps.getConfig

`management.iosApps.getConfig`

Gets the configuration artifact associated with the specified IosApp

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.management.iosApps.getConfig({ name: 'projects/demo-project/iosApps/1:1234567890:ios:abc123/config' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the App configuration to download, in the format: projects/PROJECT\_IDENTIFIER/iosApps/APP\_ID/config Since an APP\_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/iosApps/APP\_ID Refer to the `IosApp` `name` field for details about PROJECT\_IDENTIFIER and APP\_ID values. Format: `projects/<id>/iosApps/<id>/config`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `configFilename` | `string \| null` | No | The filename that the configuration artifact for the `IosApp` is typically saved as. For example: `GoogleService-Info.plist` |
| `configFileContents` | `string \| null` | No | The content of the XML configuration file. (base64) |

***

### iosApps.list

`management.iosApps.list`

Lists each IosApp associated with the specified FirebaseProject. The elements are returned in no particular order, but will be a consistent view of the Apps when additional requests are made with a `pageToken`

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.management.iosApps.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The maximum number of Apps to return in the response. The server may return fewer than this at its discretion. If no value is specified (or too large a value is specified), the server will impose its own limit. |
| `showDeleted` | `boolean` | No | Controls whether Apps in the DELETED state should be returned in the response. If not specified, only `ACTIVE` Apps will be returned. |
| `pageToken` | `string` | No | Token returned from a previous call to `ListIosApps` indicating where in the set of Apps to resume listing. |
| `parent` | `string` | Yes | The resource name of the parent FirebaseProject for which to list each associated IosApp, in the format: projects/PROJECT\_IDENTIFIER/iosApps Refer to the `FirebaseProject` `name` field for details about PROJECT\_IDENTIFIER values. Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apps` | `object[] \| null` | No | List of each `IosApp` associated with the specified `FirebaseProject`. |
| `nextPageToken` | `string \| null` | No | If the result list is too large to fit in a single response, then a token is returned. If the string is empty, then this response is the last page of results. This token can be used in a subsequent call to `ListIosApps` to find the next group of Apps. Page tokens are short-lived and should not be persisted. |

> [accordion] apps full type
>
> ```ts theme={null}
> {
>   expireTime?: string | null,
>   etag?: string | null,
>   bundleId?: string | null,
>   appStoreId?: string | null,
>   teamId?: string | null,
>   projectId?: string | null,
>   displayName?: string | null,
>   appId?: string | null,
>   apiKeyId?: string | null,
>   name?: string | null,
>   state?: string | null
> }[] | null
> ```

***

### iosApps.patch

`management.iosApps.patch`

Updates the attributes of the specified IosApp

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.management.iosApps.patch({ name: 'projects/demo-project/iosApps/1:1234567890:ios:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the IosApp, in the format: projects/PROJECT\_IDENTIFIER /iosApps/APP\_ID \* PROJECT\_IDENTIFIER: the parent Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. \* APP\_ID: the globally unique, Firebase-assigned identifier for the App (see `appId`). Format: `projects/<id>/iosApps/<id>`. |
| `updateMask` | `string` | No | Specifies which fields of the IosApp to update. Note that the following fields are immutable: `name`, `app_id`, `project_id`, and `bundle_id`. To update `state`, use any of the following endpoints: RemoveIosApp or UndeleteIosApp. |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and it may be sent with update requests to ensure the client has an up-to-date value before proceeding. Learn more about `etag` in Google's [AIP-154 standard](https://google.aip.dev/154#declarative-friendly-resources). This etag is strongly validated. |
| `bundleId` | `string` | No | Immutable. The canonical bundle ID of the iOS app as it would appear in the iOS AppStore. |
| `appStoreId` | `string` | No | The automatically generated Apple ID assigned to the iOS app by Apple in the iOS App Store. |
| `teamId` | `string` | No | The Apple Developer Team ID associated with the App in the App Store. |
| `displayName` | `string` | No | The user-assigned display name for the `IosApp`. |
| `apiKeyId` | `string` | No | The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the `IosApp`. Be aware that this value is the UID of the API key, *not* the [`keyString`](https://cloud.google.com/api-keys/docs/reference/rest/v2/projects.locations.keys#Key.FIELDS.key_string) of the API key. The `keyString` is the value that can be found in the App's configuration artifact. If `api_key_id` is not set in requests to `iosApps.Create`, then Firebase automatically associates an `api_key_id` with the `IosApp`. |
| `body_name` | `string` | No | The resource name of the IosApp, in the format: projects/PROJECT\_IDENTIFIER /iosApps/APP\_ID \* PROJECT\_IDENTIFIER: the parent Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. \* APP\_ID: the globally unique, Firebase-assigned identifier for the App (see `appId`). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expireTime` | `string \| null` | No | Output only. If the App has been removed from the Project, this is the timestamp of when the App is considered expired and will be permanently deleted. After this time, the App cannot be undeleted (that is, restored to the Project). This value is only provided if the App is in the `DELETED` state. |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and it may be sent with update requests to ensure the client has an up-to-date value before proceeding. Learn more about `etag` in Google's [AIP-154 standard](https://google.aip.dev/154#declarative-friendly-resources). This etag is strongly validated. |
| `bundleId` | `string \| null` | No | Immutable. The canonical bundle ID of the iOS app as it would appear in the iOS AppStore. |
| `appStoreId` | `string \| null` | No | The automatically generated Apple ID assigned to the iOS app by Apple in the iOS App Store. |
| `teamId` | `string \| null` | No | The Apple Developer Team ID associated with the App in the App Store. |
| `projectId` | `string \| null` | No | Output only. Immutable. A user-assigned unique identifier of the parent FirebaseProject for the `IosApp`. |
| `displayName` | `string \| null` | No | The user-assigned display name for the `IosApp`. |
| `appId` | `string \| null` | No | Output only. Immutable. The globally unique, Firebase-assigned identifier for the `IosApp`. This identifier should be treated as an opaque token, as the data format is not specified. |
| `apiKeyId` | `string \| null` | No | The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the `IosApp`. Be aware that this value is the UID of the API key, *not* the [`keyString`](https://cloud.google.com/api-keys/docs/reference/rest/v2/projects.locations.keys#Key.FIELDS.key_string) of the API key. The `keyString` is the value that can be found in the App's configuration artifact. If `api_key_id` is not set in requests to `iosApps.Create`, then Firebase automatically associates an `api_key_id` with the `IosApp`. |
| `name` | `string \| null` | No | The resource name of the IosApp, in the format: projects/PROJECT\_IDENTIFIER /iosApps/APP\_ID \* PROJECT\_IDENTIFIER: the parent Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. \* APP\_ID: the globally unique, Firebase-assigned identifier for the App (see `appId`). |
| `state` | `string \| null` | No | Output only. The lifecycle state of the App. |

***

### iosApps.remove

`management.iosApps.remove`

Removes the specified IosApp from the FirebaseProject

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.management.iosApps.remove({ name: 'projects/demo-project/iosApps/1:1234567890:ios:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the IosApp, in the format: projects/ PROJECT\_IDENTIFIER/iosApps/APP\_ID Since an APP\_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/iosApps/APP\_ID Refer to the IosApp name field for details about PROJECT\_IDENTIFIER and APP\_ID values. Format: `projects/<id>/iosApps/<id>`. |
| `validateOnly` | `boolean` | No | If set to true, the request is only validated. The App will *not* be removed. |
| `etag` | `string` | No | Checksum provided in the IosApp resource. If provided, this checksum ensures that the client has an up-to-date value before proceeding. |
| `allowMissing` | `boolean` | No | If set to true, and the App is not found, the request will succeed but no action will be taken on the server. |
| `immediate` | `boolean` | No | Determines whether to *immediately* delete the IosApp. If set to true, the App is immediately deleted from the Project and cannot be undeleted (that is, restored to the Project). If not set, defaults to false, which means the App will be set to expire in 30 days. Within the 30 days, the App may be restored to the Project using UndeleteIosApp |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   code?: number | null,
>   message?: string | null
> } | null
> ```

***

### iosApps.undelete

`management.iosApps.undelete`

Restores the specified IosApp to the FirebaseProject

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.management.iosApps.undelete({ name: 'projects/demo-project/iosApps/1:1234567890:ios:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the IosApp, in the format: projects/ PROJECT\_IDENTIFIER/iosApps/APP\_ID Since an APP\_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/iosApps/APP\_ID Refer to the IosApp name field for details about PROJECT\_IDENTIFIER and APP\_ID values. Format: `projects/<id>/iosApps/<id>`. |
| `etag` | `string` | No | Checksum provided in the IosApp resource. If provided, this checksum ensures that the client has an up-to-date value before proceeding. |
| `validateOnly` | `boolean` | No | If set to true, the request is only validated. The App will *not* be undeleted. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   code?: number | null,
>   message?: string | null
> } | null
> ```

***

### operations.get

`management.operations.get`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.management.operations.get({ name: 'operations/ada' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The name of the operation resource. Format: `operations/<path>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   code?: number | null,
>   message?: string | null
> } | null
> ```

***

### projects.addFirebase

`management.projects.addFirebase`

Adds Firebase resources and enables Firebase services in the specified existing [Google Cloud `Project`](https://cloud.google.com/resource-manager/reference/rest/v1/projects). Since a FirebaseProject is actually also a Google Cloud `Project`, a `FirebaseProject` has the same underlying Google Cloud identifiers (`projectNumber` and `projectId`)

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.management.projects.addFirebase({ project: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | The resource name of the Google Cloud `Project` in which Firebase resources will be added and Firebase services enabled, in the format: projects/ PROJECT\_IDENTIFIER Refer to the `FirebaseProject` `name` field for details about PROJECT\_IDENTIFIER values. Format: `projects/<id>`. |
| `locationId` | `string` | No | **DEPRECATED.** *Instead, use product-specific REST APIs to work with the location of each resource in a Project. This field may be ignored, especially for newly provisioned projects after October 30, 2024.* The ID of the Project's ["location for default Google Cloud resources"](https://firebase.google.com/docs/projects/locations#default-cloud-location), which are resources associated with Google App Engine. The location must be one of the available [Google App Engine locations](https://cloud.google.com/about/locations#region). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   code?: number | null,
>   message?: string | null
> } | null
> ```

***

### projects.addGoogleAnalytics

`management.projects.addGoogleAnalytics`

Links the specified FirebaseProject with an existing [Google Analytics account](http://www.google.com/analytics/). Using this call, you can either: - Specify an `analyticsAccountId` to provision a new Google Analytics property within the specified account and associate the new property with the `FirebaseProject`. - Specify an existing `analyticsPropertyId` to associate the property with the...

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.management.projects.addGoogleAnalytics({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The resource name of the FirebaseProject to link to an existing Google Analytics account, in the format: projects/PROJECT\_IDENTIFIER Refer to the `FirebaseProject` `name` field for details about PROJECT\_IDENTIFIER values. Format: `projects/<id>`. |
| `analyticsAccountId` | `string` | No | The ID for the existing [Google Analytics account](http://www.google.com/analytics/) that you want to link with the `FirebaseProject`. Specifying this field will provision a new Google Analytics property in your Google Analytics account and associate the new property with the `FirebaseProject`. |
| `analyticsPropertyId` | `string` | No | The ID for the existing Google Analytics property that you want to associate with the `FirebaseProject`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   code?: number | null,
>   message?: string | null
> } | null
> ```

***

### projects.get

`management.projects.get`

Gets the specified FirebaseProject

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.management.projects.get({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the FirebaseProject, in the format: projects/ PROJECT\_IDENTIFIER Refer to the `FirebaseProject` `name` field for details about PROJECT\_IDENTIFIER values. Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectNumber` | `string \| number \| null` | No | Output only. Immutable. The globally unique, Google-assigned canonical identifier for the Project. Use this identifier when configuring integrations and/or making API calls to Firebase or third-party services. |
| `name` | `string \| null` | No | The resource name of the Project, in the format: projects/PROJECT\_IDENTIFIER PROJECT\_IDENTIFIER: the Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. |
| `state` | `string \| null` | No | Output only. The lifecycle state of the Project. |
| `projectId` | `string \| null` | No | Output only. Immutable. A user-assigned unique identifier for the Project. This identifier may appear in URLs or names for some Firebase resources associated with the Project, but it should generally be treated as a convenience alias to reference the Project. |
| `displayName` | `string \| null` | No | The user-assigned display name of the Project. |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and it may be sent with update requests to ensure the client has an up-to-date value before proceeding. Learn more about `etag` in Google's [AIP-154 standard](https://google.aip.dev/154#declarative-friendly-resources). This etag is strongly validated. |
| `annotations` | `Record<string, string> \| null` | No | A set of user-defined annotations for the FirebaseProject. Learn more about annotations in Google's [AIP-128 standard](https://google.aip.dev/128#annotations). These annotations are intended solely for developers and client-side tools. Firebase services will not mutate this annotations set. |
| `resources` | `object \| null` | No | **DEPRECATED.** *Auto-provisioning of these resources is changing, so this object no longer reliably provides information about the resources within the Project. Instead, retrieve information about each resource directly from its resource-specific API.* The default auto-provisioned resources associated with the Project. |

> [accordion] resources full type
>
> ```ts theme={null}
> {
>   hostingSite?: string | null,
>   locationId?: string | null,
>   realtimeDatabaseInstance?: string | null,
>   storageBucket?: string | null
> } | null
> ```

***

### projects.getAdminSdkConfig

`management.projects.getAdminSdkConfig`

Gets the configuration artifact associated with the specified FirebaseProject, which can be used by servers to simplify initialization. Typically, this configuration is used with the Firebase Admin SDK [initializeApp](https://firebase.google.com/docs/admin/setup#initialize_the_sdk) command

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.management.projects.getAdminSdkConfig({ name: 'projects/demo-project/adminSdkConfig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the FirebaseProject, in the format: projects/ PROJECT\_IDENTIFIER/adminSdkConfig Refer to the `FirebaseProject` `name` field for details about PROJECT\_IDENTIFIER values. Format: `projects/<id>/adminSdkConfig`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `locationId` | `string \| null` | No | **DEPRECATED.** *Instead, use product-specific REST APIs to find the location of each resource in a Project. This field may not be populated, especially for newly provisioned projects after October 30, 2024.* The ID of the Project's ["location for default Google Cloud resources"](https://firebase.google.com/docs/projects/locations#default-cloud-location), which are resources associated with Google App Engine. The location is one of the available [App Engine locations](https://cloud.google.com/about/locations#region). |
| `databaseURL` | `string \| null` | No | **DEPRECATED.** \_Instead, find the URL of the default Realtime Database instance using the [list endpoint](https://firebase.google.com/docs/reference/rest/database/database-management/rest/v1beta/projects.locations.instances/list) within the Firebase Realtime Database REST API. If the default instance for the Project has not yet been provisioned, the return might not contain a default instance. |
| `projectId` | `string \| null` | No | Immutable. A user-assigned unique identifier for the `FirebaseProject`. This identifier may appear in URLs or names for some Firebase resources associated with the Project, but it should generally be treated as a convenience alias to reference the Project. |
| `storageBucket` | `string \| null` | No | **DEPRECATED.** *Instead, find the name of the default Cloud Storage for Firebase bucket using the [list endpoint](https://firebase.google.com/docs/reference/rest/storage/rest/v1beta/projects.buckets/list) within the Cloud Storage for Firebase REST API. If the default bucket for the Project has not yet been provisioned, the return might not contain a default bucket. Note that the config that's generated for the Firebase console or the Firebase CLI uses the Cloud Storage for Firebase endpoint to populate this value for that config.* The name of the default Cloud Storage for Firebase bucket. |

***

### projects.getAnalyticsDetails

`management.projects.getAnalyticsDetails`

Gets the Google Analytics details currently associated with the specified FirebaseProject. If the `FirebaseProject` is not yet linked to Google Analytics, then the response to `GetAnalyticsDetails` is `NOT_FOUND`

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.management.projects.getAnalyticsDetails({ name: 'projects/demo-project/analyticsDetails' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the FirebaseProject, in the format: projects/ PROJECT\_IDENTIFIER/analyticsDetails Refer to the `FirebaseProject` `name` field for details about PROJECT\_IDENTIFIER values. Format: `projects/<id>/analyticsDetails`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `streamMappings` | `object[] \| null` | No | - For `AndroidApps` and `IosApps`: a map of `app` to `streamId` for each Firebase App in the specified `FirebaseProject`. Each `app` and `streamId` appears only once. - For `WebApps`: a map of `app` to `streamId` and `measurementId` for each `WebApp` in the specified `FirebaseProject`. Each `app`, `streamId`, and `measurementId` appears only once. |
| `analyticsProperty` | `object \| null` | No | Details of a Google Analytics property |

> [accordion] streamMappings full type
>
> ```ts theme={null}
> {
>   measurementId?: string | null,
>   streamId?: string | number | null,
>   app?: string | null
> }[] | null
> ```

> [accordion] analyticsProperty full type
>
> ```ts theme={null}
> {
>   analyticsAccountId?: string | null,
>   displayName?: string | null,
>   id?: string | null
> } | null
> ```

***

### projects.list

`management.projects.list`

Lists each FirebaseProject accessible to the caller. The elements are returned in no particular order, but they will be a consistent view of the Projects when additional requests are made with a `pageToken`

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.management.projects.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | The maximum number of Projects to return in the response. The server may return fewer than this at its discretion. If no value is specified (or too large a value is specified), the server will impose its own limit. This value cannot be negative. |
| `pageToken` | `string` | No | Token returned from a previous call to `ListFirebaseProjects` indicating where in the set of Projects to resume listing. |
| `showDeleted` | `boolean` | No | Optional. Controls whether Projects in the DELETED state should be returned in the response. If not specified, only `ACTIVE` Projects will be returned. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | If the result list is too large to fit in a single response, then a token is returned. If the string is empty, then this response is the last page of results. This token can be used in a subsequent calls to `ListFirebaseProjects` to find the next group of Projects. Page tokens are short-lived and should not be persisted. |
| `results` | `object[] \| null` | No | One page of the list of Projects that are accessible to the caller. |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   projectNumber?: string | number | null,
>   name?: string | null,
>   state?: string | null,
>   projectId?: string | null,
>   displayName?: string | null,
>   etag?: string | null,
>   annotations?: Record<string, string> | null,
>   resources?: {
>     hostingSite?: string | null,
>     locationId?: string | null,
>     realtimeDatabaseInstance?: string | null,
>     storageBucket?: string | null
>   } | null
> }[] | null
> ```

***

### projects.patch

`management.projects.patch`

Updates the attributes of the specified FirebaseProject. All query parameters are required

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.management.projects.patch({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Specifies which fields of the FirebaseProject to update. Note that the following fields are immutable: `name`, `project_id`, and `project_number`. To update `state`, use any of the following Google Cloud endpoints: [`projects.delete`](https://cloud.google.com/resource-manager/reference/rest/v1/projects/delete) or [`projects.undelete`](https://cloud.google.com/resource-manager/reference/rest/v1/projects/undelete) |
| `name` | `string` | Yes | The resource name of the Project, in the format: projects/PROJECT\_IDENTIFIER PROJECT\_IDENTIFIER: the Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. Format: `projects/<id>`. |
| `body_name` | `string` | No | The resource name of the Project, in the format: projects/PROJECT\_IDENTIFIER PROJECT\_IDENTIFIER: the Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. |
| `displayName` | `string` | No | The user-assigned display name of the Project. |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and it may be sent with update requests to ensure the client has an up-to-date value before proceeding. Learn more about `etag` in Google's [AIP-154 standard](https://google.aip.dev/154#declarative-friendly-resources). This etag is strongly validated. |
| `annotations` | `Record<string, string>` | No | A set of user-defined annotations for the FirebaseProject. Learn more about annotations in Google's [AIP-128 standard](https://google.aip.dev/128#annotations). These annotations are intended solely for developers and client-side tools. Firebase services will not mutate this annotations set. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectNumber` | `string \| number \| null` | No | Output only. Immutable. The globally unique, Google-assigned canonical identifier for the Project. Use this identifier when configuring integrations and/or making API calls to Firebase or third-party services. |
| `name` | `string \| null` | No | The resource name of the Project, in the format: projects/PROJECT\_IDENTIFIER PROJECT\_IDENTIFIER: the Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. |
| `state` | `string \| null` | No | Output only. The lifecycle state of the Project. |
| `projectId` | `string \| null` | No | Output only. Immutable. A user-assigned unique identifier for the Project. This identifier may appear in URLs or names for some Firebase resources associated with the Project, but it should generally be treated as a convenience alias to reference the Project. |
| `displayName` | `string \| null` | No | The user-assigned display name of the Project. |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and it may be sent with update requests to ensure the client has an up-to-date value before proceeding. Learn more about `etag` in Google's [AIP-154 standard](https://google.aip.dev/154#declarative-friendly-resources). This etag is strongly validated. |
| `annotations` | `Record<string, string> \| null` | No | A set of user-defined annotations for the FirebaseProject. Learn more about annotations in Google's [AIP-128 standard](https://google.aip.dev/128#annotations). These annotations are intended solely for developers and client-side tools. Firebase services will not mutate this annotations set. |
| `resources` | `object \| null` | No | **DEPRECATED.** *Auto-provisioning of these resources is changing, so this object no longer reliably provides information about the resources within the Project. Instead, retrieve information about each resource directly from its resource-specific API.* The default auto-provisioned resources associated with the Project. |

> [accordion] resources full type
>
> ```ts theme={null}
> {
>   hostingSite?: string | null,
>   locationId?: string | null,
>   realtimeDatabaseInstance?: string | null,
>   storageBucket?: string | null
> } | null
> ```

***

### projects.removeAnalytics

`management.projects.removeAnalytics`

Unlinks the specified FirebaseProject from its Google Analytics account. This call removes the association of the specified `FirebaseProject` with its current Google Analytics property

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.management.projects.removeAnalytics({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The resource name of the FirebaseProject to unlink from its Google Analytics account, in the format: projects/PROJECT\_IDENTIFIER Refer to the `FirebaseProject` `name` field for details about PROJECT\_IDENTIFIER values. Format: `projects/<id>`. |
| `analyticsPropertyId` | `string` | No | Optional. The ID of the Google Analytics property associated with the specified `FirebaseProject`. - If not set, then the Google Analytics property that is currently associated with the specified `FirebaseProject` is removed. - If set, and the specified `FirebaseProject` is currently associated with a *different* Google Analytics property, then the response is a `412 Precondition Failed` error. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### projects.searchApps

`management.projects.searchApps`

Lists all available Apps for the specified FirebaseProject. This is a convenience method (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.management.projects.searchApps({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The parent FirebaseProject for which to list Apps, in the format: projects/ PROJECT\_IDENTIFIER Refer to the `FirebaseProject` `name` field for details about PROJECT\_IDENTIFIER values. Format: `projects/<id>`. |
| `filter` | `string` | No | A query string compatible with Google's [AIP-160 standard](https://google.aip.dev/160). Use any of the following fields in a query: \* `app_id` \* `namespace` \* `platform` This query also supports the following "virtual" fields. These are fields which are not actually part of the returned resource object, but they can be queried as if they are pre-populated with specific values. \* `sha1_hash` or `sha1_hashes`: This field is considered to be a *repeated* `string` field, populated with the list of all SHA-1 certificate fingerprints registered with the AndroidApp. |
| `pageToken` | `string` | No | Token returned from a previous call to `SearchFirebaseApps` indicating where in the set of Apps to resume listing. |
| `showDeleted` | `boolean` | No | Controls whether Apps in the DELETED state should be returned. If not specified, only `ACTIVE` Apps will be returned. |
| `pageSize` | `number` | No | The maximum number of Apps to return in the response. The server may return fewer than this value at its discretion. If no value is specified (or too large a value is specified), then the server will impose its own limit. This value cannot be negative. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apps` | `object[] \| null` | No | One page of results from a call to `SearchFirebaseApps`. |
| `nextPageToken` | `string \| null` | No | If the result list is too large to fit in a single response, then a token is returned. This token can be used in a subsequent calls to `SearchFirebaseApps` to find the next group of Apps. Page tokens are short-lived and should not be persisted. |

> [accordion] apps full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   name?: string | null,
>   platform?: string | null,
>   displayName?: string | null,
>   namespace?: string | null,
>   expireTime?: string | null,
>   apiKeyId?: string | null,
>   appId?: string | null
> }[] | null
> ```

***

### webApps.create

`management.webApps.create`

Requests the creation of a new WebApp in the specified FirebaseProject. The result of this call is an `Operation` which can be used to track the provisioning process

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.management.webApps.create({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | The resource name of the parent FirebaseProject in which to create a WebApp, in the format: projects/PROJECT\_IDENTIFIER/webApps Refer to the `FirebaseProject` `name` field for details about PROJECT\_IDENTIFIER values. Format: `projects/<id>`. |
| `appUrls` | `string[]` | No | The URLs where the `WebApp` is hosted. |
| `labels` | `Record<string, string>` | No | Optional. Set of labels assigned to the `WebApp`. Valid label keys have two segments: an optional prefix and a name, separated by a slash (`/`). `firebase.*/` prefixes are reserved for Firebase-service use, and `express.cloud/` is reserved for Google Cloud Express. In update requests, `labels` is only replaced when explicitly named in `update_mask` or populated in the request. To change one label, name it in `update_mask` as `labels.`, for example `labels.env`. If the request's `labels` doesn't have that key, the label is removed. Write keys in lowercase. |
| `name` | `string` | No | The resource name of the WebApp, in the format: projects/PROJECT\_IDENTIFIER /webApps/APP\_ID \* PROJECT\_IDENTIFIER: the parent Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. \* APP\_ID: the globally unique, Firebase-assigned identifier for the App (see `appId`). |
| `apiKeyId` | `string` | No | The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the `WebApp`. Be aware that this value is the UID of the API key, *not* the [`keyString`](https://cloud.google.com/api-keys/docs/reference/rest/v2/projects.locations.keys#Key.FIELDS.key_string) of the API key. The `keyString` is the value that can be found in the App's configuration artifact. If `api_key_id` is not set in requests to `webApps.Create`, then Firebase automatically associates an `api_key_id` with the `WebApp`. |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and it may be sent with update requests to ensure the client has an up-to-date value before proceeding. Learn more about `etag` in Google's [AIP-154 standard](https://google.aip.dev/154#declarative-friendly-resources). This etag is strongly validated. |
| `displayName` | `string` | No | The user-assigned display name for the `WebApp`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   code?: number | null,
>   message?: string | null
> } | null
> ```

***

### webApps.get

`management.webApps.get`

Gets the specified WebApp

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.management.webApps.get({ name: 'projects/demo-project/webApps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the WebApp, in the format: projects/PROJECT\_IDENTIFIER /webApps/APP\_ID Since an APP\_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/webApps/APP\_ID Refer to the `WebApp` `name` field for details about PROJECT\_IDENTIFIER and APP\_ID values. Format: `projects/<id>/webApps/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string \| null` | No | Output only. Immutable. A user-assigned unique identifier of the parent FirebaseProject for the `WebApp`. |
| `appUrls` | `string[] \| null` | No | The URLs where the `WebApp` is hosted. |
| `labels` | `Record<string, string> \| null` | No | Optional. Set of labels assigned to the `WebApp`. Valid label keys have two segments: an optional prefix and a name, separated by a slash (`/`). `firebase.*/` prefixes are reserved for Firebase-service use, and `express.cloud/` is reserved for Google Cloud Express. In update requests, `labels` is only replaced when explicitly named in `update_mask` or populated in the request. To change one label, name it in `update_mask` as `labels.`, for example `labels.env`. If the request's `labels` doesn't have that key, the label is removed. Write keys in lowercase. |
| `name` | `string \| null` | No | The resource name of the WebApp, in the format: projects/PROJECT\_IDENTIFIER /webApps/APP\_ID \* PROJECT\_IDENTIFIER: the parent Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. \* APP\_ID: the globally unique, Firebase-assigned identifier for the App (see `appId`). |
| `appId` | `string \| null` | No | Output only. Immutable. The globally unique, Firebase-assigned identifier for the `WebApp`. This identifier should be treated as an opaque token, as the data format is not specified. |
| `webId` | `string \| null` | No | Output only. Immutable. A unique, Firebase-assigned identifier for the `WebApp`. This identifier is only used to populate the `namespace` value for the `WebApp`. For most use cases, use `appId` to identify or reference the App. The `webId` value is only unique within a `FirebaseProject` and its associated Apps. |
| `apiKeyId` | `string \| null` | No | The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the `WebApp`. Be aware that this value is the UID of the API key, *not* the [`keyString`](https://cloud.google.com/api-keys/docs/reference/rest/v2/projects.locations.keys#Key.FIELDS.key_string) of the API key. The `keyString` is the value that can be found in the App's configuration artifact. If `api_key_id` is not set in requests to `webApps.Create`, then Firebase automatically associates an `api_key_id` with the `WebApp`. |
| `expireTime` | `string \| null` | No | Output only. If the App has been removed from the Project, this is the timestamp of when the App is considered expired and will be permanently deleted. After this time, the App cannot be undeleted (that is, restored to the Project). This value is only provided if the App is in the `DELETED` state. |
| `state` | `string \| null` | No | Output only. The lifecycle state of the App. |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and it may be sent with update requests to ensure the client has an up-to-date value before proceeding. Learn more about `etag` in Google's [AIP-154 standard](https://google.aip.dev/154#declarative-friendly-resources). This etag is strongly validated. |
| `displayName` | `string \| null` | No | The user-assigned display name for the `WebApp`. |

***

### webApps.getConfig

`management.webApps.getConfig`

Gets the configuration artifact associated with the specified WebApp

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.management.webApps.getConfig({ name: 'projects/demo-project/webApps/1:1234567890:web:abc123/config' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the WebApp configuration to download, in the format: projects/PROJECT\_IDENTIFIER/webApps/APP\_ID/config Since an APP\_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/webApps/APP\_ID Refer to the `WebApp` `name` field for details about PROJECT\_IDENTIFIER and APP\_ID values. Format: `projects/<id>/webApps/<id>/config`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string \| null` | No | Immutable. A user-assigned unique identifier for the `FirebaseProject`. |
| `version` | `string \| null` | No | Version of the config specification. |
| `storageBucket` | `string \| null` | No | **DEPRECATED.** *Instead, find the name of the default Cloud Storage for Firebase bucket using the [list endpoint](https://firebase.google.com/docs/reference/rest/storage/rest/v1beta/projects.buckets/list) within the Cloud Storage for Firebase REST API. If the default bucket for the Project has not yet been provisioned, the return might not contain a default bucket. Note that the config that's generated for the Firebase console or the Firebase CLI uses the Cloud Storage for Firebase endpoint to populate this value for that config.* The name of the default Cloud Storage for Firebase bucket. |
| `appId` | `string \| null` | No | Immutable. The globally unique, Firebase-assigned identifier for the `WebApp`. |
| `apiKey` | `string \| null` | No | The [`keyString`](https://cloud.google.com/api-keys/docs/reference/rest/v2/projects.locations.keys#Key.FIELDS.key_string) of the API key associated with the `WebApp`. Note that this value is *not* the `apiKeyId` (the UID) of the API key associated with the `WebApp`. |
| `locationId` | `string \| null` | No | **DEPRECATED.** *Instead, use product-specific REST APIs to find the location of each resource in a Project. This field may not be populated, especially for newly provisioned projects after October 30, 2024.* The ID of the Project's ["location for default Google Cloud resources"](https://firebase.google.com/docs/projects/locations#default-cloud-location), which are resources associated with Google App Engine. The location is one of the available [App Engine locations](https://cloud.google.com/about/locations#region). |
| `authDomain` | `string \| null` | No | The domain Firebase Auth configures for OAuth redirects, in the format: PROJECT\_ID.firebaseapp.com |
| `messagingSenderId` | `string \| null` | No | The sender ID for use with Firebase Cloud Messaging. |
| `databaseURL` | `string \| null` | No | **DEPRECATED.** \_Instead, find the URL of the default Realtime Database instance using the [list endpoint](https://firebase.google.com/docs/reference/rest/database/database-management/rest/v1beta/projects.locations.instances/list) within the Firebase Realtime Database REST API. If the default instance for the Project has not yet been provisioned, the return might not contain a default instance. |
| `projectNumber` | `string \| null` | No | Output only. Immutable. The globally unique, Google-assigned canonical identifier for the Project. Use this identifier when configuring integrations and/or making API calls to Google Cloud or third-party services. |
| `recaptchaSiteKey` | `string \| null` | No | Optional. Recaptcha Enterprise site key associated with the Firebase App. |
| `realtimeDatabaseUrl` | `string \| null` | No | Optional. Duplicate field for the URL of the default Realtime Database instances (if the default instance has been provisioned). If the request asks for the V2 config format, this field will be populated instead of `realtime_database_instance_uri`. |
| `measurementId` | `string \| null` | No | The unique Google-assigned identifier of the Google Analytics web stream associated with the `WebApp`. Firebase SDKs use this ID to interact with Google Analytics APIs. This field is only present if the `WebApp` is linked to a web stream in a Google Analytics App + Web property. Learn more about this ID and Google Analytics web streams in the [Analytics documentation](https://support.google.com/analytics/answer/9304153). To generate a `measurementId` and link the `WebApp` with a Google Analytics web stream, call `AddGoogleAnalytics`. |

***

### webApps.list

`management.webApps.list`

Lists each WebApp associated with the specified FirebaseProject. The elements are returned in no particular order, but will be a consistent view of the Apps when additional requests are made with a `pageToken`

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.management.webApps.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `showDeleted` | `boolean` | No | Controls whether Apps in the DELETED state should be returned in the response. If not specified, only `ACTIVE` Apps will be returned. |
| `pageToken` | `string` | No | Token returned from a previous call to `ListWebApps` indicating where in the set of Apps to resume listing. |
| `parent` | `string` | Yes | The resource name of the parent FirebaseProject for which to list each associated WebApp, in the format: projects/PROJECT\_IDENTIFIER/webApps Refer to the `FirebaseProject` `name` field for details about PROJECT\_IDENTIFIER values. Format: `projects/<id>`. |
| `pageSize` | `number` | No | The maximum number of Apps to return in the response. The server may return fewer than this value at its discretion. If no value is specified (or too large a value is specified), then the server will impose its own limit. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `apps` | `object[] \| null` | No | List of each `WebApp` associated with the specified `FirebaseProject`. |
| `nextPageToken` | `string \| null` | No | If the result list is too large to fit in a single response, then a token is returned. If the string is empty, then this response is the last page of results. This token can be used in a subsequent call to `ListWebApps` to find the next group of Apps. Page tokens are short-lived and should not be persisted. |

> [accordion] apps full type
>
> ```ts theme={null}
> {
>   projectId?: string | null,
>   appUrls?: string[] | null,
>   labels?: Record<string, string> | null,
>   name?: string | null,
>   appId?: string | null,
>   webId?: string | null,
>   apiKeyId?: string | null,
>   expireTime?: string | null,
>   state?: string | null,
>   etag?: string | null,
>   displayName?: string | null
> }[] | null
> ```

***

### webApps.patch

`management.webApps.patch`

Updates the attributes of the specified WebApp

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.management.webApps.patch({ name: 'projects/demo-project/webApps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | The resource name of the WebApp, in the format: projects/PROJECT\_IDENTIFIER /webApps/APP\_ID \* PROJECT\_IDENTIFIER: the parent Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. \* APP\_ID: the globally unique, Firebase-assigned identifier for the App (see `appId`). Format: `projects/<id>/webApps/<id>`. |
| `updateMask` | `string` | No | Specifies which fields of the WebApp to update. Note that the following fields are immutable: `name`, `app_id`, and `project_id`. To update `state`, use any of the following endpoints: RemoveWebApp or UndeleteWebApp. |
| `appUrls` | `string[]` | No | The URLs where the `WebApp` is hosted. |
| `labels` | `Record<string, string>` | No | Optional. Set of labels assigned to the `WebApp`. Valid label keys have two segments: an optional prefix and a name, separated by a slash (`/`). `firebase.*/` prefixes are reserved for Firebase-service use, and `express.cloud/` is reserved for Google Cloud Express. In update requests, `labels` is only replaced when explicitly named in `update_mask` or populated in the request. To change one label, name it in `update_mask` as `labels.`, for example `labels.env`. If the request's `labels` doesn't have that key, the label is removed. Write keys in lowercase. |
| `body_name` | `string` | No | The resource name of the WebApp, in the format: projects/PROJECT\_IDENTIFIER /webApps/APP\_ID \* PROJECT\_IDENTIFIER: the parent Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. \* APP\_ID: the globally unique, Firebase-assigned identifier for the App (see `appId`). |
| `apiKeyId` | `string` | No | The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the `WebApp`. Be aware that this value is the UID of the API key, *not* the [`keyString`](https://cloud.google.com/api-keys/docs/reference/rest/v2/projects.locations.keys#Key.FIELDS.key_string) of the API key. The `keyString` is the value that can be found in the App's configuration artifact. If `api_key_id` is not set in requests to `webApps.Create`, then Firebase automatically associates an `api_key_id` with the `WebApp`. |
| `etag` | `string` | No | This checksum is computed by the server based on the value of other fields, and it may be sent with update requests to ensure the client has an up-to-date value before proceeding. Learn more about `etag` in Google's [AIP-154 standard](https://google.aip.dev/154#declarative-friendly-resources). This etag is strongly validated. |
| `displayName` | `string` | No | The user-assigned display name for the `WebApp`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string \| null` | No | Output only. Immutable. A user-assigned unique identifier of the parent FirebaseProject for the `WebApp`. |
| `appUrls` | `string[] \| null` | No | The URLs where the `WebApp` is hosted. |
| `labels` | `Record<string, string> \| null` | No | Optional. Set of labels assigned to the `WebApp`. Valid label keys have two segments: an optional prefix and a name, separated by a slash (`/`). `firebase.*/` prefixes are reserved for Firebase-service use, and `express.cloud/` is reserved for Google Cloud Express. In update requests, `labels` is only replaced when explicitly named in `update_mask` or populated in the request. To change one label, name it in `update_mask` as `labels.`, for example `labels.env`. If the request's `labels` doesn't have that key, the label is removed. Write keys in lowercase. |
| `name` | `string \| null` | No | The resource name of the WebApp, in the format: projects/PROJECT\_IDENTIFIER /webApps/APP\_ID \* PROJECT\_IDENTIFIER: the parent Project's `ProjectNumber` ***(recommended)*** or its `ProjectId`. Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT\_IDENTIFIER in any response body will be the `ProjectId`. \* APP\_ID: the globally unique, Firebase-assigned identifier for the App (see `appId`). |
| `appId` | `string \| null` | No | Output only. Immutable. The globally unique, Firebase-assigned identifier for the `WebApp`. This identifier should be treated as an opaque token, as the data format is not specified. |
| `webId` | `string \| null` | No | Output only. Immutable. A unique, Firebase-assigned identifier for the `WebApp`. This identifier is only used to populate the `namespace` value for the `WebApp`. For most use cases, use `appId` to identify or reference the App. The `webId` value is only unique within a `FirebaseProject` and its associated Apps. |
| `apiKeyId` | `string \| null` | No | The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the `WebApp`. Be aware that this value is the UID of the API key, *not* the [`keyString`](https://cloud.google.com/api-keys/docs/reference/rest/v2/projects.locations.keys#Key.FIELDS.key_string) of the API key. The `keyString` is the value that can be found in the App's configuration artifact. If `api_key_id` is not set in requests to `webApps.Create`, then Firebase automatically associates an `api_key_id` with the `WebApp`. |
| `expireTime` | `string \| null` | No | Output only. If the App has been removed from the Project, this is the timestamp of when the App is considered expired and will be permanently deleted. After this time, the App cannot be undeleted (that is, restored to the Project). This value is only provided if the App is in the `DELETED` state. |
| `state` | `string \| null` | No | Output only. The lifecycle state of the App. |
| `etag` | `string \| null` | No | This checksum is computed by the server based on the value of other fields, and it may be sent with update requests to ensure the client has an up-to-date value before proceeding. Learn more about `etag` in Google's [AIP-154 standard](https://google.aip.dev/154#declarative-friendly-resources). This etag is strongly validated. |
| `displayName` | `string \| null` | No | The user-assigned display name for the `WebApp`. |

***

### webApps.remove

`management.webApps.remove`

Removes the specified WebApp from the FirebaseProject

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.management.webApps.remove({ name: 'projects/demo-project/webApps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the WebApp, in the format: projects/ PROJECT\_IDENTIFIER/webApps/APP\_ID Since an APP\_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/webApps/APP\_ID Refer to the WebApp name field for details about PROJECT\_IDENTIFIER and APP\_ID values. Format: `projects/<id>/webApps/<id>`. |
| `immediate` | `boolean` | No | Determines whether to *immediately* delete the WebApp. If set to true, the App is immediately deleted from the Project and cannot be undeleted (that is, restored to the Project). If not set, defaults to false, which means the App will be set to expire in 30 days. Within the 30 days, the App may be restored to the Project using UndeleteWebApp |
| `etag` | `string` | No | Checksum provided in the WebApp resource. If provided, this checksum ensures that the client has an up-to-date value before proceeding. |
| `allowMissing` | `boolean` | No | If set to true, and the App is not found, the request will succeed but no action will be taken on the server. |
| `validateOnly` | `boolean` | No | If set to true, the request is only validated. The App will *not* be removed. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   code?: number | null,
>   message?: string | null
> } | null
> ```

***

### webApps.undelete

`management.webApps.undelete`

Restores the specified WebApp to the FirebaseProject

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.management.webApps.undelete({ name: 'projects/demo-project/webApps/1:1234567890:web:abc123' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the WebApp, in the format: projects/ PROJECT\_IDENTIFIER/webApps/APP\_ID Since an APP\_ID is a unique identifier, the Unique Resource from Sub-Collection access pattern may be used here, in the format: projects/-/webApps/APP\_ID Refer to the WebApp name field for details about PROJECT\_IDENTIFIER and APP\_ID values. Format: `projects/<id>/webApps/<id>`. |
| `validateOnly` | `boolean` | No | If set to true, the request is only validated. The App will *not* be undeleted. |
| `etag` | `string` | No | Checksum provided in the WebApp resource. If provided, this checksum ensures that the client has an up-to-date value before proceeding. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. |
| `error` | `object \| null` | No | The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `response` | `Record<string, any> \| null` | No | The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   details?: Record<string, any>[] | null,
>   code?: number | null,
>   message?: string | null
> } | null
> ```

***

## Messaging

### messages.send

`messaging.messages.send`

Send a message to a device token, a topic or a condition through FCM v1

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.messaging.messages.send({
	parent: 'projects/demo-project',
	message: {
		topic: 'news',
		notification: { title: 'Hello', body: 'Sent with Corsair' },
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. It contains the Firebase project id (i.e. the unique identifier for your Firebase project), in the format of `projects/{project_id}`. The numeric project number with no padding is also supported in the format of `projects/{project_number}`. Format: `projects/<id>`. |
| `message` | `object` | No | Message to send by Firebase Cloud Messaging Service. |
| `validateOnly` | `boolean` | No | Flag for testing the request without actually delivering the message. |

> [accordion] message full type
>
> ```ts theme={null}
> {
>   name?: string,
>   notification?: {
>     image?: string,
>     body?: string,
>     title?: string
>   },
>   android?: {
>     ttl?: string,
>     notification?: {
>       lightSettings?: {
>         lightOffDuration?: string,
>         color?: {
>           blue?: number,
>           green?: number,
>           alpha?: number,
>           red?: number
>         },
>         lightOnDuration?: string
>       },
>       localOnly?: boolean,
>       title?: string,
>       defaultLightSettings?: boolean,
>       bypassProxyNotification?: boolean,
>       visibility?: VISIBILITY_UNSPECIFIED | PRIVATE | PUBLIC | SECRET,
>       bodyLocArgs?: string[],
>       ticker?: string,
>       defaultVibrateTimings?: boolean,
>       image?: string,
>       clickAction?: string,
>       proxy?: PROXY_UNSPECIFIED | ALLOW | DENY | IF_PRIORITY_LOWERED,
>       eventTime?: string,
>       sticky?: boolean,
>       defaultSound?: boolean,
>       sound?: string,
>       tag?: string,
>       titleLocKey?: string,
>       body?: string,
>       channelId?: string,
>       notificationPriority?: PRIORITY_UNSPECIFIED | PRIORITY_MIN | PRIORITY_LOW | PRIORITY_DEFAULT | PRIORITY_HIGH | PRIORITY_MAX,
>       notificationCount?: number,
>       color?: string,
>       icon?: string,
>       bodyLocKey?: string,
>       vibrateTimings?: string[],
>       titleLocArgs?: string[]
>     },
>     restrictedSatelliteOk?: boolean,
>     priority?: NORMAL | HIGH,
>     fcmOptions?: {
>       analyticsLabel?: string
>     },
>     restrictedPackageName?: string,
>     data?: Record<string, string>,
>     collapseKey?: string,
>     directBootOk?: boolean,
>     bandwidthConstrainedOk?: boolean
>   },
>   webpush?: {
>     data?: Record<string, string>,
>     fcmOptions?: {
>       analyticsLabel?: string,
>       link?: string
>     },
>     headers?: Record<string, string>,
>     notification?: Record<string, any>
>   },
>   data?: Record<string, string>,
>   apns?: {
>     liveActivityToken?: string,
>     fcmOptions?: {
>       image?: string,
>       analyticsLabel?: string
>     },
>     headers?: Record<string, string>,
>     payload?: Record<string, any>
>   },
>   fcmOptions?: {
>     analyticsLabel?: string
>   },
>   token?: string,
>   topic?: string,
>   fid?: string,
>   condition?: string,
>   androidV2?: {
>     fcmOptions?: {
>       analyticsLabel?: string
>     },
>     restrictedSatelliteOk?: boolean,
>     remoteNotification?: {
>       useAsV1DataMessage?: boolean,
>       mutableContent?: boolean,
>       notification?: {
>         channelId?: string,
>         lightSettings?: {
>           lightOffDuration?: string,
>           color?: {
>             blue?: number,
>             green?: number,
>             alpha?: number,
>             red?: number
>           },
>           lightOnDuration?: string
>         },
>         color?: string,
>         notificationPriority?: PRIORITY_UNSPECIFIED | PRIORITY_MIN | PRIORITY_LOW | PRIORITY_DEFAULT | PRIORITY_HIGH | PRIORITY_MAX,
>         sticky?: boolean,
>         id?: number,
>         bodyLocArgs?: string[],
>         eventTime?: string,
>         sound?: string,
>         notificationCount?: number,
>         image?: string,
>         bodyLocKey?: string,
>         body?: string,
>         titleLocArgs?: string[],
>         defaultVibrateTimings?: boolean,
>         titleLocKey?: string,
>         tag?: string,
>         clickAction?: string,
>         title?: string,
>         icon?: string,
>         defaultLightSettings?: boolean,
>         defaultSound?: boolean,
>         ticker?: string,
>         visibility?: VISIBILITY_UNSPECIFIED | PRIVATE | PUBLIC | SECRET,
>         vibrateTimings?: string[],
>         localOnly?: boolean
>       }
>     },
>     data?: Record<string, string>,
>     collapseKey?: string,
>     backgroundSync?: {
>     },
>     restrictedPackageName?: string,
>     ttl?: string,
>     bandwidthConstrainedOk?: boolean,
>     directBootOk?: boolean
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Output Only. The identifier of the message sent, in the format of `projects/*/messages/{message_id}`. |
| `notification` | `object \| null` | No | Basic notification template to use across all platforms. |
| `android` | `object \| null` | No | Android specific options for messages sent through [FCM connection server](https://goo.gl/4GLdUl). |
| `webpush` | `object \| null` | No | [Webpush protocol](https://tools.ietf.org/html/rfc8030) options. |
| `data` | `Record<string, string> \| null` | No | Input only. Arbitrary key/value payload, which must be UTF-8 encoded. The key should not be a reserved word ("from", "message\_type", or any word starting with "google." or "gcm.notification."). When sending payloads containing only data fields to iOS devices, only normal priority (`"apns-priority": "5"`) is allowed in `ApnsConfig`. |
| `apns` | `object \| null` | No | [Apple Push Notification Service](https://goo.gl/MXRTPa) specific options. |
| `fcmOptions` | `object \| null` | No | Platform independent options for features provided by the FCM SDKs. |
| `token` | `string \| null` | No | Deprecated: Use `fid` instead. During the transition period, this field also accepts a Firebase Installation ID (FID). Registration token to send a message to. |
| `topic` | `string \| null` | No | Topic name to send a message to, e.g. "weather". Note: "/topics/" prefix should not be provided. |
| `fid` | `string \| null` | No | Firebase Installation ID (FID) to send a message to. |
| `condition` | `string \| null` | No | Condition to send a message to, e.g. "'foo' in topics && 'bar' in topics". |
| `androidV2` | `object \| null` | No | Android specific V2 options for messages sent through [FCM connection server](https://goo.gl/4GLdUl). This is a v2 version of the AndroidConfig message and will replace it in the v2 API. |

> [accordion] notification full type
>
> ```ts theme={null}
> {
>   image?: string | null,
>   body?: string | null,
>   title?: string | null
> } | null
> ```

> [accordion] android full type
>
> ```ts theme={null}
> {
>   ttl?: string | null,
>   notification?: {
>     lightSettings?: {
>       lightOffDuration?: string | null,
>       color?: {
>         blue?: number | null,
>         green?: number | null,
>         alpha?: number | null,
>         red?: number | null
>       } | null,
>       lightOnDuration?: string | null
>     } | null,
>     localOnly?: boolean | null,
>     title?: string | null,
>     defaultLightSettings?: boolean | null,
>     bypassProxyNotification?: boolean | null,
>     visibility?: string | null,
>     bodyLocArgs?: string[] | null,
>     ticker?: string | null,
>     defaultVibrateTimings?: boolean | null,
>     image?: string | null,
>     clickAction?: string | null,
>     proxy?: string | null,
>     eventTime?: string | null,
>     sticky?: boolean | null,
>     defaultSound?: boolean | null,
>     sound?: string | null,
>     tag?: string | null,
>     titleLocKey?: string | null,
>     body?: string | null,
>     channelId?: string | null,
>     notificationPriority?: string | null,
>     notificationCount?: number | null,
>     color?: string | null,
>     icon?: string | null,
>     bodyLocKey?: string | null,
>     vibrateTimings?: string[] | null,
>     titleLocArgs?: string[] | null
>   } | null,
>   restrictedSatelliteOk?: boolean | null,
>   priority?: string | null,
>   fcmOptions?: {
>     analyticsLabel?: string | null
>   } | null,
>   restrictedPackageName?: string | null,
>   data?: Record<string, string> | null,
>   collapseKey?: string | null,
>   directBootOk?: boolean | null,
>   bandwidthConstrainedOk?: boolean | null
> } | null
> ```

> [accordion] webpush full type
>
> ```ts theme={null}
> {
>   data?: Record<string, string> | null,
>   fcmOptions?: {
>     analyticsLabel?: string | null,
>     link?: string | null
>   } | null,
>   headers?: Record<string, string> | null,
>   notification?: Record<string, any> | null
> } | null
> ```

> [accordion] apns full type
>
> ```ts theme={null}
> {
>   liveActivityToken?: string | null,
>   fcmOptions?: {
>     image?: string | null,
>     analyticsLabel?: string | null
>   } | null,
>   headers?: Record<string, string> | null,
>   payload?: Record<string, any> | null
> } | null
> ```

> [accordion] fcmOptions full type
>
> ```ts theme={null}
> {
>   analyticsLabel?: string | null
> } | null
> ```

> [accordion] androidV2 full type
>
> ```ts theme={null}
> {
>   fcmOptions?: {
>     analyticsLabel?: string | null
>   } | null,
>   restrictedSatelliteOk?: boolean | null,
>   remoteNotification?: {
>     useAsV1DataMessage?: boolean | null,
>     mutableContent?: boolean | null,
>     notification?: {
>       channelId?: string | null,
>       lightSettings?: {
>         lightOffDuration?: string | null,
>         color?: {
>           blue?: number | null,
>           green?: number | null,
>           alpha?: number | null,
>           red?: number | null
>         } | null,
>         lightOnDuration?: string | null
>       } | null,
>       color?: string | null,
>       notificationPriority?: string | null,
>       sticky?: boolean | null,
>       id?: number | null,
>       bodyLocArgs?: string[] | null,
>       eventTime?: string | null,
>       sound?: string | null,
>       notificationCount?: number | null,
>       image?: string | null,
>       bodyLocKey?: string | null,
>       body?: string | null,
>       titleLocArgs?: string[] | null,
>       defaultVibrateTimings?: boolean | null,
>       titleLocKey?: string | null,
>       tag?: string | null,
>       clickAction?: string | null,
>       title?: string | null,
>       icon?: string | null,
>       defaultLightSettings?: boolean | null,
>       defaultSound?: boolean | null,
>       ticker?: string | null,
>       visibility?: string | null,
>       vibrateTimings?: string[] | null,
>       localOnly?: boolean | null
>     } | null
>   } | null,
>   data?: Record<string, string> | null,
>   collapseKey?: string | null,
>   backgroundSync?: {
>   } | null,
>   restrictedPackageName?: string | null,
>   ttl?: string | null,
>   bandwidthConstrainedOk?: boolean | null,
>   directBootOk?: boolean | null
> } | null
> ```

***

### registrations.topicSubscriptions.create

`messaging.registrations.topicSubscriptions.create`

Creates a TopicSubscription. Subscribes an app installation instance (by registration\_id, either FID or FCM Token) to a topicSubscription

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.messaging.registrations.topicSubscriptions.create({ parent: 'projects/demo-project/registrations/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `topicName` | `string` | No | Required. The ID to use for the subscription, which is the topic name. This will become the last segment of the TopicSubscription's resource name. Topic names match the pattern of "\[a-zA-Z0-9-\_.\~%]\{1,900}". |
| `parent` | `string` | Yes | Required. The parent resource where this subscription will be created. Format: projects/\{project}/registrations/\{registration} The \{registration} part can be an FID or an FCM Token. Format: `projects/<id>/registrations/<id>`. |
| `name` | `string` | No | Identifier. The resource name of the subscription. Format: projects/\{project}/registrations/\{registration}/topicSubscriptions/\{topicSubscription} The \{registration} part contains the registration ID (e.g., FID). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Identifier. The resource name of the subscription. Format: projects/\{project}/registrations/\{registration}/topicSubscriptions/\{topicSubscription} The \{registration} part contains the registration ID (e.g., FID). |
| `topicName` | `string \| null` | No | Output only. The ID of the TopicSubscription, which is the topic name. This corresponds to the \{topicSubscription} segment in the resource name. Topic names match the pattern of "\[a-zA-Z0-9-\_.\~%]\{1,900}". |
| `createTime` | `string \| null` | No | Output only. Time when the subscription was created. |

***

### registrations.topicSubscriptions.delete

`messaging.registrations.topicSubscriptions.delete`

Deletes a TopicSubscription

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.messaging.registrations.topicSubscriptions.delete({ name: 'projects/demo-project/registrations/x1/topicSubscriptions/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `allowMissing` | `boolean` | No | Optional. If set to true, and the topic subscription is not found, the request will succeed but no action will be taken on the server. |
| `name` | `string` | Yes | Required. The name of the topic subscription to delete. Format: projects/\{project}/registrations/\{registration}/topicSubscriptions/\{topicSubscription} Format: `projects/<id>/registrations/<id>/topicSubscriptions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### registrations.topicSubscriptions.get

`messaging.registrations.topicSubscriptions.get`

Gets a TopicSubscription

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.messaging.registrations.topicSubscriptions.get({ name: 'projects/demo-project/registrations/x1/topicSubscriptions/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the topic subscription to retrieve. Format: projects/\{project}/registrations/\{registration}/topicSubscriptions/\{topicSubscription} Format: `projects/<id>/registrations/<id>/topicSubscriptions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Identifier. The resource name of the subscription. Format: projects/\{project}/registrations/\{registration}/topicSubscriptions/\{topicSubscription} The \{registration} part contains the registration ID (e.g., FID). |
| `topicName` | `string \| null` | No | Output only. The ID of the TopicSubscription, which is the topic name. This corresponds to the \{topicSubscription} segment in the resource name. Topic names match the pattern of "\[a-zA-Z0-9-\_.\~%]\{1,900}". |
| `createTime` | `string \| null` | No | Output only. Time when the subscription was created. |

***

### registrations.topicSubscriptions.list

`messaging.registrations.topicSubscriptions.list`

Lists TopicSubscriptions for a given app instance (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.messaging.registrations.topicSubscriptions.list({ parent: 'projects/demo-project/registrations/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of subscriptions to return. The service may return fewer than this value. If unspecified, at most 1000 subscriptions will be returned. The maximum value is 2000; values above 2000 will be coerced to 2000. |
| `parent` | `string` | Yes | Required. The parent resource, which owns this collection of subscriptions. Format: projects/\{project}/registrations/\{registration} The \{registration} part can be an FID or an FCM Token. Format: `projects/<id>/registrations/<id>`. |
| `pageToken` | `string` | No | Optional. A page token, received from a previous `ListTopicSubscriptions` call. Provide this to retrieve the subsequent page. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| `topicSubscriptions` | `object[] \| null` | No | The topic subscriptions for the instance. |

> [accordion] topicSubscriptions full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   topicName?: string | null,
>   createTime?: string | null
> }[] | null
> ```

***

### registrations.topicSubscriptions.patch

`messaging.registrations.topicSubscriptions.patch`

Updates a TopicSubscription. Subscribes an app installation instance by registration\_id, either FID or FCM Token, to a topicSubscription

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.messaging.registrations.topicSubscriptions.patch({ name: 'projects/demo-project/registrations/x1/topicSubscriptions/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Identifier. The resource name of the subscription. Format: projects/\{project}/registrations/\{registration}/topicSubscriptions/\{topicSubscription} The \{registration} part contains the registration ID (e.g., FID). Format: `projects/<id>/registrations/<id>/topicSubscriptions/<id>`. |
| `allowMissing` | `boolean` | No | Optional. If set to true, and the topic subscription is not found, a new topic subscription will be created. |
| `body_name` | `string` | No | Identifier. The resource name of the subscription. Format: projects/\{project}/registrations/\{registration}/topicSubscriptions/\{topicSubscription} The \{registration} part contains the registration ID (e.g., FID). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Identifier. The resource name of the subscription. Format: projects/\{project}/registrations/\{registration}/topicSubscriptions/\{topicSubscription} The \{registration} part contains the registration ID (e.g., FID). |
| `topicName` | `string \| null` | No | Output only. The ID of the TopicSubscription, which is the topic name. This corresponds to the \{topicSubscription} segment in the resource name. Topic names match the pattern of "\[a-zA-Z0-9-\_.\~%]\{1,900}". |
| `createTime` | `string \| null` | No | Output only. Time when the subscription was created. |

***

## Remote Config

### namespaces.experiments.delete

`remoteConfig.namespaces.experiments.delete`

Delete an experiment. --- **BETA:** This API is in a Beta launch stage. It is intended for public testing and feedback

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.experiments.delete({ name: 'projects/demo-project/namespaces/firebase/experiments/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the experiment to delete. Format: projects/\{project}/namespaces/\{namespace}/experiments/\{experiment\_id} Format: `projects/<id>/namespaces/<id>/experiments/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### namespaces.experiments.get

`remoteConfig.namespaces.experiments.get`

Get information about an existing experiment. Additional responses codes: NOT\_FOUND: The experiment does not exist. --- **BETA:** This API is in a Beta launch stage

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.experiments.get({ name: 'projects/demo-project/namespaces/firebase/experiments/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the experiment to get. Format: projects/\{project}/namespaces/\{namespace}/experiments/\{experiment\_id} Format: `projects/<id>/namespaces/<id>/experiments/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `state` | `string \| null` | No | Output only. The experiment state. |
| `lastUpdateTime` | `string \| null` | No | Output only. The time when the experiment was last updated. |
| `startTime` | `string \| null` | No | Output only. The time when the experiment was started. |
| `name` | `string \| null` | No | Required. Identifier. The name of the experiment to get. Format: projects/\{project}/namespaces/\{namespace}/experiments/\{experiment\_id} |
| `etag` | `string \| null` | No | The etag of the experiment. |
| `endTime` | `string \| null` | No | Output only. The time when the experiment was ended. |
| `definition` | `object \| null` | No | The definition of an experiment, detailing its name, description, objectives, variants, and other settings. |

> [accordion] definition full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   service?: string | null,
>   variants?: {
>     weight?: number | null,
>     name?: string | null
>   }[] | null,
>   objectives?: {
>     activationEvent?: {
>       event?: string | null
>     } | null,
>     eventObjectives?: {
>       isPrimary?: boolean | null,
>       customObjectiveDetails?: {
>         countType?: string | null,
>         event?: string | null
>       } | null,
>       systemObjectiveDetails?: {
>         objective?: string | null
>       } | null,
>       abtOptimizationFunction?: string | null
>     }[] | null
>   } | null,
>   displayName?: string | null
> } | null
> ```

***

### namespaces.experiments.list

`remoteConfig.namespaces.experiments.list`

List all experiments for a project. --- **BETA:** This API is in a Beta launch stage. It is intended for public testing and feedback (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.experiments.list({ parent: 'projects/demo-project/namespaces/firebase' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Optional. The token for the specific page to retrieve. |
| `parent` | `string` | Yes | Required. The parent project for which to list experiments. Format: projects/\{project}/namespaces/\{namespace} Format: `projects/<id>/namespaces/<id>`. |
| `filter` | `string` | No | Optional. Filter expression following AIP-160 The following filters are supported: name: String. The experiment name. |
| `pageSize` | `number` | No | Optional. The maximum number of items to return per page. If not specified, defaults to 100. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `experiments` | `object[] \| null` | No | List of experiments |
| `nextPageToken` | `string \| null` | No | Token for the next page |

> [accordion] experiments full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   lastUpdateTime?: string | null,
>   startTime?: string | null,
>   name?: string | null,
>   etag?: string | null,
>   endTime?: string | null,
>   definition?: {
>     description?: string | null,
>     service?: string | null,
>     variants?: {
>       weight?: number | null,
>       name?: string | null
>     }[] | null,
>     objectives?: {
>       activationEvent?: {
>         event?: string | null
>       } | null,
>       eventObjectives?: {
>         isPrimary?: boolean | null,
>         customObjectiveDetails?: {
>           countType?: string | null,
>           event?: string | null
>         } | null,
>         systemObjectiveDetails?: {
>           objective?: string | null
>         } | null,
>         abtOptimizationFunction?: string | null
>       }[] | null
>     } | null,
>     displayName?: string | null
>   } | null
> }[] | null
> ```

***

### namespaces.fetch

`remoteConfig.namespaces.fetch`

Fetch parameter values and any Firebase A/B Testing experiment information for the calling device. An ETag header is also returned

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.fetch({ project: 'demo-project', namespace: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Required. The Firebase project ID or project number. (NOTE: These identifiers can be retrieved from the Firebase console.) |
| `namespace` | `string` | Yes | Required. The string "firebase". |
| `appId` | `string` | No | Required. If not specified, fetch will return 400 (Bad Request). GMP App id. |
| `appVersion` | `string` | No | Optional - If omitted and the template has any conditions that depend on app\_version, they will be evaluated as false. App version, using the native app version format on the client's OS. Examples: 0, 123, 0123, 1.2.3, 001.33.043.321.55 . |
| `appBuild` | `string` | No | Optional - If omitted and the template has any conditions that depend on app\_build, they will be evaluated as false. \* On Android, this is the Version Code, which is a positive integer, e.g., 42. \* On iOS, this is the CFBundleVersion, which is a string comprised of three non-negative, period-separated integers with the first integer being greater than zero—for example, 3.1.2. \* On Web, the concept of a build number is not well defined, and thus should not be set. |
| `appInstanceIdToken` | `string` | No | Required. The instance id token of the app, which is retrieved using the default scope. If specified incorrectly, and if the template has any percentile conditions, they will be evaluated to false. If omitted, fetch can lead to a 400 response code (Bad Request). |
| `countryCode` | `string` | No | Optional - If omitted and the template has any conditions that depend on country\_code, they will be evaluated as false. Should be 2 lower-case letters, e.g. "us", "tr", or "gb", as defined in ISO 3166-1 alpha-2. This is case-insensitive. See [https://www.iso.org/obp/ui/#search](https://www.iso.org/obp/ui/#search) . |
| `packageName` | `string` | No | Optional - If omitted, the project's default package will be fetched. Name of the package for which we are fetching data from. Should match the app name for Android apps, or the corresponding entity (e.g. bundle name) for iOS apps. |
| `languageCode` | `string` | No | Optional - If omitted and the template has any conditions that depend on locale, they will be evaluated as false. The default locale of the device, in BCP47 format, for example "en-US". This is case-insensitive. See [https://www.w3.org/International/core/langtags/rfc3066bis.html](https://www.w3.org/International/core/langtags/rfc3066bis.html) . |
| `timeZone` | `string` | No | Optional - If omitted and the template has any conditions that depend on timezone, they will be evaluated as false. The timezone id of the device, in Olson Id format, e.g. "America/Los\_Angeles". |
| `appInstanceId` | `string` | No | Required. The instance id of the app. If unspecified, fetch will return 400 (Bad Request). Refer to [https://firebase.google.com/support/privacy/manage-iids](https://firebase.google.com/support/privacy/manage-iids). |
| `analyticsUserProperties` | `Record<string, string>` | No | Optional - List of Analytics user properties. |
| `customSignals` | `Record<string, string>` | No | Optional. Optional - List of Custom Signals. |
| `sdkVersion` | `string` | No | Optional - Version of the Firebase Remote Config SDK. This number is hard-coded into each client. |
| `platformVersion` | `string` | No | Optional - If omitted and the template has any conditions that depend on platform version, they will be evaluated as false. The version string of the device, e.g. "21" for (Android) Lollipop, or (for iOS) three non-negative, period separated integers, e.g. "9.0.0". |
| `firstOpenTime` | `string` | No | The first time a user launches an app after installing or re-installing it. This value comes from GA, and will not be set if GA SDK is not available on the client or if GA does not have the first-open time value. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `rolloutMetadata` | `object[] \| null` | No | Metadata describing active Remote Config rollouts which are related to parameters delivered via this fetch response. |
| `state` | `string \| null` | No | The state of the fetched response. |
| `entries` | `Record<string, string> \| null` | No | The Key-Value pairs of the config. |
| `experimentDescriptions` | `object[] \| null` | No | Firebase A/B Testing experiment configuration and metadata. |
| `personalizationMetadata` | `object \| null` | No | A map of Remote Config parameter key to Firebase Personalization related metadata that should be delivered to the particular device making the fetch call. |
| `appName` | `string \| null` | No | For Android apps, app\_name is the package name of the app. For iOS apps, it is the bundle name. |
| `templateVersion` | `string \| number \| null` | No | Used to record the current template in the response. |

> [accordion] rolloutMetadata full type
>
> ```ts theme={null}
> {
>   variantId?: string | null,
>   affectedParameterKeys?: string[] | null,
>   rolloutId?: string | null
> }[] | null
> ```

> [accordion] experimentDescriptions full type
>
> ```ts theme={null}
> {
>   affectedParameterKeys?: string[] | null,
>   experimentStartTime?: string | null,
>   timeToLiveMillis?: string | number | null,
>   triggerEvent?: string | null,
>   variantId?: string | null,
>   triggerTimeoutMillis?: string | number | null,
>   experimentId?: string | null
> }[] | null
> ```

> [accordion] personalizationMetadata full type
>
> ```ts theme={null}
> Record<string, {
>   armIndex?: number | null,
>   personalizationId?: string | null,
>   group?: string | null,
>   choiceId?: string | null
> }> | null
> ```

***

### namespaces.get

`remoteConfig.namespaces.get`

Gets a namespace object by name. The namespace provided in \[GetNamespaceRequest.name] must be "firebase" (for the client-side template) or "firebase-server" (for the server-side template)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.get({ name: 'projects/demo-project/namespaces/firebase' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the namespace to get. Format: projects/\{project}/namespaces/\{namespace} Format: `projects/<id>/namespaces/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Required. Identifier. The name of the namespace. |

***

### namespaces.getConditionOrder

`remoteConfig.namespaces.getConditionOrder`

Get a project's ConditionOrder

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.getConditionOrder({ name: 'projects/demo-project/namespaces/firebase/conditionOrder' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the condition order singleton. Format: projects/\{project}/namespaces/\{namespace}/conditionOrder Format: `projects/<id>/namespaces/<id>/conditionOrder`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Required. Identifier. The resource name of the condition order singleton. Format: projects/\{project}/namespaces/\{namespace}/conditionOrder |
| `etag` | `string \| null` | No | The current ETag of the condition order for optimistic concurrency. |
| `conditionIds` | `string[] \| null` | No | Required. The ordered list of condition IDs in descending priority. |

***

### namespaces.getRemoteConfig

`remoteConfig.namespaces.getRemoteConfig`

Get a project's Remote Config template and associated ETag header. Returns the requested RemoteConfig as the payload and an ETag as a response header

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.getRemoteConfig({ name: 'projects/demo-project/namespaces/firebase/remoteConfig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `versionNumber` | `string \| number` | No | Optional. Version number of the RemoteConfig to look up. If not specified, the latest RemoteConfig will be returned. |
| `name` | `string` | Yes | Optional. The name of the RemoteConfig to get. Format: projects/\{project}/namespaces/\{namespace}/remoteConfig Project is a Firebase project ID or project number. Namespace is the namespace ID (e.g.: 'firebase' or 'firebase-server') Format: `projects/<id>/namespaces/<id>/remoteConfig`. |
| `project` | `string` | No | Required. The Firebase project's Project ID or Project Number, prefixed with "projects/". |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `conditions` | `object[] \| null` | No | A list of conditions in descending order by priority. The values of the google.firebase.remoteconfig.v1.RemoteConfigCondition.name entries must be unique. |
| `parameterGroups` | `object \| null` | No | Map of parameter group names to their descriptions and grouped parameters. A group's name is mutable but must be unique among groups in the config. The name is limited to 256 characters and intended to be human-readable. Any Unicode characters are allowed. Groups have a list of parameters which allows users of the API to group parameters that are associated with the same feature or theme together for easy organizational access. |
| `version` | `object \| null` | No | Contains all metadata about a particular version of the Remote Config template. All fields are set at the time the specified Remote Config template was written. |
| `parameters` | `object \| null` | No | Map of parameter keys to their optional default values and optional conditional values. |
| `etag` | `string \| null` | No | The ETag of this template (from the response header). Pass it as `ifMatch` to publish a change, so a publish made in between is not overwritten. |

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   expression?: string | null,
>   name?: string | null,
>   etag?: string | null,
>   tagColor?: string | null
> }[] | null
> ```

> [accordion] parameterGroups full type
>
> ```ts theme={null}
> Record<string, {
>   parameters?: Record<string, {
>     conditionalValues?: Record<string, {
>       personalizationValue?: {
>         personalizationId?: string | null
>       } | null,
>       value?: string | null,
>       experimentValue?: {
>         experimentId?: string | null,
>         exposurePercent?: number | null,
>         variantValue?: {
>           value?: string | null,
>           noChange?: boolean | null,
>           variantId?: string | null
>         }[] | null
>       } | null,
>       rolloutValue?: {
>         value?: string | null,
>         percent?: number | null,
>         rolloutId?: string | null
>       } | null,
>       useInAppDefault?: boolean | null
>     }> | null,
>     name?: string | null,
>     etag?: string | null,
>     defaultValue?: {
>       personalizationValue?: {
>         personalizationId?: string | null
>       } | null,
>       value?: string | null,
>       experimentValue?: {
>         experimentId?: string | null,
>         exposurePercent?: number | null,
>         variantValue?: {
>           value?: string | null,
>           noChange?: boolean | null,
>           variantId?: string | null
>         }[] | null
>       } | null,
>       rolloutValue?: {
>         value?: string | null,
>         percent?: number | null,
>         rolloutId?: string | null
>       } | null,
>       useInAppDefault?: boolean | null
>     } | null,
>     valueType?: string | null,
>     description?: string | null
>   }> | null,
>   description?: string | null,
>   name?: string | null,
>   etag?: string | null
> }> | null
> ```

> [accordion] version full type
>
> ```ts theme={null}
> {
>   rollbackSource?: string | number | null,
>   description?: string | null,
>   updateUser?: {
>     email?: string | null,
>     imageUrl?: string | null,
>     name?: string | null
>   } | null,
>   updateType?: string | null,
>   isLegacy?: boolean | null,
>   versionNumber?: string | number | null,
>   updateOrigin?: string | null,
>   updateTime?: string | null
> } | null
> ```

> [accordion] parameters full type
>
> ```ts theme={null}
> Record<string, {
>   conditionalValues?: Record<string, {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   }> | null,
>   name?: string | null,
>   etag?: string | null,
>   defaultValue?: {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   } | null,
>   valueType?: string | null,
>   description?: string | null
> }> | null
> ```

***

### namespaces.getServerRemoteConfig

`remoteConfig.namespaces.getServerRemoteConfig`

Get a project's server-side Remote Config template. Note that this request proto is structured differently from other request messages in this proto, however this is consistent and compliant with the new API guidance ([https://google.aip.dev/122#fields-representing-resource-names](https://google.aip.dev/122#fields-representing-resource-names)) and the standard going forward

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.getServerRemoteConfig({ name: 'projects/demo-project/namespaces/firebase/serverRemoteConfig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the template to get. Format: projects/\{project}/namespaces/\{namespace}/serverRemoteConfig Project is a Firebase project ID or project number. Namespace is the namespace ID (e.g.: firebase-server) Format: `projects/<id>/namespaces/<id>/serverRemoteConfig`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `conditions` | `object[] \| null` | No | A list of conditions in descending order by priority. |
| `version` | `object \| null` | No | Contains all metadata about a particular version of the Remote Config template. All fields are set at the time the specified Remote Config template was written. |
| `parameters` | `object \| null` | No | Map of parameter keys to their optional default values and optional conditional values. |

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   condition?: {
>     orCondition?: {
>       conditions?: {
>         orCondition?: {
>           conditions?: (recursive)[] | null
>         } | null,
>         percent?: {
>           percentOperator?: string | null,
>           microPercentRange?: {
>             microPercentLowerBound?: number | null,
>             microPercentUpperBound?: number | null
>           } | null,
>           microPercent?: number | null,
>           seed?: string | null
>         } | null,
>         customSignal?: {
>           customSignalOperator?: string | null,
>           targetCustomSignalValues?: string[] | null,
>           customSignalKey?: string | null
>         } | null,
>         andCondition?: {
>           conditions?: {
>             orCondition?: {
>               conditions?: (recursive)[] | null
>             } | null,
>             percent?: {
>               percentOperator?: string | null,
>               microPercentRange?: {
>                 microPercentLowerBound?: number | null,
>                 microPercentUpperBound?: number | null
>               } | null,
>               microPercent?: number | null,
>               seed?: string | null
>             } | null,
>             customSignal?: {
>               customSignalOperator?: string | null,
>               targetCustomSignalValues?: string[] | null,
>               customSignalKey?: string | null
>             } | null,
>             andCondition?: {
>               conditions?: (recursive)[] | null
>             } | null
>           }[] | null
>         } | null
>       }[] | null
>     } | null,
>     percent?: {
>       percentOperator?: string | null,
>       microPercentRange?: {
>         microPercentLowerBound?: number | null,
>         microPercentUpperBound?: number | null
>       } | null,
>       microPercent?: number | null,
>       seed?: string | null
>     } | null,
>     customSignal?: {
>       customSignalOperator?: string | null,
>       targetCustomSignalValues?: string[] | null,
>       customSignalKey?: string | null
>     } | null,
>     andCondition?: {
>       conditions?: {
>         orCondition?: {
>           conditions?: {
>             orCondition?: {
>               conditions?: (recursive)[] | null
>             } | null,
>             percent?: {
>               percentOperator?: string | null,
>               microPercentRange?: {
>                 microPercentLowerBound?: number | null,
>                 microPercentUpperBound?: number | null
>               } | null,
>               microPercent?: number | null,
>               seed?: string | null
>             } | null,
>             customSignal?: {
>               customSignalOperator?: string | null,
>               targetCustomSignalValues?: string[] | null,
>               customSignalKey?: string | null
>             } | null,
>             andCondition?: {
>               conditions?: (recursive)[] | null
>             } | null
>           }[] | null
>         } | null,
>         percent?: {
>           percentOperator?: string | null,
>           microPercentRange?: {
>             microPercentLowerBound?: number | null,
>             microPercentUpperBound?: number | null
>           } | null,
>           microPercent?: number | null,
>           seed?: string | null
>         } | null,
>         customSignal?: {
>           customSignalOperator?: string | null,
>           targetCustomSignalValues?: string[] | null,
>           customSignalKey?: string | null
>         } | null,
>         andCondition?: {
>           conditions?: (recursive)[] | null
>         } | null
>       }[] | null
>     } | null
>   } | null,
>   name?: string | null
> }[] | null
> ```

> [accordion] version full type
>
> ```ts theme={null}
> {
>   rollbackSource?: string | number | null,
>   description?: string | null,
>   updateUser?: {
>     email?: string | null,
>     imageUrl?: string | null,
>     name?: string | null
>   } | null,
>   updateType?: string | null,
>   isLegacy?: boolean | null,
>   versionNumber?: string | number | null,
>   updateOrigin?: string | null,
>   updateTime?: string | null
> } | null
> ```

> [accordion] parameters full type
>
> ```ts theme={null}
> Record<string, {
>   conditionalValues?: Record<string, {
>     value?: string | null,
>     useInAppDefault?: boolean | null
>   }> | null,
>   defaultValue?: {
>     value?: string | null,
>     useInAppDefault?: boolean | null
>   } | null
> }> | null
> ```

***

### namespaces.list

`remoteConfig.namespaces.list`

Lists all available namespaces for a given Firebase project. The returned list currently includes "firebase" (for the client-side template) and "firebase-server" (for the server-side template) (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent project for which to list namespaces. Format: projects/\{project} Format: `projects/<id>`. |
| `pageSize` | `number` | No | Optional. The maximum number of items to return per page. If not specified, defaults to 100. |
| `pageToken` | `string` | No | Optional. The token for the specific page to retrieve. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `namespaces` | `object[] \| null` | No | The list of namespaces for the project. |
| `nextPageToken` | `string \| null` | No | Optional. The token for the specific page to retrieve. |

> [accordion] namespaces full type
>
> ```ts theme={null}
> {
>   name?: string | null
> }[] | null
> ```

***

### namespaces.remoteConfig.downloadDefaults

`remoteConfig.namespaces.remoteConfig.downloadDefaults`

Get a project's current Remote Config template parameters and default values in JSON, property list (plist), or XML format. To download the server-side template defaults, use "firebase-server" as the namespace ID in \[DownloadDefaultsRequest.name]

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfig.downloadDefaults({ name: 'projects/demo-project/namespaces/firebase/remoteConfig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Optional. The name of the RemoteConfig to get defaults from. Format: projects/\{project}/namespaces/\{namespace}/remoteConfig Project is a Firebase project ID or project number. Namespace is the namespace ID (e.g.: 'firebase' or 'firebase-server') Format: `projects/<id>/namespaces/<id>/remoteConfig`. |
| `format` | `FORMAT_UNSPECIFIED \| XML \| PLIST \| JSON` | No | Required. The file structure to return. |
| `project` | `string` | No | Required. The Firebase project's Project ID or Project Number, prefixed with "projects/". |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### namespaces.remoteConfig.listVersions

`remoteConfig.namespaces.remoteConfig.listVersions`

Get a list of Remote Config template versions that have been published, sorted in reverse chronological order. Only the last 300 versions are stored (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfig.listVersions({ parent: 'projects/demo-project/namespaces/firebase/remoteConfig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | No | Required. The Firebase project's Project ID or Project Number, prefixed with "projects/". |
| `pageToken` | `string` | No | Optional. The next\_page\_token value returned from a previous List request, if any. |
| `parent` | `string` | Yes | Optional. The resource name of the RemoteConfig to list versions for. Format: projects/\{project}/namespaces/\{namespace}/remoteConfig Project is a Firebase project ID or project number. Namespace is the namespace ID (e.g.: 'firebase' or 'firebase-server') Format: `projects/<id>/namespaces/<id>/remoteConfig`. |
| `pageSize` | `number` | No | Optional. The maximum number of items to return per page. |
| `startTime` | `string` | No | Optional. Specify the earliest update time to include in the results; any entries updated before this time are omitted. |
| `endVersionNumber` | `string \| number` | No | Optional. Specify the newest version number to include in the results. If specified, must be greater than zero. Defaults to the newest version. |
| `endTime` | `string` | No | Optional. Specify the latest update time to include in the results; any entries updated on or after this time are omitted. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Token to retrieve the next page of results, or empty if there are no more results in the list. |
| `versions` | `object[] \| null` | No | A list of version metadata objects, sorted in reverse chronological order. |

> [accordion] versions full type
>
> ```ts theme={null}
> {
>   rollbackSource?: string | number | null,
>   description?: string | null,
>   updateUser?: {
>     email?: string | null,
>     imageUrl?: string | null,
>     name?: string | null
>   } | null,
>   updateType?: string | null,
>   isLegacy?: boolean | null,
>   versionNumber?: string | number | null,
>   updateOrigin?: string | null,
>   updateTime?: string | null
> }[] | null
> ```

***

### namespaces.remoteConfig.rollback

`remoteConfig.namespaces.remoteConfig.rollback`

Roll back a project's published Remote Config template to the one specified by the provided version number. A rollback is equivalent to getting a previously published Remote Config template, and re-publishing it using a force update

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfig.rollback({ name: 'projects/demo-project/namespaces/firebase/remoteConfig' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Optional. The name of the RemoteConfig to rollback. Format: projects/\{project}/namespaces/\{namespace}/remoteConfig Project is a Firebase project ID or project number. Namespace is the namespace ID (e.g.: firebase or firebase-server) Format: `projects/<id>/namespaces/<id>/remoteConfig`. |
| `project` | `string` | No | The Firebase project's Project ID or Project Number, prefixed with "projects/". This field is required if the `name` field is not provided. |
| `versionNumber` | `string \| number` | No | Required. The version number of the RemoteConfig to roll back to. The specified version number must be less than the current version number, and not have been deleted due to staleness. |
| `body_name` | `string` | No | Optional. The name of the RemoteConfig to rollback. Format: projects/\{project}/namespaces/\{namespace}/remoteConfig Project is a Firebase project ID or project number. Namespace is the namespace ID (e.g.: firebase or firebase-server) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `conditions` | `object[] \| null` | No | A list of conditions in descending order by priority. The values of the google.firebase.remoteconfig.v1.RemoteConfigCondition.name entries must be unique. |
| `parameterGroups` | `object \| null` | No | Map of parameter group names to their descriptions and grouped parameters. A group's name is mutable but must be unique among groups in the config. The name is limited to 256 characters and intended to be human-readable. Any Unicode characters are allowed. Groups have a list of parameters which allows users of the API to group parameters that are associated with the same feature or theme together for easy organizational access. |
| `version` | `object \| null` | No | Contains all metadata about a particular version of the Remote Config template. All fields are set at the time the specified Remote Config template was written. |
| `parameters` | `object \| null` | No | Map of parameter keys to their optional default values and optional conditional values. |
| `etag` | `string \| null` | No | The ETag of this template (from the response header). Pass it as `ifMatch` to publish a change, so a publish made in between is not overwritten. |

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   expression?: string | null,
>   name?: string | null,
>   etag?: string | null,
>   tagColor?: string | null
> }[] | null
> ```

> [accordion] parameterGroups full type
>
> ```ts theme={null}
> Record<string, {
>   parameters?: Record<string, {
>     conditionalValues?: Record<string, {
>       personalizationValue?: {
>         personalizationId?: string | null
>       } | null,
>       value?: string | null,
>       experimentValue?: {
>         experimentId?: string | null,
>         exposurePercent?: number | null,
>         variantValue?: {
>           value?: string | null,
>           noChange?: boolean | null,
>           variantId?: string | null
>         }[] | null
>       } | null,
>       rolloutValue?: {
>         value?: string | null,
>         percent?: number | null,
>         rolloutId?: string | null
>       } | null,
>       useInAppDefault?: boolean | null
>     }> | null,
>     name?: string | null,
>     etag?: string | null,
>     defaultValue?: {
>       personalizationValue?: {
>         personalizationId?: string | null
>       } | null,
>       value?: string | null,
>       experimentValue?: {
>         experimentId?: string | null,
>         exposurePercent?: number | null,
>         variantValue?: {
>           value?: string | null,
>           noChange?: boolean | null,
>           variantId?: string | null
>         }[] | null
>       } | null,
>       rolloutValue?: {
>         value?: string | null,
>         percent?: number | null,
>         rolloutId?: string | null
>       } | null,
>       useInAppDefault?: boolean | null
>     } | null,
>     valueType?: string | null,
>     description?: string | null
>   }> | null,
>   description?: string | null,
>   name?: string | null,
>   etag?: string | null
> }> | null
> ```

> [accordion] version full type
>
> ```ts theme={null}
> {
>   rollbackSource?: string | number | null,
>   description?: string | null,
>   updateUser?: {
>     email?: string | null,
>     imageUrl?: string | null,
>     name?: string | null
>   } | null,
>   updateType?: string | null,
>   isLegacy?: boolean | null,
>   versionNumber?: string | number | null,
>   updateOrigin?: string | null,
>   updateTime?: string | null
> } | null
> ```

> [accordion] parameters full type
>
> ```ts theme={null}
> Record<string, {
>   conditionalValues?: Record<string, {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   }> | null,
>   name?: string | null,
>   etag?: string | null,
>   defaultValue?: {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   } | null,
>   valueType?: string | null,
>   description?: string | null
> }> | null
> ```

***

### namespaces.remoteConfigConditions.create

`remoteConfig.namespaces.remoteConfigConditions.create`

Create a Remote Config condition

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfigConditions.create({ parent: 'projects/demo-project/namespaces/firebase' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `validateOnly` | `boolean` | No | Optional. When set to true, the request is validated but not executed. |
| `parent` | `string` | Yes | Required. The parent namespace in which to create the condition. Format: projects/\{project}/namespaces/\{namespace} Format: `projects/<id>/namespaces/<id>`. |
| `remoteConfigConditionId` | `string` | No | Required. The ID to use for the new condition. |
| `expression` | `string` | No | Required. The logic of this condition. See the documentation regarding Condition Expressions for the expected syntax of this field. |
| `name` | `string` | No | Required. Identifier. A non-empty and unique name of this condition. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigConditions/\{remote\_config\_condition} When used within RemoteConfig.conditions, this field may contain just the condition name. |
| `etag` | `string` | No | The current ETag of the condition for optimistic concurrency. |
| `tagColor` | `CONDITION_DISPLAY_COLOR_UNSPECIFIED \| BLUE \| BROWN \| CYAN \| DEEP_ORANGE \| GREEN \| INDIGO \| LIME \| ORANGE \| PINK \| PURPLE \| TEAL` | No | Optional. The color associated with this condition for display purposes in the Firebase Console. Not specifying this value or having "CONDITION\_DISPLAY\_COLOR\_UNSPECIFIED" results in the Console picking an arbitrary color to associate with the condition. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expression` | `string \| null` | No | Required. The logic of this condition. See the documentation regarding Condition Expressions for the expected syntax of this field. |
| `name` | `string \| null` | No | Required. Identifier. A non-empty and unique name of this condition. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigConditions/\{remote\_config\_condition} When used within RemoteConfig.conditions, this field may contain just the condition name. |
| `etag` | `string \| null` | No | The current ETag of the condition for optimistic concurrency. |
| `tagColor` | `string \| null` | No | Optional. The color associated with this condition for display purposes in the Firebase Console. Not specifying this value or having "CONDITION\_DISPLAY\_COLOR\_UNSPECIFIED" results in the Console picking an arbitrary color to associate with the condition. |

***

### namespaces.remoteConfigConditions.delete

`remoteConfig.namespaces.remoteConfigConditions.delete`

Delete a Remote Config condition

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfigConditions.delete({ name: 'projects/demo-project/namespaces/firebase/remoteConfigConditions/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `allowMissing` | `boolean` | No | Optional. If set to true, and the condition is not found, the request will succeed but no action will be taken. |
| `name` | `string` | Yes | Required. The resource name of the condition to delete. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigConditions/\{remote\_config\_condition\_id} Format: `projects/<id>/namespaces/<id>/remoteConfigConditions/<id>`. |
| `etag` | `string` | No | Optional. The current ETag of the condition for optimistic concurrency. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### namespaces.remoteConfigConditions.get

`remoteConfig.namespaces.remoteConfigConditions.get`

Get a Remote Config condition

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfigConditions.get({ name: 'projects/demo-project/namespaces/firebase/remoteConfigConditions/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the condition. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigConditions/\{remote\_config\_condition\_id} Format: `projects/<id>/namespaces/<id>/remoteConfigConditions/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expression` | `string \| null` | No | Required. The logic of this condition. See the documentation regarding Condition Expressions for the expected syntax of this field. |
| `name` | `string \| null` | No | Required. Identifier. A non-empty and unique name of this condition. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigConditions/\{remote\_config\_condition} When used within RemoteConfig.conditions, this field may contain just the condition name. |
| `etag` | `string \| null` | No | The current ETag of the condition for optimistic concurrency. |
| `tagColor` | `string \| null` | No | Optional. The color associated with this condition for display purposes in the Firebase Console. Not specifying this value or having "CONDITION\_DISPLAY\_COLOR\_UNSPECIFIED" results in the Console picking an arbitrary color to associate with the condition. |

***

### namespaces.remoteConfigConditions.list

`remoteConfig.namespaces.remoteConfigConditions.list`

List all Remote Config conditions for a project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfigConditions.list({ parent: 'projects/demo-project/namespaces/firebase' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of conditions to return in the response. If unspecified, defaults to 100. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| `pageToken` | `string` | No | Optional. A page token received from a previous list call. |
| `parent` | `string` | Yes | Required. The parent namespace in which to list conditions. Format: projects/\{project}/namespaces/\{namespace} Format: `projects/<id>/namespaces/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `remoteConfigConditions` | `object[] \| null` | No | The list of conditions in the project namespace. |
| `nextPageToken` | `string \| null` | No | A token that can be sent as `page_token` to retrieve the next page. |

> [accordion] remoteConfigConditions full type
>
> ```ts theme={null}
> {
>   expression?: string | null,
>   name?: string | null,
>   etag?: string | null,
>   tagColor?: string | null
> }[] | null
> ```

***

### namespaces.remoteConfigConditions.patch

`remoteConfig.namespaces.remoteConfigConditions.patch`

Update a Remote Config condition

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfigConditions.patch({ name: 'projects/demo-project/namespaces/firebase/remoteConfigConditions/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `validateOnly` | `boolean` | No | Optional. When set to true, the request is validated but not executed. |
| `name` | `string` | Yes | Required. Identifier. A non-empty and unique name of this condition. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigConditions/\{remote\_config\_condition} When used within RemoteConfig.conditions, this field may contain just the condition name. Format: `projects/<id>/namespaces/<id>/remoteConfigConditions/<id>`. |
| `allowMissing` | `boolean` | No | Optional. If set to true, and the condition is not found, a new condition will be created. |
| `updateMask` | `string` | No | Optional. Field mask specifying which fields to update. |
| `expression` | `string` | No | Required. The logic of this condition. See the documentation regarding Condition Expressions for the expected syntax of this field. |
| `body_name` | `string` | No | Required. Identifier. A non-empty and unique name of this condition. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigConditions/\{remote\_config\_condition} When used within RemoteConfig.conditions, this field may contain just the condition name. |
| `etag` | `string` | No | The current ETag of the condition for optimistic concurrency. |
| `tagColor` | `CONDITION_DISPLAY_COLOR_UNSPECIFIED \| BLUE \| BROWN \| CYAN \| DEEP_ORANGE \| GREEN \| INDIGO \| LIME \| ORANGE \| PINK \| PURPLE \| TEAL` | No | Optional. The color associated with this condition for display purposes in the Firebase Console. Not specifying this value or having "CONDITION\_DISPLAY\_COLOR\_UNSPECIFIED" results in the Console picking an arbitrary color to associate with the condition. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expression` | `string \| null` | No | Required. The logic of this condition. See the documentation regarding Condition Expressions for the expected syntax of this field. |
| `name` | `string \| null` | No | Required. Identifier. A non-empty and unique name of this condition. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigConditions/\{remote\_config\_condition} When used within RemoteConfig.conditions, this field may contain just the condition name. |
| `etag` | `string \| null` | No | The current ETag of the condition for optimistic concurrency. |
| `tagColor` | `string \| null` | No | Optional. The color associated with this condition for display purposes in the Firebase Console. Not specifying this value or having "CONDITION\_DISPLAY\_COLOR\_UNSPECIFIED" results in the Console picking an arbitrary color to associate with the condition. |

***

### namespaces.remoteConfigParameterGroups.create

`remoteConfig.namespaces.remoteConfigParameterGroups.create`

Create a Remote Config parameter group

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfigParameterGroups.create({ parent: 'projects/demo-project/namespaces/firebase' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `remoteConfigParameterGroupId` | `string` | No | Required. The ID to use for the new parameter group. |
| `validateOnly` | `boolean` | No | Optional. When set to true, the request is validated but not executed. |
| `parent` | `string` | Yes | Required. The parent namespace in which to create the parameter group. Format: projects/\{project}/namespaces/\{namespace} Format: `projects/<id>/namespaces/<id>`. |
| `parameters` | `object` | No | Optional. Map of parameter keys to their optional default values and optional conditional values for parameters that belong to this group. A parameter only appears once per RemoteConfig: an ungrouped parameter appears at the top level; a parameter organized within a group appears within its group's map of parameters. |
| `description` | `string` | No | Optional. A description for the group. Its length must be less than or equal to 256 characters. A description may contain any Unicode characters. |
| `name` | `string` | No | Optional. Identifier. The resource name of the parameter group. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigParameterGroups/\{remote\_config\_parameter\_group} |
| `etag` | `string` | No | The current ETag of the parameter group for optimistic concurrency. |

> [accordion] parameters full type
>
> ```ts theme={null}
> Record<string, {
>   conditionalValues?: Record<string, {
>     personalizationValue?: {
>       personalizationId?: string
>     },
>     value?: string,
>     experimentValue?: {
>       experimentId?: string,
>       exposurePercent?: number,
>       variantValue?: {
>         value?: string,
>         noChange?: boolean,
>         variantId?: string
>       }[]
>     },
>     rolloutValue?: {
>       value?: string,
>       percent?: number,
>       rolloutId?: string
>     },
>     useInAppDefault?: boolean
>   }>,
>   name?: string,
>   etag?: string,
>   defaultValue?: {
>     personalizationValue?: {
>       personalizationId?: string
>     },
>     value?: string,
>     experimentValue?: {
>       experimentId?: string,
>       exposurePercent?: number,
>       variantValue?: {
>         value?: string,
>         noChange?: boolean,
>         variantId?: string
>       }[]
>     },
>     rolloutValue?: {
>       value?: string,
>       percent?: number,
>       rolloutId?: string
>     },
>     useInAppDefault?: boolean
>   },
>   valueType?: PARAMETER_VALUE_TYPE_UNSPECIFIED | STRING | BOOLEAN | NUMBER | JSON,
>   description?: string
> }>
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `parameters` | `object \| null` | No | Optional. Map of parameter keys to their optional default values and optional conditional values for parameters that belong to this group. A parameter only appears once per RemoteConfig: an ungrouped parameter appears at the top level; a parameter organized within a group appears within its group's map of parameters. |
| `description` | `string \| null` | No | Optional. A description for the group. Its length must be less than or equal to 256 characters. A description may contain any Unicode characters. |
| `name` | `string \| null` | No | Optional. Identifier. The resource name of the parameter group. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigParameterGroups/\{remote\_config\_parameter\_group} |
| `etag` | `string \| null` | No | The current ETag of the parameter group for optimistic concurrency. |

> [accordion] parameters full type
>
> ```ts theme={null}
> Record<string, {
>   conditionalValues?: Record<string, {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   }> | null,
>   name?: string | null,
>   etag?: string | null,
>   defaultValue?: {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   } | null,
>   valueType?: string | null,
>   description?: string | null
> }> | null
> ```

***

### namespaces.remoteConfigParameterGroups.delete

`remoteConfig.namespaces.remoteConfigParameterGroups.delete`

Delete a Remote Config parameter group

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfigParameterGroups.delete({ name: 'projects/demo-project/namespaces/firebase/remoteConfigParameterGroups/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `allowMissing` | `boolean` | No | Optional. If set to true, and the parameter group is not found, the request will succeed but no action will be taken. |
| `name` | `string` | Yes | Required. The resource name of the parameter group to delete. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigParameterGroups/\{remote\_config\_parameter\_group\_id} Format: `projects/<id>/namespaces/<id>/remoteConfigParameterGroups/<id>`. |
| `etag` | `string` | No | Optional. The current ETag of the parameter group for optimistic concurrency. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### namespaces.remoteConfigParameterGroups.get

`remoteConfig.namespaces.remoteConfigParameterGroups.get`

Get a Remote Config parameter group

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfigParameterGroups.get({ name: 'projects/demo-project/namespaces/firebase/remoteConfigParameterGroups/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the parameter group. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigParameterGroups/\{remote\_config\_parameter\_group\_id} Format: `projects/<id>/namespaces/<id>/remoteConfigParameterGroups/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `parameters` | `object \| null` | No | Optional. Map of parameter keys to their optional default values and optional conditional values for parameters that belong to this group. A parameter only appears once per RemoteConfig: an ungrouped parameter appears at the top level; a parameter organized within a group appears within its group's map of parameters. |
| `description` | `string \| null` | No | Optional. A description for the group. Its length must be less than or equal to 256 characters. A description may contain any Unicode characters. |
| `name` | `string \| null` | No | Optional. Identifier. The resource name of the parameter group. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigParameterGroups/\{remote\_config\_parameter\_group} |
| `etag` | `string \| null` | No | The current ETag of the parameter group for optimistic concurrency. |

> [accordion] parameters full type
>
> ```ts theme={null}
> Record<string, {
>   conditionalValues?: Record<string, {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   }> | null,
>   name?: string | null,
>   etag?: string | null,
>   defaultValue?: {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   } | null,
>   valueType?: string | null,
>   description?: string | null
> }> | null
> ```

***

### namespaces.remoteConfigParameterGroups.list

`remoteConfig.namespaces.remoteConfigParameterGroups.list`

List all Remote Config parameter groups for a project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfigParameterGroups.list({ parent: 'projects/demo-project/namespaces/firebase' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent namespace in which to list parameter groups. Format: projects/\{project}/namespaces/\{namespace} Format: `projects/<id>/namespaces/<id>`. |
| `pageSize` | `number` | No | Optional. The maximum number of parameter groups to return in the response. If unspecified, defaults to 100. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| `pageToken` | `string` | No | Optional. A page token received from a previous list call. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `remoteConfigParameterGroups` | `object[] \| null` | No | The list of parameter groups in the project namespace. |
| `nextPageToken` | `string \| null` | No | A token that can be sent as `page_token` to retrieve the next page. |

> [accordion] remoteConfigParameterGroups full type
>
> ```ts theme={null}
> {
>   parameters?: Record<string, {
>     conditionalValues?: Record<string, {
>       personalizationValue?: {
>         personalizationId?: string | null
>       } | null,
>       value?: string | null,
>       experimentValue?: {
>         experimentId?: string | null,
>         exposurePercent?: number | null,
>         variantValue?: {
>           value?: string | null,
>           noChange?: boolean | null,
>           variantId?: string | null
>         }[] | null
>       } | null,
>       rolloutValue?: {
>         value?: string | null,
>         percent?: number | null,
>         rolloutId?: string | null
>       } | null,
>       useInAppDefault?: boolean | null
>     }> | null,
>     name?: string | null,
>     etag?: string | null,
>     defaultValue?: {
>       personalizationValue?: {
>         personalizationId?: string | null
>       } | null,
>       value?: string | null,
>       experimentValue?: {
>         experimentId?: string | null,
>         exposurePercent?: number | null,
>         variantValue?: {
>           value?: string | null,
>           noChange?: boolean | null,
>           variantId?: string | null
>         }[] | null
>       } | null,
>       rolloutValue?: {
>         value?: string | null,
>         percent?: number | null,
>         rolloutId?: string | null
>       } | null,
>       useInAppDefault?: boolean | null
>     } | null,
>     valueType?: string | null,
>     description?: string | null
>   }> | null,
>   description?: string | null,
>   name?: string | null,
>   etag?: string | null
> }[] | null
> ```

***

### namespaces.remoteConfigParameterGroups.patch

`remoteConfig.namespaces.remoteConfigParameterGroups.patch`

Update a Remote Config parameter group

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfigParameterGroups.patch({ name: 'projects/demo-project/namespaces/firebase/remoteConfigParameterGroups/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `allowMissing` | `boolean` | No | Optional. If set to true, and the parameter group is not found, a new parameter group will be created. |
| `updateMask` | `string` | No | Optional. Field mask specifying which fields to update. |
| `name` | `string` | Yes | Optional. Identifier. The resource name of the parameter group. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigParameterGroups/\{remote\_config\_parameter\_group} Format: `projects/<id>/namespaces/<id>/remoteConfigParameterGroups/<id>`. |
| `validateOnly` | `boolean` | No | Optional. When set to true, the request is validated but not executed. |
| `parameters` | `object` | No | Optional. Map of parameter keys to their optional default values and optional conditional values for parameters that belong to this group. A parameter only appears once per RemoteConfig: an ungrouped parameter appears at the top level; a parameter organized within a group appears within its group's map of parameters. |
| `description` | `string` | No | Optional. A description for the group. Its length must be less than or equal to 256 characters. A description may contain any Unicode characters. |
| `body_name` | `string` | No | Optional. Identifier. The resource name of the parameter group. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigParameterGroups/\{remote\_config\_parameter\_group} |
| `etag` | `string` | No | The current ETag of the parameter group for optimistic concurrency. |

> [accordion] parameters full type
>
> ```ts theme={null}
> Record<string, {
>   conditionalValues?: Record<string, {
>     personalizationValue?: {
>       personalizationId?: string
>     },
>     value?: string,
>     experimentValue?: {
>       experimentId?: string,
>       exposurePercent?: number,
>       variantValue?: {
>         value?: string,
>         noChange?: boolean,
>         variantId?: string
>       }[]
>     },
>     rolloutValue?: {
>       value?: string,
>       percent?: number,
>       rolloutId?: string
>     },
>     useInAppDefault?: boolean
>   }>,
>   name?: string,
>   etag?: string,
>   defaultValue?: {
>     personalizationValue?: {
>       personalizationId?: string
>     },
>     value?: string,
>     experimentValue?: {
>       experimentId?: string,
>       exposurePercent?: number,
>       variantValue?: {
>         value?: string,
>         noChange?: boolean,
>         variantId?: string
>       }[]
>     },
>     rolloutValue?: {
>       value?: string,
>       percent?: number,
>       rolloutId?: string
>     },
>     useInAppDefault?: boolean
>   },
>   valueType?: PARAMETER_VALUE_TYPE_UNSPECIFIED | STRING | BOOLEAN | NUMBER | JSON,
>   description?: string
> }>
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `parameters` | `object \| null` | No | Optional. Map of parameter keys to their optional default values and optional conditional values for parameters that belong to this group. A parameter only appears once per RemoteConfig: an ungrouped parameter appears at the top level; a parameter organized within a group appears within its group's map of parameters. |
| `description` | `string \| null` | No | Optional. A description for the group. Its length must be less than or equal to 256 characters. A description may contain any Unicode characters. |
| `name` | `string \| null` | No | Optional. Identifier. The resource name of the parameter group. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigParameterGroups/\{remote\_config\_parameter\_group} |
| `etag` | `string \| null` | No | The current ETag of the parameter group for optimistic concurrency. |

> [accordion] parameters full type
>
> ```ts theme={null}
> Record<string, {
>   conditionalValues?: Record<string, {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   }> | null,
>   name?: string | null,
>   etag?: string | null,
>   defaultValue?: {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   } | null,
>   valueType?: string | null,
>   description?: string | null
> }> | null
> ```

***

### namespaces.remoteConfigParameters.create

`remoteConfig.namespaces.remoteConfigParameters.create`

Create a Remote Config parameter

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfigParameters.create({ parent: 'projects/demo-project/namespaces/firebase' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent namespace in which to create the parameter. Format: projects/\{project}/namespaces/\{namespace} Format: `projects/<id>/namespaces/<id>`. |
| `remoteConfigParameterId` | `string` | No | Required. The ID to use for the new parameter. |
| `validateOnly` | `boolean` | No | Optional. When set to true, the request is validated but not executed. |
| `conditionalValues` | `object` | No | Optional. Optional - a (condition name, value) map. The condition\_name of the highest priority (the one listed first in the RemoteConfig's conditions list) determines the value of this parameter. |
| `name` | `string` | No | Optional. Identifier. The resource name of the parameter. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigParameters/\{remote\_config\_parameter} NOTE: Retained as field number 5 to preserve strict backwards wire-compatibility with existing RemoteConfig.parameters map definitions. |
| `etag` | `string` | No | The current ETag of the parameter for optimistic concurrency. |
| `defaultValue` | `object` | No | A RemoteConfigParameterValue resource contains the value that a parameter may have. |
| `valueType` | `PARAMETER_VALUE_TYPE_UNSPECIFIED \| STRING \| BOOLEAN \| NUMBER \| JSON` | No | Optional. The data type for all values of this parameter in the current version of the template. Defaults to `ParameterValueType.STRING` if unspecified. |
| `description` | `string` | No | Optional. A description for this Parameter. Its length must be less than or equal to 256 characters . A description may contain any Unicode characters. |

> [accordion] conditionalValues full type
>
> ```ts theme={null}
> Record<string, {
>   personalizationValue?: {
>     personalizationId?: string
>   },
>   value?: string,
>   experimentValue?: {
>     experimentId?: string,
>     exposurePercent?: number,
>     variantValue?: {
>       value?: string,
>       noChange?: boolean,
>       variantId?: string
>     }[]
>   },
>   rolloutValue?: {
>     value?: string,
>     percent?: number,
>     rolloutId?: string
>   },
>   useInAppDefault?: boolean
> }>
> ```

> [accordion] defaultValue full type
>
> ```ts theme={null}
> {
>   personalizationValue?: {
>     personalizationId?: string
>   },
>   value?: string,
>   experimentValue?: {
>     experimentId?: string,
>     exposurePercent?: number,
>     variantValue?: {
>       value?: string,
>       noChange?: boolean,
>       variantId?: string
>     }[]
>   },
>   rolloutValue?: {
>     value?: string,
>     percent?: number,
>     rolloutId?: string
>   },
>   useInAppDefault?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `conditionalValues` | `object \| null` | No | Optional. Optional - a (condition name, value) map. The condition\_name of the highest priority (the one listed first in the RemoteConfig's conditions list) determines the value of this parameter. |
| `name` | `string \| null` | No | Optional. Identifier. The resource name of the parameter. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigParameters/\{remote\_config\_parameter} NOTE: Retained as field number 5 to preserve strict backwards wire-compatibility with existing RemoteConfig.parameters map definitions. |
| `etag` | `string \| null` | No | The current ETag of the parameter for optimistic concurrency. |
| `defaultValue` | `object \| null` | No | A RemoteConfigParameterValue resource contains the value that a parameter may have. |
| `valueType` | `string \| null` | No | Optional. The data type for all values of this parameter in the current version of the template. Defaults to `ParameterValueType.STRING` if unspecified. |
| `description` | `string \| null` | No | Optional. A description for this Parameter. Its length must be less than or equal to 256 characters . A description may contain any Unicode characters. |

> [accordion] conditionalValues full type
>
> ```ts theme={null}
> Record<string, {
>   personalizationValue?: {
>     personalizationId?: string | null
>   } | null,
>   value?: string | null,
>   experimentValue?: {
>     experimentId?: string | null,
>     exposurePercent?: number | null,
>     variantValue?: {
>       value?: string | null,
>       noChange?: boolean | null,
>       variantId?: string | null
>     }[] | null
>   } | null,
>   rolloutValue?: {
>     value?: string | null,
>     percent?: number | null,
>     rolloutId?: string | null
>   } | null,
>   useInAppDefault?: boolean | null
> }> | null
> ```

> [accordion] defaultValue full type
>
> ```ts theme={null}
> {
>   personalizationValue?: {
>     personalizationId?: string | null
>   } | null,
>   value?: string | null,
>   experimentValue?: {
>     experimentId?: string | null,
>     exposurePercent?: number | null,
>     variantValue?: {
>       value?: string | null,
>       noChange?: boolean | null,
>       variantId?: string | null
>     }[] | null
>   } | null,
>   rolloutValue?: {
>     value?: string | null,
>     percent?: number | null,
>     rolloutId?: string | null
>   } | null,
>   useInAppDefault?: boolean | null
> } | null
> ```

***

### namespaces.remoteConfigParameters.delete

`remoteConfig.namespaces.remoteConfigParameters.delete`

Delete a Remote Config parameter

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfigParameters.delete({ name: 'projects/demo-project/namespaces/firebase/remoteConfigParameters/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the parameter to delete. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigParameters/\{remote\_config\_parameter\_id} Format: `projects/<id>/namespaces/<id>/remoteConfigParameters/<id>`. |
| `etag` | `string` | No | Optional. The current ETag of the parameter for optimistic concurrency. |
| `allowMissing` | `boolean` | No | Optional. If set to true, and the parameter is not found, the request will succeed but no action will be taken. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### namespaces.remoteConfigParameters.get

`remoteConfig.namespaces.remoteConfigParameters.get`

Get a project's Remote Config parameter

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfigParameters.get({ name: 'projects/demo-project/namespaces/firebase/remoteConfigParameters/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The resource name of the parameter. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigParameters/\{remote\_config\_parameter\_id} Format: `projects/<id>/namespaces/<id>/remoteConfigParameters/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `conditionalValues` | `object \| null` | No | Optional. Optional - a (condition name, value) map. The condition\_name of the highest priority (the one listed first in the RemoteConfig's conditions list) determines the value of this parameter. |
| `name` | `string \| null` | No | Optional. Identifier. The resource name of the parameter. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigParameters/\{remote\_config\_parameter} NOTE: Retained as field number 5 to preserve strict backwards wire-compatibility with existing RemoteConfig.parameters map definitions. |
| `etag` | `string \| null` | No | The current ETag of the parameter for optimistic concurrency. |
| `defaultValue` | `object \| null` | No | A RemoteConfigParameterValue resource contains the value that a parameter may have. |
| `valueType` | `string \| null` | No | Optional. The data type for all values of this parameter in the current version of the template. Defaults to `ParameterValueType.STRING` if unspecified. |
| `description` | `string \| null` | No | Optional. A description for this Parameter. Its length must be less than or equal to 256 characters . A description may contain any Unicode characters. |

> [accordion] conditionalValues full type
>
> ```ts theme={null}
> Record<string, {
>   personalizationValue?: {
>     personalizationId?: string | null
>   } | null,
>   value?: string | null,
>   experimentValue?: {
>     experimentId?: string | null,
>     exposurePercent?: number | null,
>     variantValue?: {
>       value?: string | null,
>       noChange?: boolean | null,
>       variantId?: string | null
>     }[] | null
>   } | null,
>   rolloutValue?: {
>     value?: string | null,
>     percent?: number | null,
>     rolloutId?: string | null
>   } | null,
>   useInAppDefault?: boolean | null
> }> | null
> ```

> [accordion] defaultValue full type
>
> ```ts theme={null}
> {
>   personalizationValue?: {
>     personalizationId?: string | null
>   } | null,
>   value?: string | null,
>   experimentValue?: {
>     experimentId?: string | null,
>     exposurePercent?: number | null,
>     variantValue?: {
>       value?: string | null,
>       noChange?: boolean | null,
>       variantId?: string | null
>     }[] | null
>   } | null,
>   rolloutValue?: {
>     value?: string | null,
>     percent?: number | null,
>     rolloutId?: string | null
>   } | null,
>   useInAppDefault?: boolean | null
> } | null
> ```

***

### namespaces.remoteConfigParameters.list

`remoteConfig.namespaces.remoteConfigParameters.list`

List all Remote Config parameters for a project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfigParameters.list({ parent: 'projects/demo-project/namespaces/firebase' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of parameters to return in the response. If unspecified, defaults to 100. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| `pageToken` | `string` | No | Optional. A page token received from a previous list call. |
| `parent` | `string` | Yes | Required. The parent namespace in which to list parameters. Format: projects/\{project}/namespaces/\{namespace} Format: `projects/<id>/namespaces/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token that can be sent as `page_token` to retrieve the next page. |
| `remoteConfigParameters` | `object[] \| null` | No | The list of parameters in the project namespace. |

> [accordion] remoteConfigParameters full type
>
> ```ts theme={null}
> {
>   conditionalValues?: Record<string, {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   }> | null,
>   name?: string | null,
>   etag?: string | null,
>   defaultValue?: {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   } | null,
>   valueType?: string | null,
>   description?: string | null
> }[] | null
> ```

***

### namespaces.remoteConfigParameters.patch

`remoteConfig.namespaces.remoteConfigParameters.patch`

Update a Remote Config parameter

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.remoteConfigParameters.patch({ name: 'projects/demo-project/namespaces/firebase/remoteConfigParameters/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `validateOnly` | `boolean` | No | Optional. When set to true, the request is validated but not executed. |
| `updateMask` | `string` | No | Optional. Field mask specifying which fields to update. |
| `name` | `string` | Yes | Optional. Identifier. The resource name of the parameter. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigParameters/\{remote\_config\_parameter} NOTE: Retained as field number 5 to preserve strict backwards wire-compatibility with existing RemoteConfig.parameters map definitions. Format: `projects/<id>/namespaces/<id>/remoteConfigParameters/<id>`. |
| `allowMissing` | `boolean` | No | Optional. If set to true, and the parameter is not found, a new parameter will be created. |
| `conditionalValues` | `object` | No | Optional. Optional - a (condition name, value) map. The condition\_name of the highest priority (the one listed first in the RemoteConfig's conditions list) determines the value of this parameter. |
| `body_name` | `string` | No | Optional. Identifier. The resource name of the parameter. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigParameters/\{remote\_config\_parameter} NOTE: Retained as field number 5 to preserve strict backwards wire-compatibility with existing RemoteConfig.parameters map definitions. |
| `etag` | `string` | No | The current ETag of the parameter for optimistic concurrency. |
| `defaultValue` | `object` | No | A RemoteConfigParameterValue resource contains the value that a parameter may have. |
| `valueType` | `PARAMETER_VALUE_TYPE_UNSPECIFIED \| STRING \| BOOLEAN \| NUMBER \| JSON` | No | Optional. The data type for all values of this parameter in the current version of the template. Defaults to `ParameterValueType.STRING` if unspecified. |
| `description` | `string` | No | Optional. A description for this Parameter. Its length must be less than or equal to 256 characters . A description may contain any Unicode characters. |

> [accordion] conditionalValues full type
>
> ```ts theme={null}
> Record<string, {
>   personalizationValue?: {
>     personalizationId?: string
>   },
>   value?: string,
>   experimentValue?: {
>     experimentId?: string,
>     exposurePercent?: number,
>     variantValue?: {
>       value?: string,
>       noChange?: boolean,
>       variantId?: string
>     }[]
>   },
>   rolloutValue?: {
>     value?: string,
>     percent?: number,
>     rolloutId?: string
>   },
>   useInAppDefault?: boolean
> }>
> ```

> [accordion] defaultValue full type
>
> ```ts theme={null}
> {
>   personalizationValue?: {
>     personalizationId?: string
>   },
>   value?: string,
>   experimentValue?: {
>     experimentId?: string,
>     exposurePercent?: number,
>     variantValue?: {
>       value?: string,
>       noChange?: boolean,
>       variantId?: string
>     }[]
>   },
>   rolloutValue?: {
>     value?: string,
>     percent?: number,
>     rolloutId?: string
>   },
>   useInAppDefault?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `conditionalValues` | `object \| null` | No | Optional. Optional - a (condition name, value) map. The condition\_name of the highest priority (the one listed first in the RemoteConfig's conditions list) determines the value of this parameter. |
| `name` | `string \| null` | No | Optional. Identifier. The resource name of the parameter. Format: projects/\{project}/namespaces/\{namespace}/remoteConfigParameters/\{remote\_config\_parameter} NOTE: Retained as field number 5 to preserve strict backwards wire-compatibility with existing RemoteConfig.parameters map definitions. |
| `etag` | `string \| null` | No | The current ETag of the parameter for optimistic concurrency. |
| `defaultValue` | `object \| null` | No | A RemoteConfigParameterValue resource contains the value that a parameter may have. |
| `valueType` | `string \| null` | No | Optional. The data type for all values of this parameter in the current version of the template. Defaults to `ParameterValueType.STRING` if unspecified. |
| `description` | `string \| null` | No | Optional. A description for this Parameter. Its length must be less than or equal to 256 characters . A description may contain any Unicode characters. |

> [accordion] conditionalValues full type
>
> ```ts theme={null}
> Record<string, {
>   personalizationValue?: {
>     personalizationId?: string | null
>   } | null,
>   value?: string | null,
>   experimentValue?: {
>     experimentId?: string | null,
>     exposurePercent?: number | null,
>     variantValue?: {
>       value?: string | null,
>       noChange?: boolean | null,
>       variantId?: string | null
>     }[] | null
>   } | null,
>   rolloutValue?: {
>     value?: string | null,
>     percent?: number | null,
>     rolloutId?: string | null
>   } | null,
>   useInAppDefault?: boolean | null
> }> | null
> ```

> [accordion] defaultValue full type
>
> ```ts theme={null}
> {
>   personalizationValue?: {
>     personalizationId?: string | null
>   } | null,
>   value?: string | null,
>   experimentValue?: {
>     experimentId?: string | null,
>     exposurePercent?: number | null,
>     variantValue?: {
>       value?: string | null,
>       noChange?: boolean | null,
>       variantId?: string | null
>     }[] | null
>   } | null,
>   rolloutValue?: {
>     value?: string | null,
>     percent?: number | null,
>     rolloutId?: string | null
>   } | null,
>   useInAppDefault?: boolean | null
> } | null
> ```

***

### namespaces.rollouts.delete

`remoteConfig.namespaces.rollouts.delete`

Delete a rollout experiment. --- **BETA:** This API is in a Beta launch stage. It is intended for public testing and feedback

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.rollouts.delete({ name: 'projects/demo-project/namespaces/firebase/rollouts/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the rollout to delete. Format: projects/\{project}/namespaces/\{namespace}/rollouts/\{rollout\_id} Format: `projects/<id>/namespaces/<id>/rollouts/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### namespaces.rollouts.get

`remoteConfig.namespaces.rollouts.get`

Get details about a rollout experiment. --- **BETA:** This API is in a Beta launch stage. It is intended for public testing and feedback

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.rollouts.get({ name: 'projects/demo-project/namespaces/firebase/rollouts/x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the rollout to get. Format: projects/\{project}/namespaces/\{namespace}/rollouts/\{rollout\_id} Format: `projects/<id>/namespaces/<id>/rollouts/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `createTime` | `string \| null` | No | Output only. Create time of the rollout experiment. |
| `state` | `string \| null` | No | Output only. The experiment state of the rollout. Will only be RUNNING or DONE. |
| `lastUpdateTime` | `string \| null` | No | Output only. Last update time of the rollout experiment. |
| `endTime` | `string \| null` | No | Output only. End time of the rollout experiment. |
| `definition` | `object \| null` | No | Definition to represent a rollout experiment. |
| `name` | `string \| null` | No | Identifier. The name of the rollout to get. Format: projects/\{project}/namespaces/\{namespace}/rollouts/\{rollout\_id} |
| `etag` | `string \| null` | No | Etag for the Experiment which is generated using hash of update\_time. Can be filled during call to UpdateRollout to ensure that the correct version of the experiment is updated. This will ensure that there are no conflicting writes. If no `etag` is provided, then the update will over-write the experiment blindly. |
| `startTime` | `string \| null` | No | Output only. Start time of the rollout experiment. It is always the same as the create\_time. |

> [accordion] definition full type
>
> ```ts theme={null}
> {
>   controlVariant?: {
>     weight?: number | null,
>     name?: string | null
>   } | null,
>   enabledVariant?: {
>     weight?: number | null,
>     name?: string | null
>   } | null,
>   displayName?: string | null,
>   description?: string | null
> } | null
> ```

***

### namespaces.rollouts.list

`remoteConfig.namespaces.rollouts.list`

Get a list of all rollouts for a project. --- **BETA:** This API is in a Beta launch stage. It is intended for public testing and feedback (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.rollouts.list({ parent: 'projects/demo-project/namespaces/firebase' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageSize` | `number` | No | Optional. The maximum number of items to return per page. |
| `parent` | `string` | Yes | Required. The parent project for which to list rollouts. Format: projects/\{project}/namespaces/\{namespace} Format: `projects/<id>/namespaces/<id>`. |
| `pageToken` | `string` | No | Optional. The token for the specific page to retrieve. |
| `filter` | `string` | No | Optional. Filter expression following AIP-160 |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Token for the next page |
| `rollouts` | `object[] \| null` | No | The list of rollouts for the project. |

> [accordion] rollouts full type
>
> ```ts theme={null}
> {
>   createTime?: string | null,
>   state?: string | null,
>   lastUpdateTime?: string | null,
>   endTime?: string | null,
>   definition?: {
>     controlVariant?: {
>       weight?: number | null,
>       name?: string | null
>     } | null,
>     enabledVariant?: {
>       weight?: number | null,
>       name?: string | null
>     } | null,
>     displayName?: string | null,
>     description?: string | null
>   } | null,
>   name?: string | null,
>   etag?: string | null,
>   startTime?: string | null
> }[] | null
> ```

***

### namespaces.updateConditionOrder

`remoteConfig.namespaces.updateConditionOrder`

Update a project's ConditionOrder

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.updateConditionOrder({ name: 'projects/demo-project/namespaces/firebase/conditionOrder' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updateMask` | `string` | No | Optional. Field mask specifying which fields to update. |
| `validateOnly` | `boolean` | No | Optional. When set to true, the request is validated but not executed. |
| `name` | `string` | Yes | Required. Identifier. The resource name of the condition order singleton. Format: projects/\{project}/namespaces/\{namespace}/conditionOrder Format: `projects/<id>/namespaces/<id>/conditionOrder`. |
| `body_name` | `string` | No | Required. Identifier. The resource name of the condition order singleton. Format: projects/\{project}/namespaces/\{namespace}/conditionOrder |
| `etag` | `string` | No | The current ETag of the condition order for optimistic concurrency. |
| `conditionIds` | `string[]` | No | Required. The ordered list of condition IDs in descending priority. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Required. Identifier. The resource name of the condition order singleton. Format: projects/\{project}/namespaces/\{namespace}/conditionOrder |
| `etag` | `string \| null` | No | The current ETag of the condition order for optimistic concurrency. |
| `conditionIds` | `string[] \| null` | No | Required. The ordered list of condition IDs in descending priority. |

***

### namespaces.updateRemoteConfig

`remoteConfig.namespaces.updateRemoteConfig`

Publish a project's Remote Config template. Pass the ETag returned by GetRemoteConfig as an `If-Match` header to ensure the last seen Remote Config template is the one being overwritten by this update

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.remoteConfig.namespaces.updateRemoteConfig({ name: 'projects/demo-project/namespaces/firebase/remoteConfig', ifMatch: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | No | The Firebase project's Project ID or Project Number, prefixed with "projects/". This field is required if the `name` field is not provided. |
| `name` | `string` | Yes | Optional. The name of the RemoteConfig to update. Format: projects/\{project}/namespaces/\{namespace}/remoteConfig Project is a Firebase project ID or project number. Namespace is the namespace ID (e.g.: firebase or firebase-server) Format: `projects/<id>/namespaces/<id>/remoteConfig`. |
| `validateOnly` | `boolean` | No | Optional. Defaults to `false`. If `true`, the server will only attempt to validate the RemoteConfig. If validation succeeds, the RemoteConfig is not written to the Remote Config server, instead a `200 OK` response is returned. If validation fails, a validation error is returned. Note: other errors may still occur after this boolean is set to `false`, even if getting a `200 OK` when calling with UpdateRemoteConfig with `validate_only` set to `true`. |
| `conditions` | `object[]` | No | A list of conditions in descending order by priority. The values of the google.firebase.remoteconfig.v1.RemoteConfigCondition.name entries must be unique. |
| `parameterGroups` | `object` | No | Map of parameter group names to their descriptions and grouped parameters. A group's name is mutable but must be unique among groups in the config. The name is limited to 256 characters and intended to be human-readable. Any Unicode characters are allowed. Groups have a list of parameters which allows users of the API to group parameters that are associated with the same feature or theme together for easy organizational access. |
| `version` | `object` | No | Contains all metadata about a particular version of the Remote Config template. All fields are set at the time the specified Remote Config template was written. |
| `parameters` | `object` | No | Map of parameter keys to their optional default values and optional conditional values. |
| `ifMatch` | `string` | Yes | The ETag of the template being replaced (`etag` from remoteConfig.namespaces.getRemoteConfig), or `*` to replace whatever is published. |

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   expression?: string,
>   name?: string,
>   etag?: string,
>   tagColor?: CONDITION_DISPLAY_COLOR_UNSPECIFIED | BLUE | BROWN | CYAN | DEEP_ORANGE | GREEN | INDIGO | LIME | ORANGE | PINK | PURPLE | TEAL
> }[]
> ```

> [accordion] parameterGroups full type
>
> ```ts theme={null}
> Record<string, {
>   parameters?: Record<string, {
>     conditionalValues?: Record<string, {
>       personalizationValue?: {
>         personalizationId?: string
>       },
>       value?: string,
>       experimentValue?: {
>         experimentId?: string,
>         exposurePercent?: number,
>         variantValue?: {
>           value?: string,
>           noChange?: boolean,
>           variantId?: string
>         }[]
>       },
>       rolloutValue?: {
>         value?: string,
>         percent?: number,
>         rolloutId?: string
>       },
>       useInAppDefault?: boolean
>     }>,
>     name?: string,
>     etag?: string,
>     defaultValue?: {
>       personalizationValue?: {
>         personalizationId?: string
>       },
>       value?: string,
>       experimentValue?: {
>         experimentId?: string,
>         exposurePercent?: number,
>         variantValue?: {
>           value?: string,
>           noChange?: boolean,
>           variantId?: string
>         }[]
>       },
>       rolloutValue?: {
>         value?: string,
>         percent?: number,
>         rolloutId?: string
>       },
>       useInAppDefault?: boolean
>     },
>     valueType?: PARAMETER_VALUE_TYPE_UNSPECIFIED | STRING | BOOLEAN | NUMBER | JSON,
>     description?: string
>   }>,
>   description?: string,
>   name?: string,
>   etag?: string
> }>
> ```

> [accordion] version full type
>
> ```ts theme={null}
> {
>   rollbackSource?: string | number,
>   description?: string,
>   updateUser?: {
>     email?: string,
>     imageUrl?: string,
>     name?: string
>   },
>   updateType?: REMOTE_CONFIG_UPDATE_TYPE_UNSPECIFIED | INCREMENTAL_UPDATE | FORCED_UPDATE | ROLLBACK,
>   isLegacy?: boolean,
>   versionNumber?: string | number,
>   updateOrigin?: REMOTE_CONFIG_UPDATE_ORIGIN_UNSPECIFIED | CONSOLE | REST_API | ADMIN_SDK_NODE,
>   updateTime?: string
> }
> ```

> [accordion] parameters full type
>
> ```ts theme={null}
> Record<string, {
>   conditionalValues?: Record<string, {
>     personalizationValue?: {
>       personalizationId?: string
>     },
>     value?: string,
>     experimentValue?: {
>       experimentId?: string,
>       exposurePercent?: number,
>       variantValue?: {
>         value?: string,
>         noChange?: boolean,
>         variantId?: string
>       }[]
>     },
>     rolloutValue?: {
>       value?: string,
>       percent?: number,
>       rolloutId?: string
>     },
>     useInAppDefault?: boolean
>   }>,
>   name?: string,
>   etag?: string,
>   defaultValue?: {
>     personalizationValue?: {
>       personalizationId?: string
>     },
>     value?: string,
>     experimentValue?: {
>       experimentId?: string,
>       exposurePercent?: number,
>       variantValue?: {
>         value?: string,
>         noChange?: boolean,
>         variantId?: string
>       }[]
>     },
>     rolloutValue?: {
>       value?: string,
>       percent?: number,
>       rolloutId?: string
>     },
>     useInAppDefault?: boolean
>   },
>   valueType?: PARAMETER_VALUE_TYPE_UNSPECIFIED | STRING | BOOLEAN | NUMBER | JSON,
>   description?: string
> }>
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `conditions` | `object[] \| null` | No | A list of conditions in descending order by priority. The values of the google.firebase.remoteconfig.v1.RemoteConfigCondition.name entries must be unique. |
| `parameterGroups` | `object \| null` | No | Map of parameter group names to their descriptions and grouped parameters. A group's name is mutable but must be unique among groups in the config. The name is limited to 256 characters and intended to be human-readable. Any Unicode characters are allowed. Groups have a list of parameters which allows users of the API to group parameters that are associated with the same feature or theme together for easy organizational access. |
| `version` | `object \| null` | No | Contains all metadata about a particular version of the Remote Config template. All fields are set at the time the specified Remote Config template was written. |
| `parameters` | `object \| null` | No | Map of parameter keys to their optional default values and optional conditional values. |
| `etag` | `string \| null` | No | The ETag of this template (from the response header). Pass it as `ifMatch` to publish a change, so a publish made in between is not overwritten. |

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   expression?: string | null,
>   name?: string | null,
>   etag?: string | null,
>   tagColor?: string | null
> }[] | null
> ```

> [accordion] parameterGroups full type
>
> ```ts theme={null}
> Record<string, {
>   parameters?: Record<string, {
>     conditionalValues?: Record<string, {
>       personalizationValue?: {
>         personalizationId?: string | null
>       } | null,
>       value?: string | null,
>       experimentValue?: {
>         experimentId?: string | null,
>         exposurePercent?: number | null,
>         variantValue?: {
>           value?: string | null,
>           noChange?: boolean | null,
>           variantId?: string | null
>         }[] | null
>       } | null,
>       rolloutValue?: {
>         value?: string | null,
>         percent?: number | null,
>         rolloutId?: string | null
>       } | null,
>       useInAppDefault?: boolean | null
>     }> | null,
>     name?: string | null,
>     etag?: string | null,
>     defaultValue?: {
>       personalizationValue?: {
>         personalizationId?: string | null
>       } | null,
>       value?: string | null,
>       experimentValue?: {
>         experimentId?: string | null,
>         exposurePercent?: number | null,
>         variantValue?: {
>           value?: string | null,
>           noChange?: boolean | null,
>           variantId?: string | null
>         }[] | null
>       } | null,
>       rolloutValue?: {
>         value?: string | null,
>         percent?: number | null,
>         rolloutId?: string | null
>       } | null,
>       useInAppDefault?: boolean | null
>     } | null,
>     valueType?: string | null,
>     description?: string | null
>   }> | null,
>   description?: string | null,
>   name?: string | null,
>   etag?: string | null
> }> | null
> ```

> [accordion] version full type
>
> ```ts theme={null}
> {
>   rollbackSource?: string | number | null,
>   description?: string | null,
>   updateUser?: {
>     email?: string | null,
>     imageUrl?: string | null,
>     name?: string | null
>   } | null,
>   updateType?: string | null,
>   isLegacy?: boolean | null,
>   versionNumber?: string | number | null,
>   updateOrigin?: string | null,
>   updateTime?: string | null
> } | null
> ```

> [accordion] parameters full type
>
> ```ts theme={null}
> Record<string, {
>   conditionalValues?: Record<string, {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   }> | null,
>   name?: string | null,
>   etag?: string | null,
>   defaultValue?: {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   } | null,
>   valueType?: string | null,
>   description?: string | null
> }> | null
> ```

***

### projects.getRemoteConfig

`remoteConfig.projects.getRemoteConfig`

Get a project's Remote Config template and associated ETag header. Returns the requested RemoteConfig as the payload and an ETag as a response header

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.projects.getRemoteConfig({ project: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | No | Optional. The name of the RemoteConfig to get. Format: projects/\{project}/namespaces/\{namespace}/remoteConfig Project is a Firebase project ID or project number. Namespace is the namespace ID (e.g.: 'firebase' or 'firebase-server') |
| `versionNumber` | `string \| number` | No | Optional. Version number of the RemoteConfig to look up. If not specified, the latest RemoteConfig will be returned. |
| `project` | `string` | Yes | Required. The Firebase project's Project ID or Project Number, prefixed with "projects/". Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `conditions` | `object[] \| null` | No | A list of conditions in descending order by priority. The values of the google.firebase.remoteconfig.v1.RemoteConfigCondition.name entries must be unique. |
| `parameterGroups` | `object \| null` | No | Map of parameter group names to their descriptions and grouped parameters. A group's name is mutable but must be unique among groups in the config. The name is limited to 256 characters and intended to be human-readable. Any Unicode characters are allowed. Groups have a list of parameters which allows users of the API to group parameters that are associated with the same feature or theme together for easy organizational access. |
| `version` | `object \| null` | No | Contains all metadata about a particular version of the Remote Config template. All fields are set at the time the specified Remote Config template was written. |
| `parameters` | `object \| null` | No | Map of parameter keys to their optional default values and optional conditional values. |
| `etag` | `string \| null` | No | The ETag of this template (from the response header). Pass it as `ifMatch` to publish a change, so a publish made in between is not overwritten. |

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   expression?: string | null,
>   name?: string | null,
>   etag?: string | null,
>   tagColor?: string | null
> }[] | null
> ```

> [accordion] parameterGroups full type
>
> ```ts theme={null}
> Record<string, {
>   parameters?: Record<string, {
>     conditionalValues?: Record<string, {
>       personalizationValue?: {
>         personalizationId?: string | null
>       } | null,
>       value?: string | null,
>       experimentValue?: {
>         experimentId?: string | null,
>         exposurePercent?: number | null,
>         variantValue?: {
>           value?: string | null,
>           noChange?: boolean | null,
>           variantId?: string | null
>         }[] | null
>       } | null,
>       rolloutValue?: {
>         value?: string | null,
>         percent?: number | null,
>         rolloutId?: string | null
>       } | null,
>       useInAppDefault?: boolean | null
>     }> | null,
>     name?: string | null,
>     etag?: string | null,
>     defaultValue?: {
>       personalizationValue?: {
>         personalizationId?: string | null
>       } | null,
>       value?: string | null,
>       experimentValue?: {
>         experimentId?: string | null,
>         exposurePercent?: number | null,
>         variantValue?: {
>           value?: string | null,
>           noChange?: boolean | null,
>           variantId?: string | null
>         }[] | null
>       } | null,
>       rolloutValue?: {
>         value?: string | null,
>         percent?: number | null,
>         rolloutId?: string | null
>       } | null,
>       useInAppDefault?: boolean | null
>     } | null,
>     valueType?: string | null,
>     description?: string | null
>   }> | null,
>   description?: string | null,
>   name?: string | null,
>   etag?: string | null
> }> | null
> ```

> [accordion] version full type
>
> ```ts theme={null}
> {
>   rollbackSource?: string | number | null,
>   description?: string | null,
>   updateUser?: {
>     email?: string | null,
>     imageUrl?: string | null,
>     name?: string | null
>   } | null,
>   updateType?: string | null,
>   isLegacy?: boolean | null,
>   versionNumber?: string | number | null,
>   updateOrigin?: string | null,
>   updateTime?: string | null
> } | null
> ```

> [accordion] parameters full type
>
> ```ts theme={null}
> Record<string, {
>   conditionalValues?: Record<string, {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   }> | null,
>   name?: string | null,
>   etag?: string | null,
>   defaultValue?: {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   } | null,
>   valueType?: string | null,
>   description?: string | null
> }> | null
> ```

***

### projects.updateRemoteConfig

`remoteConfig.projects.updateRemoteConfig`

Publish a project's Remote Config template. Pass the ETag returned by GetRemoteConfig as an `If-Match` header to ensure the last seen Remote Config template is the one being overwritten by this update

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.remoteConfig.projects.updateRemoteConfig({ project: 'projects/demo-project', ifMatch: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | The Firebase project's Project ID or Project Number, prefixed with "projects/". This field is required if the `name` field is not provided. Format: `projects/<id>`. |
| `validateOnly` | `boolean` | No | Optional. Defaults to `false`. If `true`, the server will only attempt to validate the RemoteConfig. If validation succeeds, the RemoteConfig is not written to the Remote Config server, instead a `200 OK` response is returned. If validation fails, a validation error is returned. Note: other errors may still occur after this boolean is set to `false`, even if getting a `200 OK` when calling with UpdateRemoteConfig with `validate_only` set to `true`. |
| `name` | `string` | No | Optional. The name of the RemoteConfig to update. Format: projects/\{project}/namespaces/\{namespace}/remoteConfig Project is a Firebase project ID or project number. Namespace is the namespace ID (e.g.: firebase or firebase-server) |
| `conditions` | `object[]` | No | A list of conditions in descending order by priority. The values of the google.firebase.remoteconfig.v1.RemoteConfigCondition.name entries must be unique. |
| `parameterGroups` | `object` | No | Map of parameter group names to their descriptions and grouped parameters. A group's name is mutable but must be unique among groups in the config. The name is limited to 256 characters and intended to be human-readable. Any Unicode characters are allowed. Groups have a list of parameters which allows users of the API to group parameters that are associated with the same feature or theme together for easy organizational access. |
| `version` | `object` | No | Contains all metadata about a particular version of the Remote Config template. All fields are set at the time the specified Remote Config template was written. |
| `parameters` | `object` | No | Map of parameter keys to their optional default values and optional conditional values. |
| `ifMatch` | `string` | Yes | The ETag of the template being replaced (`etag` from remoteConfig.projects.getRemoteConfig), or `*` to replace whatever is published. |

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   expression?: string,
>   name?: string,
>   etag?: string,
>   tagColor?: CONDITION_DISPLAY_COLOR_UNSPECIFIED | BLUE | BROWN | CYAN | DEEP_ORANGE | GREEN | INDIGO | LIME | ORANGE | PINK | PURPLE | TEAL
> }[]
> ```

> [accordion] parameterGroups full type
>
> ```ts theme={null}
> Record<string, {
>   parameters?: Record<string, {
>     conditionalValues?: Record<string, {
>       personalizationValue?: {
>         personalizationId?: string
>       },
>       value?: string,
>       experimentValue?: {
>         experimentId?: string,
>         exposurePercent?: number,
>         variantValue?: {
>           value?: string,
>           noChange?: boolean,
>           variantId?: string
>         }[]
>       },
>       rolloutValue?: {
>         value?: string,
>         percent?: number,
>         rolloutId?: string
>       },
>       useInAppDefault?: boolean
>     }>,
>     name?: string,
>     etag?: string,
>     defaultValue?: {
>       personalizationValue?: {
>         personalizationId?: string
>       },
>       value?: string,
>       experimentValue?: {
>         experimentId?: string,
>         exposurePercent?: number,
>         variantValue?: {
>           value?: string,
>           noChange?: boolean,
>           variantId?: string
>         }[]
>       },
>       rolloutValue?: {
>         value?: string,
>         percent?: number,
>         rolloutId?: string
>       },
>       useInAppDefault?: boolean
>     },
>     valueType?: PARAMETER_VALUE_TYPE_UNSPECIFIED | STRING | BOOLEAN | NUMBER | JSON,
>     description?: string
>   }>,
>   description?: string,
>   name?: string,
>   etag?: string
> }>
> ```

> [accordion] version full type
>
> ```ts theme={null}
> {
>   rollbackSource?: string | number,
>   description?: string,
>   updateUser?: {
>     email?: string,
>     imageUrl?: string,
>     name?: string
>   },
>   updateType?: REMOTE_CONFIG_UPDATE_TYPE_UNSPECIFIED | INCREMENTAL_UPDATE | FORCED_UPDATE | ROLLBACK,
>   isLegacy?: boolean,
>   versionNumber?: string | number,
>   updateOrigin?: REMOTE_CONFIG_UPDATE_ORIGIN_UNSPECIFIED | CONSOLE | REST_API | ADMIN_SDK_NODE,
>   updateTime?: string
> }
> ```

> [accordion] parameters full type
>
> ```ts theme={null}
> Record<string, {
>   conditionalValues?: Record<string, {
>     personalizationValue?: {
>       personalizationId?: string
>     },
>     value?: string,
>     experimentValue?: {
>       experimentId?: string,
>       exposurePercent?: number,
>       variantValue?: {
>         value?: string,
>         noChange?: boolean,
>         variantId?: string
>       }[]
>     },
>     rolloutValue?: {
>       value?: string,
>       percent?: number,
>       rolloutId?: string
>     },
>     useInAppDefault?: boolean
>   }>,
>   name?: string,
>   etag?: string,
>   defaultValue?: {
>     personalizationValue?: {
>       personalizationId?: string
>     },
>     value?: string,
>     experimentValue?: {
>       experimentId?: string,
>       exposurePercent?: number,
>       variantValue?: {
>         value?: string,
>         noChange?: boolean,
>         variantId?: string
>       }[]
>     },
>     rolloutValue?: {
>       value?: string,
>       percent?: number,
>       rolloutId?: string
>     },
>     useInAppDefault?: boolean
>   },
>   valueType?: PARAMETER_VALUE_TYPE_UNSPECIFIED | STRING | BOOLEAN | NUMBER | JSON,
>   description?: string
> }>
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `conditions` | `object[] \| null` | No | A list of conditions in descending order by priority. The values of the google.firebase.remoteconfig.v1.RemoteConfigCondition.name entries must be unique. |
| `parameterGroups` | `object \| null` | No | Map of parameter group names to their descriptions and grouped parameters. A group's name is mutable but must be unique among groups in the config. The name is limited to 256 characters and intended to be human-readable. Any Unicode characters are allowed. Groups have a list of parameters which allows users of the API to group parameters that are associated with the same feature or theme together for easy organizational access. |
| `version` | `object \| null` | No | Contains all metadata about a particular version of the Remote Config template. All fields are set at the time the specified Remote Config template was written. |
| `parameters` | `object \| null` | No | Map of parameter keys to their optional default values and optional conditional values. |
| `etag` | `string \| null` | No | The ETag of this template (from the response header). Pass it as `ifMatch` to publish a change, so a publish made in between is not overwritten. |

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   expression?: string | null,
>   name?: string | null,
>   etag?: string | null,
>   tagColor?: string | null
> }[] | null
> ```

> [accordion] parameterGroups full type
>
> ```ts theme={null}
> Record<string, {
>   parameters?: Record<string, {
>     conditionalValues?: Record<string, {
>       personalizationValue?: {
>         personalizationId?: string | null
>       } | null,
>       value?: string | null,
>       experimentValue?: {
>         experimentId?: string | null,
>         exposurePercent?: number | null,
>         variantValue?: {
>           value?: string | null,
>           noChange?: boolean | null,
>           variantId?: string | null
>         }[] | null
>       } | null,
>       rolloutValue?: {
>         value?: string | null,
>         percent?: number | null,
>         rolloutId?: string | null
>       } | null,
>       useInAppDefault?: boolean | null
>     }> | null,
>     name?: string | null,
>     etag?: string | null,
>     defaultValue?: {
>       personalizationValue?: {
>         personalizationId?: string | null
>       } | null,
>       value?: string | null,
>       experimentValue?: {
>         experimentId?: string | null,
>         exposurePercent?: number | null,
>         variantValue?: {
>           value?: string | null,
>           noChange?: boolean | null,
>           variantId?: string | null
>         }[] | null
>       } | null,
>       rolloutValue?: {
>         value?: string | null,
>         percent?: number | null,
>         rolloutId?: string | null
>       } | null,
>       useInAppDefault?: boolean | null
>     } | null,
>     valueType?: string | null,
>     description?: string | null
>   }> | null,
>   description?: string | null,
>   name?: string | null,
>   etag?: string | null
> }> | null
> ```

> [accordion] version full type
>
> ```ts theme={null}
> {
>   rollbackSource?: string | number | null,
>   description?: string | null,
>   updateUser?: {
>     email?: string | null,
>     imageUrl?: string | null,
>     name?: string | null
>   } | null,
>   updateType?: string | null,
>   isLegacy?: boolean | null,
>   versionNumber?: string | number | null,
>   updateOrigin?: string | null,
>   updateTime?: string | null
> } | null
> ```

> [accordion] parameters full type
>
> ```ts theme={null}
> Record<string, {
>   conditionalValues?: Record<string, {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   }> | null,
>   name?: string | null,
>   etag?: string | null,
>   defaultValue?: {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   } | null,
>   valueType?: string | null,
>   description?: string | null
> }> | null
> ```

***

### remoteConfig.downloadDefaults

`remoteConfig.remoteConfig.downloadDefaults`

Get a project's current Remote Config template parameters and default values in JSON, property list (plist), or XML format. To download the server-side template defaults, use "firebase-server" as the namespace ID in \[DownloadDefaultsRequest.name]

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.remoteConfig.downloadDefaults({ project: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | Required. The Firebase project's Project ID or Project Number, prefixed with "projects/". Format: `projects/<id>`. |
| `format` | `FORMAT_UNSPECIFIED \| XML \| PLIST \| JSON` | No | Required. The file structure to return. |
| `name` | `string` | No | Optional. The name of the RemoteConfig to get defaults from. Format: projects/\{project}/namespaces/\{namespace}/remoteConfig Project is a Firebase project ID or project number. Namespace is the namespace ID (e.g.: 'firebase' or 'firebase-server') |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### remoteConfig.listVersions

`remoteConfig.remoteConfig.listVersions`

Get a list of Remote Config template versions that have been published, sorted in reverse chronological order. Only the last 300 versions are stored (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.remoteConfig.remoteConfig.listVersions({ project: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Optional. The next\_page\_token value returned from a previous List request, if any. |
| `project` | `string` | Yes | Required. The Firebase project's Project ID or Project Number, prefixed with "projects/". Format: `projects/<id>`. |
| `pageSize` | `number` | No | Optional. The maximum number of items to return per page. |
| `parent` | `string` | No | Optional. The resource name of the RemoteConfig to list versions for. Format: projects/\{project}/namespaces/\{namespace}/remoteConfig Project is a Firebase project ID or project number. Namespace is the namespace ID (e.g.: 'firebase' or 'firebase-server') |
| `endVersionNumber` | `string \| number` | No | Optional. Specify the newest version number to include in the results. If specified, must be greater than zero. Defaults to the newest version. |
| `startTime` | `string` | No | Optional. Specify the earliest update time to include in the results; any entries updated before this time are omitted. |
| `endTime` | `string` | No | Optional. Specify the latest update time to include in the results; any entries updated on or after this time are omitted. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | Token to retrieve the next page of results, or empty if there are no more results in the list. |
| `versions` | `object[] \| null` | No | A list of version metadata objects, sorted in reverse chronological order. |

> [accordion] versions full type
>
> ```ts theme={null}
> {
>   rollbackSource?: string | number | null,
>   description?: string | null,
>   updateUser?: {
>     email?: string | null,
>     imageUrl?: string | null,
>     name?: string | null
>   } | null,
>   updateType?: string | null,
>   isLegacy?: boolean | null,
>   versionNumber?: string | number | null,
>   updateOrigin?: string | null,
>   updateTime?: string | null
> }[] | null
> ```

***

### remoteConfig.rollback

`remoteConfig.remoteConfig.rollback`

Roll back a project's published Remote Config template to the one specified by the provided version number. A rollback is equivalent to getting a previously published Remote Config template, and re-publishing it using a force update

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.remoteConfig.remoteConfig.rollback({ project: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | The Firebase project's Project ID or Project Number, prefixed with "projects/". This field is required if the `name` field is not provided. Format: `projects/<id>`. |
| `body_project` | `string` | No | The Firebase project's Project ID or Project Number, prefixed with "projects/". This field is required if the `name` field is not provided. |
| `versionNumber` | `string \| number` | No | Required. The version number of the RemoteConfig to roll back to. The specified version number must be less than the current version number, and not have been deleted due to staleness. |
| `name` | `string` | No | Optional. The name of the RemoteConfig to rollback. Format: projects/\{project}/namespaces/\{namespace}/remoteConfig Project is a Firebase project ID or project number. Namespace is the namespace ID (e.g.: firebase or firebase-server) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `conditions` | `object[] \| null` | No | A list of conditions in descending order by priority. The values of the google.firebase.remoteconfig.v1.RemoteConfigCondition.name entries must be unique. |
| `parameterGroups` | `object \| null` | No | Map of parameter group names to their descriptions and grouped parameters. A group's name is mutable but must be unique among groups in the config. The name is limited to 256 characters and intended to be human-readable. Any Unicode characters are allowed. Groups have a list of parameters which allows users of the API to group parameters that are associated with the same feature or theme together for easy organizational access. |
| `version` | `object \| null` | No | Contains all metadata about a particular version of the Remote Config template. All fields are set at the time the specified Remote Config template was written. |
| `parameters` | `object \| null` | No | Map of parameter keys to their optional default values and optional conditional values. |
| `etag` | `string \| null` | No | The ETag of this template (from the response header). Pass it as `ifMatch` to publish a change, so a publish made in between is not overwritten. |

> [accordion] conditions full type
>
> ```ts theme={null}
> {
>   expression?: string | null,
>   name?: string | null,
>   etag?: string | null,
>   tagColor?: string | null
> }[] | null
> ```

> [accordion] parameterGroups full type
>
> ```ts theme={null}
> Record<string, {
>   parameters?: Record<string, {
>     conditionalValues?: Record<string, {
>       personalizationValue?: {
>         personalizationId?: string | null
>       } | null,
>       value?: string | null,
>       experimentValue?: {
>         experimentId?: string | null,
>         exposurePercent?: number | null,
>         variantValue?: {
>           value?: string | null,
>           noChange?: boolean | null,
>           variantId?: string | null
>         }[] | null
>       } | null,
>       rolloutValue?: {
>         value?: string | null,
>         percent?: number | null,
>         rolloutId?: string | null
>       } | null,
>       useInAppDefault?: boolean | null
>     }> | null,
>     name?: string | null,
>     etag?: string | null,
>     defaultValue?: {
>       personalizationValue?: {
>         personalizationId?: string | null
>       } | null,
>       value?: string | null,
>       experimentValue?: {
>         experimentId?: string | null,
>         exposurePercent?: number | null,
>         variantValue?: {
>           value?: string | null,
>           noChange?: boolean | null,
>           variantId?: string | null
>         }[] | null
>       } | null,
>       rolloutValue?: {
>         value?: string | null,
>         percent?: number | null,
>         rolloutId?: string | null
>       } | null,
>       useInAppDefault?: boolean | null
>     } | null,
>     valueType?: string | null,
>     description?: string | null
>   }> | null,
>   description?: string | null,
>   name?: string | null,
>   etag?: string | null
> }> | null
> ```

> [accordion] version full type
>
> ```ts theme={null}
> {
>   rollbackSource?: string | number | null,
>   description?: string | null,
>   updateUser?: {
>     email?: string | null,
>     imageUrl?: string | null,
>     name?: string | null
>   } | null,
>   updateType?: string | null,
>   isLegacy?: boolean | null,
>   versionNumber?: string | number | null,
>   updateOrigin?: string | null,
>   updateTime?: string | null
> } | null
> ```

> [accordion] parameters full type
>
> ```ts theme={null}
> Record<string, {
>   conditionalValues?: Record<string, {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   }> | null,
>   name?: string | null,
>   etag?: string | null,
>   defaultValue?: {
>     personalizationValue?: {
>       personalizationId?: string | null
>     } | null,
>     value?: string | null,
>     experimentValue?: {
>       experimentId?: string | null,
>       exposurePercent?: number | null,
>       variantValue?: {
>         value?: string | null,
>         noChange?: boolean | null,
>         variantId?: string | null
>       }[] | null
>     } | null,
>     rolloutValue?: {
>       value?: string | null,
>       percent?: number | null,
>       rolloutId?: string | null
>     } | null,
>     useInAppDefault?: boolean | null
>   } | null,
>   valueType?: string | null,
>   description?: string | null
> }> | null
> ```

***

## Rules

### projects.test

`rules.projects.test`

Test `Source` for syntactic and semantic correctness. Issues present, if any, will be returned to the caller with a description, severity, and source location

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.rules.projects.test({ name: 'projects/ada' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Tests may either provide `source` or a `Ruleset` resource name. For tests against `source`, the resource name must refer to the project: Format: `projects/{project_id}` For tests against a `Ruleset`, this must be the `Ruleset` resource name: Format: `projects/{project_id}/rulesets/{ruleset_id}` Format: `projects/<path>`. |
| `testSuite` | `object` | No | `TestSuite` is a collection of `TestCase` instances that validate the logical correctness of a `Ruleset`. The `TestSuite` may be referenced in-line within a `TestRuleset` invocation or as part of a `Release` object as a pre-release check. |
| `source` | `object` | No | `Source` is one or more `File` messages comprising a logical set of rules. |

> [accordion] testSuite full type
>
> ```ts theme={null}
> {
>   testCases?: {
>     expectation?: EXPECTATION_UNSPECIFIED | ALLOW | DENY,
>     request?: any,
>     pathEncoding?: ENCODING_UNSPECIFIED | URL_ENCODED | PLAIN,
>     resource?: any,
>     functionMocks?: {
>       args?: {
>         exactValue?: any,
>         anyValue?: {
>         }
>       }[],
>       function?: string,
>       result?: {
>         undefined?: {
>         },
>         value?: any
>       }
>     }[],
>     expressionReportLevel?: LEVEL_UNSPECIFIED | NONE | FULL | VISITED
>   }[]
> }
> ```

> [accordion] source full type
>
> ```ts theme={null}
> {
>   files?: {
>     name?: string,
>     content?: string,
>     fingerprint?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `testResults` | `object[] \| null` | No | The set of test results given the test cases in the `TestSuite`. The results will appear in the same order as the test cases appear in the `TestSuite`. |
| `issues` | `object[] \| null` | No | Syntactic and semantic `Source` issues of varying severity. Issues of `ERROR` severity will prevent tests from executing. |

> [accordion] testResults full type
>
> ```ts theme={null}
> {
>   errorPosition?: {
>     currentOffset?: number | null,
>     fileName?: string | null,
>     line?: number | null,
>     endOffset?: number | null,
>     column?: number | null
>   } | null,
>   functionCalls?: {
>     args?: any[] | null,
>     function?: string | null
>   }[] | null,
>   debugMessages?: string[] | null,
>   visitedExpressions?: {
>     sourcePosition?: {
>       currentOffset?: number | null,
>       fileName?: string | null,
>       line?: number | null,
>       endOffset?: number | null,
>       column?: number | null
>     } | null,
>     value?: any | null
>   }[] | null,
>   state?: string | null,
>   expressionReports?: {
>     values?: {
>       value?: any | null,
>       count?: number | null
>     }[] | null,
>     sourcePosition?: {
>       currentOffset?: number | null,
>       fileName?: string | null,
>       line?: number | null,
>       endOffset?: number | null,
>       column?: number | null
>     } | null,
>     children?: {
>       values?: {
>         value?: any | null,
>         count?: number | null
>       }[] | null,
>       sourcePosition?: {
>         currentOffset?: number | null,
>         fileName?: string | null,
>         line?: number | null,
>         endOffset?: number | null,
>         column?: number | null
>       } | null,
>       children?: (recursive)[] | null
>     }[] | null
>   }[] | null
> }[] | null
> ```

> [accordion] issues full type
>
> ```ts theme={null}
> {
>   severity?: string | null,
>   sourcePosition?: {
>     currentOffset?: number | null,
>     fileName?: string | null,
>     line?: number | null,
>     endOffset?: number | null,
>     column?: number | null
>   } | null,
>   description?: string | null
> }[] | null
> ```

***

### releases.create

`rules.releases.create`

Create a `Release`. Release names should reflect the developer's deployment practices

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.rules.releases.create({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Resource name for the project which owns this `Release`. Format: `projects/{project_id}` Format: `projects/<id>`. |
| `body_name` | `string` | No | Required. Format: `projects/{project_id}/releases/{release_id}` |
| `rulesetName` | `string` | No | Required. Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must exist for the `Release` to be created. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Required. Format: `projects/{project_id}/releases/{release_id}` |
| `createTime` | `string \| null` | No | Output only. Time the release was created. |
| `updateTime` | `string \| null` | No | Output only. Time the release was updated. |
| `rulesetName` | `string \| null` | No | Required. Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must exist for the `Release` to be created. |

***

### releases.delete

`rules.releases.delete`

Delete a `Release` by resource name

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.rules.releases.delete({ name: 'projects/demo-project/releases/ada' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Resource name for the `Release` to delete. Format: `projects/{project_id}/releases/{release_id}` Format: `projects/<id>/releases/<path>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### releases.get

`rules.releases.get`

Get a `Release` by name

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.rules.releases.get({ name: 'projects/demo-project/releases/ada' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Resource name of the `Release`. Format: `projects/{project_id}/releases/{release_id}` Format: `projects/<id>/releases/<path>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Required. Format: `projects/{project_id}/releases/{release_id}` |
| `createTime` | `string \| null` | No | Output only. Time the release was created. |
| `updateTime` | `string \| null` | No | Output only. Time the release was updated. |
| `rulesetName` | `string \| null` | No | Required. Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must exist for the `Release` to be created. |

***

### releases.getExecutable

`rules.releases.getExecutable`

Get the `Release` executable to use when enforcing rules

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.rules.releases.getExecutable({ name: 'projects/demo-project/releases/ada' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Resource name of the `Release`. Format: `projects/{project_id}/releases/{release_id}` Format: `projects/<id>/releases/<path>`. |
| `executableVersion` | `RELEASE_EXECUTABLE_VERSION_UNSPECIFIED \| FIREBASE_RULES_EXECUTABLE_V1 \| FIREBASE_RULES_EXECUTABLE_V2` | No | Optional. The requested runtime executable version. Defaults to FIREBASE\_RULES\_EXECUTABLE\_V1. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `executable` | `string \| null` | No | Executable view of the `Ruleset` referenced by the `Release`. (base64) |
| `language` | `string \| null` | No | `Language` used to generate the executable bytes. |
| `updateTime` | `string \| null` | No | Timestamp for the most recent `Release.update_time`. |
| `rulesetName` | `string \| null` | No | `Ruleset` name associated with the `Release` executable. |
| `syncTime` | `string \| null` | No | Optional, indicates the freshness of the result. The response is guaranteed to be the latest within an interval up to the sync\_time (inclusive). |
| `executableVersion` | `string \| null` | No | The Rules runtime version of the executable. |

***

### releases.list

`rules.releases.list`

List the `Release` values for a project. This list may optionally be filtered by `Release` name, `Ruleset` name, `TestSuite` name, or any combination thereof (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.rules.releases.list({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | Optional. `Release` filter. The list method supports filters with restrictions on the `Release.name`, and `Release.ruleset_name`. Example 1: A filter of 'name=prod\*' might return `Release`s with names within 'projects/foo' prefixed with 'prod': Name -> Ruleset Name: \* projects/foo/releases/prod -> projects/foo/rulesets/uuid1234 \* projects/foo/releases/prod/v1 -> projects/foo/rulesets/uuid1234 \* projects/foo/releases/prod/v2 -> projects/foo/rulesets/uuid8888 Example 2: A filter of `name=prod* ruleset_name=uuid1234` would return only `Release` instances for 'projects/foo' with names prefixed… |
| `pageSize` | `number` | No | Optional. Page size to load. Maximum of 100. Defaults to 10. Note: `page_size` is just a hint and the service may choose to load fewer than `page_size` results due to the size of the output. To traverse all of the releases, the caller should iterate until the `page_token` on the response is empty. |
| `pageToken` | `string` | No | Optional. Next page token for the next batch of `Release` instances. |
| `name` | `string` | Yes | Required. Resource name for the project. Format: `projects/{project_id}` Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `releases` | `object[] \| null` | No | List of `Release` instances. |
| `nextPageToken` | `string \| null` | No | The pagination token to retrieve the next page of results. If the value is empty, no further results remain. |

> [accordion] releases full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   createTime?: string | null,
>   updateTime?: string | null,
>   rulesetName?: string | null
> }[] | null
> ```

***

### releases.patch

`rules.releases.patch`

Update a `Release` via PATCH. Only updates to `ruleset_name` will be honored. `Release` rename is not supported

**Risk:** `destructive`

```ts theme={null}
await corsair.firebase.api.rules.releases.patch({ name: 'projects/demo-project/releases/ada' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Resource name for the project which owns this `Release`. Format: `projects/{project_id}` Format: `projects/<id>/releases/<path>`. |
| `release` | `object` | No | `Release` is a named reference to a `Ruleset`. Once a `Release` refers to a `Ruleset`, rules-enabled services will be able to enforce the `Ruleset`. |
| `updateMask` | `string` | No | Optional. Specifies which fields to update. |

> [accordion] release full type
>
> ```ts theme={null}
> {
>   name?: string,
>   rulesetName?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Required. Format: `projects/{project_id}/releases/{release_id}` |
| `createTime` | `string \| null` | No | Output only. Time the release was created. |
| `updateTime` | `string \| null` | No | Output only. Time the release was updated. |
| `rulesetName` | `string \| null` | No | Required. Name of the `Ruleset` referred to by this `Release`. The `Ruleset` must exist for the `Release` to be created. |

***

### rulesets.create

`rules.rulesets.create`

Create a `Ruleset` from `Source`. The `Ruleset` is given a unique generated name which is returned to the caller. `Source` containing syntactic or semantics errors will result in an error response indicating the first error encountered

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.rules.rulesets.create({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Resource name for Project which owns this `Ruleset`. Format: `projects/{project_id}` Format: `projects/<id>`. |
| `source` | `object` | No | `Source` is one or more `File` messages comprising a logical set of rules. |
| `attachmentPoint` | `string` | No | Immutable. Intended resource to which this Ruleset should be released. May be left blank to signify the resource associated with the default release. Expected format: firestore.googleapis.com/projects//databases/ |

> [accordion] source full type
>
> ```ts theme={null}
> {
>   files?: {
>     name?: string,
>     content?: string,
>     fingerprint?: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `metadata` | `object \| null` | No | Metadata for a Ruleset. |
| `source` | `object \| null` | No | `Source` is one or more `File` messages comprising a logical set of rules. |
| `createTime` | `string \| null` | No | Output only. Time the `Ruleset` was created. |
| `attachmentPoint` | `string \| null` | No | Immutable. Intended resource to which this Ruleset should be released. May be left blank to signify the resource associated with the default release. Expected format: firestore.googleapis.com/projects//databases/ |
| `name` | `string \| null` | No | Output only. Name of the `Ruleset`. The ruleset\_id is auto generated by the service. Format: `projects/{project_id}/rulesets/{ruleset_id}` |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   services?: string[] | null
> } | null
> ```

> [accordion] source full type
>
> ```ts theme={null}
> {
>   files?: {
>     name?: string | null,
>     content?: string | null,
>     fingerprint?: string | null
>   }[] | null
> } | null
> ```

***

### rulesets.delete

`rules.rulesets.delete`

Delete a `Ruleset` by resource name. If the `Ruleset` is referenced by a `Release` the operation will fail

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.rules.rulesets.delete({ name: 'projects/demo-project/rulesets/ruleset-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Resource name for the ruleset to delete. Format: `projects/{project_id}/rulesets/{ruleset_id}` Format: `projects/<id>/rulesets/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### rulesets.get

`rules.rulesets.get`

Get a `Ruleset` by name including the full `Source` contents

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.rules.rulesets.get({ name: 'projects/demo-project/rulesets/ruleset-1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Resource name for the ruleset to get. Format: `projects/{project_id}/rulesets/{ruleset_id}` Format: `projects/<id>/rulesets/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `metadata` | `object \| null` | No | Metadata for a Ruleset. |
| `source` | `object \| null` | No | `Source` is one or more `File` messages comprising a logical set of rules. |
| `createTime` | `string \| null` | No | Output only. Time the `Ruleset` was created. |
| `attachmentPoint` | `string \| null` | No | Immutable. Intended resource to which this Ruleset should be released. May be left blank to signify the resource associated with the default release. Expected format: firestore.googleapis.com/projects//databases/ |
| `name` | `string \| null` | No | Output only. Name of the `Ruleset`. The ruleset\_id is auto generated by the service. Format: `projects/{project_id}/rulesets/{ruleset_id}` |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   services?: string[] | null
> } | null
> ```

> [accordion] source full type
>
> ```ts theme={null}
> {
>   files?: {
>     name?: string | null,
>     content?: string | null,
>     fingerprint?: string | null
>   }[] | null
> } | null
> ```

***

### rulesets.list

`rules.rulesets.list`

List `Ruleset` metadata only and optionally filter the results by `Ruleset` name. The full `Source` contents of a `Ruleset` may be retrieved with GetRuleset (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.rules.rulesets.list({ name: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pageToken` | `string` | No | Optional. Next page token for loading the next batch of `Ruleset` instances. |
| `pageSize` | `number` | No | Optional. Page size to load. Maximum of 100. Defaults to 10. Note: `page_size` is just a hint and the service may choose to load less than `page_size` due to the size of the output. To traverse all of the releases, caller should iterate until the `page_token` is empty. |
| `filter` | `string` | No | Optional. `Ruleset` filter. The list method supports filters with restrictions on `Ruleset.name`. Filters on `Ruleset.create_time` should use the `date` function which parses strings that conform to the RFC 3339 date/time specifications. Example: `create_time > date("2017-01-01T00:00:00Z") AND name=UUID-*` |
| `name` | `string` | Yes | Required. Resource name for the project. Format: `projects/{project_id}` Format: `projects/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The pagination token to retrieve the next page of results. If the value is empty, no further results remain. |
| `rulesets` | `object[] \| null` | No | List of `Ruleset` instances. |

> [accordion] rulesets full type
>
> ```ts theme={null}
> {
>   metadata?: {
>     services?: string[] | null
>   } | null,
>   source?: {
>     files?: {
>       name?: string | null,
>       content?: string | null,
>       fingerprint?: string | null
>     }[] | null
>   } | null,
>   createTime?: string | null,
>   attachmentPoint?: string | null,
>   name?: string | null
> }[] | null
> ```

***

## Storage

### buckets.delete

`storage.buckets.delete`

Deletes an empty bucket. Deletions are permanent unless soft delete is enabled on the bucket

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.storage.buckets.delete({ bucket: 'demo-project.appspot.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `ifMetagenerationMatch` | `string \| number` | No | If set, only deletes the bucket if its metageneration matches this value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | If set, only deletes the bucket if its metageneration does not match this value. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### buckets.get

`storage.buckets.get`

Returns metadata for the specified bucket

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.storage.buckets.get({ bucket: 'demo-project.appspot.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `generation` | `string \| number` | No | If present, specifies the generation of the bucket. This is required if softDeleted is true. |
| `softDeleted` | `boolean` | No | If true, return the soft-deleted version of this bucket. The default is false. For more information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the bucket. |
| `billing` | `object \| null` | No | The bucket's billing configuration. |
| `cors` | `object[] \| null` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object \| null` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean \| null` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[] \| null` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object \| null` | No | Encryption configuration for a bucket. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object \| null` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object \| null` | No | The bucket's IAM configuration. |
| `id` | `string \| null` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object \| null` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string \| null` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string> \| null` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object \| null` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object \| null` | No | The bucket's Autoclass configuration. |
| `location` | `string \| null` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string \| null` | No | The type of the bucket location. |
| `logging` | `object \| null` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number \| null` | No | The generation of this bucket. |
| `metageneration` | `string \| number \| null` | No | The metadata generation of this bucket. |
| `name` | `string \| null` | No | The name of the bucket. |
| `owner` | `object \| null` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number \| null` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object \| null` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object \| null` | No | The bucket's object retention config. |
| `rpo` | `string \| null` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string \| null` | No | The URI of this bucket. |
| `softDeletePolicy` | `object \| null` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string \| null` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string \| null` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string \| null` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string \| null` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object \| null` | No | The bucket's versioning configuration. |
| `website` | `object \| null` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean \| null` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean \| null` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   id?: string | null,
>   kind?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean | null
> } | null
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number | null,
>   method?: string[] | null,
>   origin?: string[] | null,
>   responseHeader?: string[] | null
> }[] | null
> ```

> [accordion] customPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[] | null
> } | null
> ```

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string | null,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   uniformBucketLevelAccess?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   publicAccessPrevention?: string | null
> } | null
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[] | null
>   } | null,
>   vpcNetworkSources?: {
>     network?: string | null,
>     allowedIpCidrRanges?: string[] | null
>   }[] | null,
>   allowCrossOrgVpcs?: boolean | null,
>   allowAllServiceAgentAccess?: boolean | null
> } | null
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string | null,
>       type?: string | null
>     } | null,
>     condition?: {
>       age?: number | null,
>       createdBefore?: string | null,
>       customTimeBefore?: string | null,
>       daysSinceCustomTime?: number | null,
>       daysSinceNoncurrentTime?: number | null,
>       isLive?: boolean | null,
>       matchesPattern?: string | null,
>       matchesPrefix?: string[] | null,
>       matchesSuffix?: string[] | null,
>       matchesStorageClass?: string[] | null,
>       noncurrentTimeBefore?: string | null,
>       sizeAboveBytes?: string | number | null,
>       sizeBelowBytes?: string | number | null,
>       numNewerVersions?: number | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   toggleTime?: string | null,
>   terminalStorageClass?: string | null,
>   terminalStorageClassUpdateTime?: string | null
> } | null
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string | null,
>   logObjectPrefix?: string | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string | null,
>   isLocked?: boolean | null,
>   retentionPeriod?: string | number | null
> } | null
> ```

> [accordion] objectRetention full type
>
> ```ts theme={null}
> {
>   mode?: string | null
> } | null
> ```

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number | null,
>   effectiveTime?: string | null,
>   hardDeletePause?: {
>     enabled?: boolean | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string | null,
>   notFoundPage?: string | null
> } | null
> ```

***

### buckets.getIamPolicy

`storage.buckets.getIamPolicy`

Returns an IAM policy for the specified bucket

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.storage.buckets.getIamPolicy({ bucket: 'demo-project.appspot.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `optionsRequestedPolicyVersion` | `number` | No | The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | An association between a role, which comes with a set of permissions, and members who may assume that role. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the policy. (base64) |
| `kind` | `string \| null` | No | The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. |
| `resourceId` | `string \| null` | No | The ID of the resource to which this policy belongs. Will be of the form projects/*/buckets/bucket for buckets, projects/*/buckets/bucket/objects/object for objects, and projects/*/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/*/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. |
| `version` | `number \| null` | No | The IAM policy format version. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### buckets.getStorageLayout

`storage.buckets.getStorageLayout`

Returns the storage layout configuration for the specified bucket. Note that this operation requires storage.objects.list permission

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.storage.buckets.getStorageLayout({ bucket: 'demo-project.appspot.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `prefix` | `string` | No | An optional prefix used for permission check. It is useful when the caller only has storage.objects.list permission under a specific prefix. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string \| null` | No | The name of the bucket. |
| `customPlacementConfig` | `object \| null` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `hierarchicalNamespace` | `object \| null` | No | The bucket's hierarchical namespace configuration. |
| `kind` | `string \| null` | No | The kind of item this is. For storage layout, this is always storage#storageLayout. |
| `location` | `string \| null` | No | The location of the bucket. |
| `locationType` | `string \| null` | No | The type of the bucket location. |
| `rapidCacheInfo` | `object \| null` | No | The Rapid Cache configuration for the bucket. |

> [accordion] customPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[] | null
> } | null
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] rapidCacheInfo full type
>
> ```ts theme={null}
> {
>   cacheType?: string | null
> } | null
> ```

***

### buckets.insert

`storage.buckets.insert`

Creates a new bucket

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storage.buckets.insert({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `predefinedAcl` | `authenticatedRead \| private \| projectPrivate \| publicRead \| publicReadWrite` | No | Apply a predefined set of access controls to this bucket. |
| `predefinedDefaultObjectAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of default object access controls to this bucket. |
| `project` | `string` | Yes | A valid API project identifier. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full. |
| `userProject` | `string` | No | The project to be billed for this request. |
| `enableObjectRetention` | `boolean` | No | When set to true, object retention is enabled for this bucket. |
| `acl` | `object[]` | No | Access controls on the bucket. |
| `billing` | `object` | No | The bucket's billing configuration. |
| `cors` | `object[]` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[]` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object` | No | Encryption configuration for a bucket. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object` | No | The bucket's IAM configuration. |
| `id` | `string` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string>` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object` | No | The bucket's Autoclass configuration. |
| `location` | `string` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string` | No | The type of the bucket location. |
| `logging` | `object` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number` | No | The generation of this bucket. |
| `metageneration` | `string \| number` | No | The metadata generation of this bucket. |
| `name` | `string` | No | The name of the bucket. |
| `owner` | `object` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object` | No | The bucket's object retention config. |
| `rpo` | `string` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string` | No | The URI of this bucket. |
| `softDeletePolicy` | `object` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object` | No | The bucket's versioning configuration. |
| `website` | `object` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   id?: string,
>   kind?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean
> }
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number,
>   method?: string[],
>   origin?: string[],
>   responseHeader?: string[]
> }[]
> ```

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

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   object?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   },
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   },
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   }
> }
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean
> }
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean,
>     lockedTime?: string
>   },
>   uniformBucketLevelAccess?: {
>     enabled?: boolean,
>     lockedTime?: string
>   },
>   publicAccessPrevention?: string
> }
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[]
>   },
>   vpcNetworkSources?: {
>     network?: string,
>     allowedIpCidrRanges?: string[]
>   }[],
>   allowCrossOrgVpcs?: boolean,
>   allowAllServiceAgentAccess?: boolean
> }
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string,
>       type?: string
>     },
>     condition?: {
>       age?: number,
>       createdBefore?: string,
>       customTimeBefore?: string,
>       daysSinceCustomTime?: number,
>       daysSinceNoncurrentTime?: number,
>       isLive?: boolean,
>       matchesPattern?: string,
>       matchesPrefix?: string[],
>       matchesSuffix?: string[],
>       matchesStorageClass?: string[],
>       noncurrentTimeBefore?: string,
>       sizeAboveBytes?: string | number,
>       sizeBelowBytes?: string | number,
>       numNewerVersions?: number
>     }
>   }[]
> }
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean,
>   toggleTime?: string,
>   terminalStorageClass?: string,
>   terminalStorageClassUpdateTime?: string
> }
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string,
>   logObjectPrefix?: string
> }
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string,
>   entityId?: string
> }
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string,
>   isLocked?: boolean,
>   retentionPeriod?: string | number
> }
> ```

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

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number,
>   effectiveTime?: string,
>   hardDeletePause?: {
>     enabled?: boolean,
>     effectiveTime?: string
>   }
> }
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean
> }
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string,
>   notFoundPage?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the bucket. |
| `billing` | `object \| null` | No | The bucket's billing configuration. |
| `cors` | `object[] \| null` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object \| null` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean \| null` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[] \| null` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object \| null` | No | Encryption configuration for a bucket. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object \| null` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object \| null` | No | The bucket's IAM configuration. |
| `id` | `string \| null` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object \| null` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string \| null` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string> \| null` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object \| null` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object \| null` | No | The bucket's Autoclass configuration. |
| `location` | `string \| null` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string \| null` | No | The type of the bucket location. |
| `logging` | `object \| null` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number \| null` | No | The generation of this bucket. |
| `metageneration` | `string \| number \| null` | No | The metadata generation of this bucket. |
| `name` | `string \| null` | No | The name of the bucket. |
| `owner` | `object \| null` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number \| null` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object \| null` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object \| null` | No | The bucket's object retention config. |
| `rpo` | `string \| null` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string \| null` | No | The URI of this bucket. |
| `softDeletePolicy` | `object \| null` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string \| null` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string \| null` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string \| null` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string \| null` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object \| null` | No | The bucket's versioning configuration. |
| `website` | `object \| null` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean \| null` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean \| null` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   id?: string | null,
>   kind?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean | null
> } | null
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number | null,
>   method?: string[] | null,
>   origin?: string[] | null,
>   responseHeader?: string[] | null
> }[] | null
> ```

> [accordion] customPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[] | null
> } | null
> ```

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string | null,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   uniformBucketLevelAccess?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   publicAccessPrevention?: string | null
> } | null
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[] | null
>   } | null,
>   vpcNetworkSources?: {
>     network?: string | null,
>     allowedIpCidrRanges?: string[] | null
>   }[] | null,
>   allowCrossOrgVpcs?: boolean | null,
>   allowAllServiceAgentAccess?: boolean | null
> } | null
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string | null,
>       type?: string | null
>     } | null,
>     condition?: {
>       age?: number | null,
>       createdBefore?: string | null,
>       customTimeBefore?: string | null,
>       daysSinceCustomTime?: number | null,
>       daysSinceNoncurrentTime?: number | null,
>       isLive?: boolean | null,
>       matchesPattern?: string | null,
>       matchesPrefix?: string[] | null,
>       matchesSuffix?: string[] | null,
>       matchesStorageClass?: string[] | null,
>       noncurrentTimeBefore?: string | null,
>       sizeAboveBytes?: string | number | null,
>       sizeBelowBytes?: string | number | null,
>       numNewerVersions?: number | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   toggleTime?: string | null,
>   terminalStorageClass?: string | null,
>   terminalStorageClassUpdateTime?: string | null
> } | null
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string | null,
>   logObjectPrefix?: string | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string | null,
>   isLocked?: boolean | null,
>   retentionPeriod?: string | number | null
> } | null
> ```

> [accordion] objectRetention full type
>
> ```ts theme={null}
> {
>   mode?: string | null
> } | null
> ```

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number | null,
>   effectiveTime?: string | null,
>   hardDeletePause?: {
>     enabled?: boolean | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string | null,
>   notFoundPage?: string | null
> } | null
> ```

***

### buckets.list

`storage.buckets.list`

Retrieves a list of buckets for a given project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.storage.buckets.list({ project: 'demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `maxResults` | `number` | No | Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller. |
| `pageToken` | `string` | No | A previously-returned page token representing part of the larger set of results to view. |
| `prefix` | `string` | No | Filter results to buckets whose names begin with this prefix. |
| `softDeleted` | `boolean` | No | If true, only soft-deleted bucket versions will be returned. The default is false. For more information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). |
| `project` | `string` | Yes | A valid API project identifier. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl. |
| `userProject` | `string` | No | The project to be billed for this request. |
| `returnPartialSuccess` | `boolean` | No | If true, return a list of bucket resource names for buckets that are in unreachable locations. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The list of items. |
| `kind` | `string \| null` | No | The kind of item this is. For lists of buckets, this is always storage#buckets. |
| `nextPageToken` | `string \| null` | No | The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |
| `unreachable` | `string[] \| null` | No | The list of bucket resource names that could not be reached during the listing operation. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   acl?: {
>     bucket?: string | null,
>     domain?: string | null,
>     email?: string | null,
>     entity?: string | null,
>     entityId?: string | null,
>     etag?: string | null,
>     id?: string | null,
>     kind?: string | null,
>     projectTeam?: {
>       projectNumber?: string | null,
>       team?: string | null
>     } | null,
>     role?: string | null,
>     selfLink?: string | null
>   }[] | null,
>   billing?: {
>     requesterPays?: boolean | null
>   } | null,
>   cors?: {
>     maxAgeSeconds?: number | null,
>     method?: string[] | null,
>     origin?: string[] | null,
>     responseHeader?: string[] | null
>   }[] | null,
>   customPlacementConfig?: {
>     dataLocations?: string[] | null
>   } | null,
>   defaultEventBasedHold?: boolean | null,
>   defaultObjectAcl?: {
>     bucket?: string | null,
>     domain?: string | null,
>     email?: string | null,
>     entity?: string | null,
>     entityId?: string | null,
>     etag?: string | null,
>     generation?: string | number | null,
>     id?: string | null,
>     kind?: string | null,
>     object?: string | null,
>     projectTeam?: {
>       projectNumber?: string | null,
>       team?: string | null
>     } | null,
>     role?: string | null,
>     selfLink?: string | null
>   }[] | null,
>   encryption?: {
>     defaultKmsKeyName?: string | null,
>     googleManagedEncryptionEnforcementConfig?: {
>       restrictionMode?: string | null,
>       effectiveTime?: string | null
>     } | null,
>     customerManagedEncryptionEnforcementConfig?: {
>       restrictionMode?: string | null,
>       effectiveTime?: string | null
>     } | null,
>     customerSuppliedEncryptionEnforcementConfig?: {
>       restrictionMode?: string | null,
>       effectiveTime?: string | null
>     } | null
>   } | null,
>   etag?: string | null,
>   hierarchicalNamespace?: {
>     enabled?: boolean | null
>   } | null,
>   iamConfiguration?: {
>     bucketPolicyOnly?: {
>       enabled?: boolean | null,
>       lockedTime?: string | null
>     } | null,
>     uniformBucketLevelAccess?: {
>       enabled?: boolean | null,
>       lockedTime?: string | null
>     } | null,
>     publicAccessPrevention?: string | null
>   } | null,
>   id?: string | null,
>   ipFilter?: {
>     mode?: string | null,
>     publicNetworkSource?: {
>       allowedIpCidrRanges?: string[] | null
>     } | null,
>     vpcNetworkSources?: {
>       network?: string | null,
>       allowedIpCidrRanges?: string[] | null
>     }[] | null,
>     allowCrossOrgVpcs?: boolean | null,
>     allowAllServiceAgentAccess?: boolean | null
>   } | null,
>   kind?: string | null,
>   labels?: Record<string, string> | null,
>   lifecycle?: {
>     rule?: {
>       action?: {
>         storageClass?: string | null,
>         type?: string | null
>       } | null,
>       condition?: {
>         age?: number | null,
>         createdBefore?: string | null,
>         customTimeBefore?: string | null,
>         daysSinceCustomTime?: number | null,
>         daysSinceNoncurrentTime?: number | null,
>         isLive?: boolean | null,
>         matchesPattern?: string | null,
>         matchesPrefix?: string[] | null,
>         matchesSuffix?: string[] | null,
>         matchesStorageClass?: string[] | null,
>         noncurrentTimeBefore?: string | null,
>         sizeAboveBytes?: string | number | null,
>         sizeBelowBytes?: string | number | null,
>         numNewerVersions?: number | null
>       } | null
>     }[] | null
>   } | null,
>   autoclass?: {
>     enabled?: boolean | null,
>     toggleTime?: string | null,
>     terminalStorageClass?: string | null,
>     terminalStorageClassUpdateTime?: string | null
>   } | null,
>   location?: string | null,
>   locationType?: string | null,
>   logging?: {
>     logBucket?: string | null,
>     logObjectPrefix?: string | null
>   } | null,
>   generation?: string | number | null,
>   metageneration?: string | number | null,
>   name?: string | null,
>   owner?: {
>     entity?: string | null,
>     entityId?: string | null
>   } | null,
>   projectNumber?: string | number | null,
>   retentionPolicy?: {
>     effectiveTime?: string | null,
>     isLocked?: boolean | null,
>     retentionPeriod?: string | number | null
>   } | null,
>   objectRetention?: {
>     mode?: string | null
>   } | null,
>   rpo?: string | null,
>   selfLink?: string | null,
>   softDeletePolicy?: {
>     retentionDurationSeconds?: string | number | null,
>     effectiveTime?: string | null,
>     hardDeletePause?: {
>       enabled?: boolean | null,
>       effectiveTime?: string | null
>     } | null
>   } | null,
>   storageClass?: string | null,
>   timeCreated?: string | null,
>   updated?: string | null,
>   softDeleteTime?: string | null,
>   hardDeleteTime?: string | null,
>   versioning?: {
>     enabled?: boolean | null
>   } | null,
>   website?: {
>     mainPageSuffix?: string | null,
>     notFoundPage?: string | null
>   } | null,
>   satisfiesPZS?: boolean | null,
>   satisfiesPZI?: boolean | null
> }[] | null
> ```

***

### buckets.lockRetentionPolicy

`storage.buckets.lockRetentionPolicy`

Locks retention policy on a bucket

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.storage.buckets.lockRetentionPolicy({ bucket: 'demo-project.appspot.com', ifMetagenerationMatch: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `ifMetagenerationMatch` | `string \| number` | Yes | Makes the operation conditional on whether bucket's current metageneration matches the given value. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the bucket. |
| `billing` | `object \| null` | No | The bucket's billing configuration. |
| `cors` | `object[] \| null` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object \| null` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean \| null` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[] \| null` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object \| null` | No | Encryption configuration for a bucket. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object \| null` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object \| null` | No | The bucket's IAM configuration. |
| `id` | `string \| null` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object \| null` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string \| null` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string> \| null` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object \| null` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object \| null` | No | The bucket's Autoclass configuration. |
| `location` | `string \| null` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string \| null` | No | The type of the bucket location. |
| `logging` | `object \| null` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number \| null` | No | The generation of this bucket. |
| `metageneration` | `string \| number \| null` | No | The metadata generation of this bucket. |
| `name` | `string \| null` | No | The name of the bucket. |
| `owner` | `object \| null` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number \| null` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object \| null` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object \| null` | No | The bucket's object retention config. |
| `rpo` | `string \| null` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string \| null` | No | The URI of this bucket. |
| `softDeletePolicy` | `object \| null` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string \| null` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string \| null` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string \| null` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string \| null` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object \| null` | No | The bucket's versioning configuration. |
| `website` | `object \| null` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean \| null` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean \| null` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   id?: string | null,
>   kind?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean | null
> } | null
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number | null,
>   method?: string[] | null,
>   origin?: string[] | null,
>   responseHeader?: string[] | null
> }[] | null
> ```

> [accordion] customPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[] | null
> } | null
> ```

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string | null,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   uniformBucketLevelAccess?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   publicAccessPrevention?: string | null
> } | null
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[] | null
>   } | null,
>   vpcNetworkSources?: {
>     network?: string | null,
>     allowedIpCidrRanges?: string[] | null
>   }[] | null,
>   allowCrossOrgVpcs?: boolean | null,
>   allowAllServiceAgentAccess?: boolean | null
> } | null
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string | null,
>       type?: string | null
>     } | null,
>     condition?: {
>       age?: number | null,
>       createdBefore?: string | null,
>       customTimeBefore?: string | null,
>       daysSinceCustomTime?: number | null,
>       daysSinceNoncurrentTime?: number | null,
>       isLive?: boolean | null,
>       matchesPattern?: string | null,
>       matchesPrefix?: string[] | null,
>       matchesSuffix?: string[] | null,
>       matchesStorageClass?: string[] | null,
>       noncurrentTimeBefore?: string | null,
>       sizeAboveBytes?: string | number | null,
>       sizeBelowBytes?: string | number | null,
>       numNewerVersions?: number | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   toggleTime?: string | null,
>   terminalStorageClass?: string | null,
>   terminalStorageClassUpdateTime?: string | null
> } | null
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string | null,
>   logObjectPrefix?: string | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string | null,
>   isLocked?: boolean | null,
>   retentionPeriod?: string | number | null
> } | null
> ```

> [accordion] objectRetention full type
>
> ```ts theme={null}
> {
>   mode?: string | null
> } | null
> ```

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number | null,
>   effectiveTime?: string | null,
>   hardDeletePause?: {
>     enabled?: boolean | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string | null,
>   notFoundPage?: string | null
> } | null
> ```

***

### buckets.operations.advanceRelocateBucket

`storage.buckets.operations.advanceRelocateBucket`

Starts asynchronous advancement of the relocate bucket operation in the case of required write downtime, to allow it to lock the bucket at the source location, and proceed with the bucket location swap. The server makes a best effort to advance the relocate bucket operation, but success is not guaranteed

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storage.buckets.operations.advanceRelocateBucket({ bucket: 'demo-project.appspot.com', operationId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket to advance the relocate for. |
| `operationId` | `string` | Yes | ID of the operation resource. |
| `ttl` | `string` | No | Specifies the duration after which the relocation will revert to the sync stage if the relocation hasn't succeeded. Optional, if not supplied, a default value of 12h will be used. |
| `expireTime` | `string` | No | Specifies the time when the relocation will revert to the sync stage if the relocation hasn't succeeded. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### buckets.operations.cancel

`storage.buckets.operations.cancel`

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storage.buckets.operations.cancel({ bucket: 'demo-project.appspot.com', operationId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | The parent bucket of the operation resource. |
| `operationId` | `string` | Yes | The ID of the operation resource. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### buckets.operations.get

`storage.buckets.operations.get`

Gets the latest state of a long-running operation

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.storage.buckets.operations.get({ bucket: 'demo-project.appspot.com', operationId: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | The parent bucket of the operation resource. |
| `operationId` | `string` | Yes | The ID of the operation resource. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is "false", it means the operation is still in progress. If "true", the operation is completed, and either "error" or "response" is available. |
| `error` | `object \| null` | No | The "Status" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each "Status" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the "name" should be a resource name ending with "operations/\{operationId}". |
| `response` | `Record<string, any> \| null` | No | The normal response of the operation in case of success. If the original method returns no data on success, such as "Delete", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type "XxxResponse", where "Xxx" is the original method name. For example, if the original method name is "TakeSnapshot()", the inferred response type is "TakeSnapshotResponse". |
| `selfLink` | `string \| null` | No | The link to this long running operation. |
| `kind` | `string \| null` | No | The kind of item this is. For operations, this is always storage#operation. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   details?: Record<string, any>[] | null,
>   message?: string | null
> } | null
> ```

***

### buckets.operations.list

`storage.buckets.operations.list`

Lists operations that match the specified filter in the request (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.storage.buckets.operations.list({ bucket: 'demo-project.appspot.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | A filter to narrow down results to a preferred subset. The filtering language is documented in more detail in [AIP-160](https://google.aip.dev/160). |
| `bucket` | `string` | Yes | Name of the bucket in which to look for operations. |
| `pageSize` | `number` | No | Maximum number of items to return in a single page of responses. Fewer total results may be returned than requested. The service uses this parameter or 100 items, whichever is smaller. |
| `pageToken` | `string` | No | A previously-returned page token representing part of the larger set of results to view. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |
| `operations` | `object[] \| null` | No | A list of operations that matches the specified filter in the request. |
| `kind` | `string \| null` | No | The kind of item this is. For lists of operations, this is always storage#operations. |

> [accordion] operations full type
>
> ```ts theme={null}
> {
>   done?: boolean | null,
>   error?: {
>     code?: number | null,
>     details?: Record<string, any>[] | null,
>     message?: string | null
>   } | null,
>   metadata?: Record<string, any> | null,
>   name?: string | null,
>   response?: Record<string, any> | null,
>   selfLink?: string | null,
>   kind?: string | null
> }[] | null
> ```

***

### buckets.patch

`storage.buckets.patch`

Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storage.buckets.patch({ bucket: 'demo-project.appspot.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. |
| `predefinedAcl` | `authenticatedRead \| private \| projectPrivate \| publicRead \| publicReadWrite` | No | Apply a predefined set of access controls to this bucket. |
| `predefinedDefaultObjectAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of default object access controls to this bucket. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to full. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `acl` | `object[]` | No | Access controls on the bucket. |
| `billing` | `object` | No | The bucket's billing configuration. |
| `cors` | `object[]` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[]` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object` | No | Encryption configuration for a bucket. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object` | No | The bucket's IAM configuration. |
| `id` | `string` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string>` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object` | No | The bucket's Autoclass configuration. |
| `location` | `string` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string` | No | The type of the bucket location. |
| `logging` | `object` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number` | No | The generation of this bucket. |
| `metageneration` | `string \| number` | No | The metadata generation of this bucket. |
| `name` | `string` | No | The name of the bucket. |
| `owner` | `object` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object` | No | The bucket's object retention config. |
| `rpo` | `string` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string` | No | The URI of this bucket. |
| `softDeletePolicy` | `object` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object` | No | The bucket's versioning configuration. |
| `website` | `object` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   id?: string,
>   kind?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean
> }
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number,
>   method?: string[],
>   origin?: string[],
>   responseHeader?: string[]
> }[]
> ```

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

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   object?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   },
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   },
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   }
> }
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean
> }
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean,
>     lockedTime?: string
>   },
>   uniformBucketLevelAccess?: {
>     enabled?: boolean,
>     lockedTime?: string
>   },
>   publicAccessPrevention?: string
> }
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[]
>   },
>   vpcNetworkSources?: {
>     network?: string,
>     allowedIpCidrRanges?: string[]
>   }[],
>   allowCrossOrgVpcs?: boolean,
>   allowAllServiceAgentAccess?: boolean
> }
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string,
>       type?: string
>     },
>     condition?: {
>       age?: number,
>       createdBefore?: string,
>       customTimeBefore?: string,
>       daysSinceCustomTime?: number,
>       daysSinceNoncurrentTime?: number,
>       isLive?: boolean,
>       matchesPattern?: string,
>       matchesPrefix?: string[],
>       matchesSuffix?: string[],
>       matchesStorageClass?: string[],
>       noncurrentTimeBefore?: string,
>       sizeAboveBytes?: string | number,
>       sizeBelowBytes?: string | number,
>       numNewerVersions?: number
>     }
>   }[]
> }
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean,
>   toggleTime?: string,
>   terminalStorageClass?: string,
>   terminalStorageClassUpdateTime?: string
> }
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string,
>   logObjectPrefix?: string
> }
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string,
>   entityId?: string
> }
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string,
>   isLocked?: boolean,
>   retentionPeriod?: string | number
> }
> ```

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

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number,
>   effectiveTime?: string,
>   hardDeletePause?: {
>     enabled?: boolean,
>     effectiveTime?: string
>   }
> }
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean
> }
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string,
>   notFoundPage?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the bucket. |
| `billing` | `object \| null` | No | The bucket's billing configuration. |
| `cors` | `object[] \| null` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object \| null` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean \| null` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[] \| null` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object \| null` | No | Encryption configuration for a bucket. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object \| null` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object \| null` | No | The bucket's IAM configuration. |
| `id` | `string \| null` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object \| null` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string \| null` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string> \| null` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object \| null` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object \| null` | No | The bucket's Autoclass configuration. |
| `location` | `string \| null` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string \| null` | No | The type of the bucket location. |
| `logging` | `object \| null` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number \| null` | No | The generation of this bucket. |
| `metageneration` | `string \| number \| null` | No | The metadata generation of this bucket. |
| `name` | `string \| null` | No | The name of the bucket. |
| `owner` | `object \| null` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number \| null` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object \| null` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object \| null` | No | The bucket's object retention config. |
| `rpo` | `string \| null` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string \| null` | No | The URI of this bucket. |
| `softDeletePolicy` | `object \| null` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string \| null` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string \| null` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string \| null` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string \| null` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object \| null` | No | The bucket's versioning configuration. |
| `website` | `object \| null` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean \| null` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean \| null` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   id?: string | null,
>   kind?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean | null
> } | null
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number | null,
>   method?: string[] | null,
>   origin?: string[] | null,
>   responseHeader?: string[] | null
> }[] | null
> ```

> [accordion] customPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[] | null
> } | null
> ```

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string | null,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   uniformBucketLevelAccess?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   publicAccessPrevention?: string | null
> } | null
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[] | null
>   } | null,
>   vpcNetworkSources?: {
>     network?: string | null,
>     allowedIpCidrRanges?: string[] | null
>   }[] | null,
>   allowCrossOrgVpcs?: boolean | null,
>   allowAllServiceAgentAccess?: boolean | null
> } | null
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string | null,
>       type?: string | null
>     } | null,
>     condition?: {
>       age?: number | null,
>       createdBefore?: string | null,
>       customTimeBefore?: string | null,
>       daysSinceCustomTime?: number | null,
>       daysSinceNoncurrentTime?: number | null,
>       isLive?: boolean | null,
>       matchesPattern?: string | null,
>       matchesPrefix?: string[] | null,
>       matchesSuffix?: string[] | null,
>       matchesStorageClass?: string[] | null,
>       noncurrentTimeBefore?: string | null,
>       sizeAboveBytes?: string | number | null,
>       sizeBelowBytes?: string | number | null,
>       numNewerVersions?: number | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   toggleTime?: string | null,
>   terminalStorageClass?: string | null,
>   terminalStorageClassUpdateTime?: string | null
> } | null
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string | null,
>   logObjectPrefix?: string | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string | null,
>   isLocked?: boolean | null,
>   retentionPeriod?: string | number | null
> } | null
> ```

> [accordion] objectRetention full type
>
> ```ts theme={null}
> {
>   mode?: string | null
> } | null
> ```

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number | null,
>   effectiveTime?: string | null,
>   hardDeletePause?: {
>     enabled?: boolean | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string | null,
>   notFoundPage?: string | null
> } | null
> ```

***

### buckets.relocate

`storage.buckets.relocate`

Initiates a long-running Relocate Bucket operation on the specified bucket

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storage.buckets.relocate({ bucket: 'demo-project.appspot.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket to be moved. |
| `destinationLocation` | `string` | No | The new location the bucket will be relocated to. |
| `destinationCustomPlacementConfig` | `object` | No | The bucket's new custom placement configuration if relocating to a Custom Dual Region. |
| `validateOnly` | `boolean` | No | If true, validate the operation, but do not actually relocate the bucket. |
| `destinationKmsKeyName` | `string` | No | Resource name of a Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key. If set, is used to encrypt all objects in the destination bucket. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is "false", it means the operation is still in progress. If "true", the operation is completed, and either "error" or "response" is available. |
| `error` | `object \| null` | No | The "Status" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each "Status" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the "name" should be a resource name ending with "operations/\{operationId}". |
| `response` | `Record<string, any> \| null` | No | The normal response of the operation in case of success. If the original method returns no data on success, such as "Delete", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type "XxxResponse", where "Xxx" is the original method name. For example, if the original method name is "TakeSnapshot()", the inferred response type is "TakeSnapshotResponse". |
| `selfLink` | `string \| null` | No | The link to this long running operation. |
| `kind` | `string \| null` | No | The kind of item this is. For operations, this is always storage#operation. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   details?: Record<string, any>[] | null,
>   message?: string | null
> } | null
> ```

***

### buckets.restore

`storage.buckets.restore`

Restores a soft-deleted bucket

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.storage.buckets.restore({ bucket: 'demo-project.appspot.com', generation: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `generation` | `string \| number` | Yes | Generation of a bucket. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to full. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the bucket. |
| `billing` | `object \| null` | No | The bucket's billing configuration. |
| `cors` | `object[] \| null` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object \| null` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean \| null` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[] \| null` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object \| null` | No | Encryption configuration for a bucket. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object \| null` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object \| null` | No | The bucket's IAM configuration. |
| `id` | `string \| null` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object \| null` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string \| null` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string> \| null` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object \| null` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object \| null` | No | The bucket's Autoclass configuration. |
| `location` | `string \| null` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string \| null` | No | The type of the bucket location. |
| `logging` | `object \| null` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number \| null` | No | The generation of this bucket. |
| `metageneration` | `string \| number \| null` | No | The metadata generation of this bucket. |
| `name` | `string \| null` | No | The name of the bucket. |
| `owner` | `object \| null` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number \| null` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object \| null` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object \| null` | No | The bucket's object retention config. |
| `rpo` | `string \| null` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string \| null` | No | The URI of this bucket. |
| `softDeletePolicy` | `object \| null` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string \| null` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string \| null` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string \| null` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string \| null` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object \| null` | No | The bucket's versioning configuration. |
| `website` | `object \| null` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean \| null` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean \| null` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   id?: string | null,
>   kind?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean | null
> } | null
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number | null,
>   method?: string[] | null,
>   origin?: string[] | null,
>   responseHeader?: string[] | null
> }[] | null
> ```

> [accordion] customPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[] | null
> } | null
> ```

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string | null,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   uniformBucketLevelAccess?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   publicAccessPrevention?: string | null
> } | null
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[] | null
>   } | null,
>   vpcNetworkSources?: {
>     network?: string | null,
>     allowedIpCidrRanges?: string[] | null
>   }[] | null,
>   allowCrossOrgVpcs?: boolean | null,
>   allowAllServiceAgentAccess?: boolean | null
> } | null
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string | null,
>       type?: string | null
>     } | null,
>     condition?: {
>       age?: number | null,
>       createdBefore?: string | null,
>       customTimeBefore?: string | null,
>       daysSinceCustomTime?: number | null,
>       daysSinceNoncurrentTime?: number | null,
>       isLive?: boolean | null,
>       matchesPattern?: string | null,
>       matchesPrefix?: string[] | null,
>       matchesSuffix?: string[] | null,
>       matchesStorageClass?: string[] | null,
>       noncurrentTimeBefore?: string | null,
>       sizeAboveBytes?: string | number | null,
>       sizeBelowBytes?: string | number | null,
>       numNewerVersions?: number | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   toggleTime?: string | null,
>   terminalStorageClass?: string | null,
>   terminalStorageClassUpdateTime?: string | null
> } | null
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string | null,
>   logObjectPrefix?: string | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string | null,
>   isLocked?: boolean | null,
>   retentionPeriod?: string | number | null
> } | null
> ```

> [accordion] objectRetention full type
>
> ```ts theme={null}
> {
>   mode?: string | null
> } | null
> ```

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number | null,
>   effectiveTime?: string | null,
>   hardDeletePause?: {
>     enabled?: boolean | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string | null,
>   notFoundPage?: string | null
> } | null
> ```

***

### buckets.setIamPolicy

`storage.buckets.setIamPolicy`

Updates an IAM policy for the specified bucket

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storage.buckets.setIamPolicy({ bucket: 'demo-project.appspot.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `bindings` | `object[]` | No | An association between a role, which comes with a set of permissions, and members who may assume that role. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the policy. (base64) |
| `kind` | `string` | No | The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. |
| `resourceId` | `string` | No | The ID of the resource to which this policy belongs. Will be of the form projects/*/buckets/bucket for buckets, projects/*/buckets/bucket/objects/object for objects, and projects/*/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/*/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. |
| `version` | `number` | No | The IAM policy format version. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     description?: string,
>     expression?: string,
>     location?: string,
>     title?: string
>   },
>   members?: string[],
>   role?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | An association between a role, which comes with a set of permissions, and members who may assume that role. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the policy. (base64) |
| `kind` | `string \| null` | No | The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. |
| `resourceId` | `string \| null` | No | The ID of the resource to which this policy belongs. Will be of the form projects/*/buckets/bucket for buckets, projects/*/buckets/bucket/objects/object for objects, and projects/*/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/*/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. |
| `version` | `number \| null` | No | The IAM policy format version. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### buckets.testIamPermissions

`storage.buckets.testIamPermissions`

Tests a set of permissions on the given bucket to see which, if any, are held by the caller

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.storage.buckets.testIamPermissions({
	bucket: 'demo-project.appspot.com',
	permissions: ['example'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `permissions` | `string[]` | Yes | Permissions to test. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | The kind of item this is. |
| `permissions` | `string[] \| null` | No | The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets, objects, or managedFolders. The supported permissions are as follows: - storage.buckets.delete - Delete bucket. - storage.buckets.get - Read bucket metadata. - storage.buckets.getIamPolicy - Read bucket IAM policy. - storage.buckets.create - Create bucket. - storage.buckets.list - List buckets. - storage.buckets.setIamPolicy - Update bucket IAM policy. - storage.buckets.update - Update bucket metadata. - storage.objects.delete - Delete object. |

***

### buckets.update

`storage.buckets.update`

Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storage.buckets.update({ bucket: 'demo-project.appspot.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of a bucket. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. |
| `predefinedAcl` | `authenticatedRead \| private \| projectPrivate \| publicRead \| publicReadWrite` | No | Apply a predefined set of access controls to this bucket. |
| `predefinedDefaultObjectAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of default object access controls to this bucket. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to full. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `acl` | `object[]` | No | Access controls on the bucket. |
| `billing` | `object` | No | The bucket's billing configuration. |
| `cors` | `object[]` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[]` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object` | No | Encryption configuration for a bucket. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object` | No | The bucket's IAM configuration. |
| `id` | `string` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string>` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object` | No | The bucket's Autoclass configuration. |
| `location` | `string` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string` | No | The type of the bucket location. |
| `logging` | `object` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number` | No | The generation of this bucket. |
| `metageneration` | `string \| number` | No | The metadata generation of this bucket. |
| `name` | `string` | No | The name of the bucket. |
| `owner` | `object` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object` | No | The bucket's object retention config. |
| `rpo` | `string` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string` | No | The URI of this bucket. |
| `softDeletePolicy` | `object` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object` | No | The bucket's versioning configuration. |
| `website` | `object` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   id?: string,
>   kind?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean
> }
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number,
>   method?: string[],
>   origin?: string[],
>   responseHeader?: string[]
> }[]
> ```

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

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   object?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   },
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   },
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: NotRestricted | FullyRestricted,
>     effectiveTime?: string
>   }
> }
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean
> }
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean,
>     lockedTime?: string
>   },
>   uniformBucketLevelAccess?: {
>     enabled?: boolean,
>     lockedTime?: string
>   },
>   publicAccessPrevention?: string
> }
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[]
>   },
>   vpcNetworkSources?: {
>     network?: string,
>     allowedIpCidrRanges?: string[]
>   }[],
>   allowCrossOrgVpcs?: boolean,
>   allowAllServiceAgentAccess?: boolean
> }
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string,
>       type?: string
>     },
>     condition?: {
>       age?: number,
>       createdBefore?: string,
>       customTimeBefore?: string,
>       daysSinceCustomTime?: number,
>       daysSinceNoncurrentTime?: number,
>       isLive?: boolean,
>       matchesPattern?: string,
>       matchesPrefix?: string[],
>       matchesSuffix?: string[],
>       matchesStorageClass?: string[],
>       noncurrentTimeBefore?: string,
>       sizeAboveBytes?: string | number,
>       sizeBelowBytes?: string | number,
>       numNewerVersions?: number
>     }
>   }[]
> }
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean,
>   toggleTime?: string,
>   terminalStorageClass?: string,
>   terminalStorageClassUpdateTime?: string
> }
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string,
>   logObjectPrefix?: string
> }
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string,
>   entityId?: string
> }
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string,
>   isLocked?: boolean,
>   retentionPeriod?: string | number
> }
> ```

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

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number,
>   effectiveTime?: string,
>   hardDeletePause?: {
>     enabled?: boolean,
>     effectiveTime?: string
>   }
> }
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean
> }
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string,
>   notFoundPage?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the bucket. |
| `billing` | `object \| null` | No | The bucket's billing configuration. |
| `cors` | `object[] \| null` | No | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| `customPlacementConfig` | `object \| null` | No | The bucket's custom placement configuration for Custom Dual Regions. |
| `defaultEventBasedHold` | `boolean \| null` | No | The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. |
| `defaultObjectAcl` | `object[] \| null` | No | Default access controls to apply to new objects when no ACL is provided. |
| `encryption` | `object \| null` | No | Encryption configuration for a bucket. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the bucket. |
| `hierarchicalNamespace` | `object \| null` | No | The bucket's hierarchical namespace configuration. |
| `iamConfiguration` | `object \| null` | No | The bucket's IAM configuration. |
| `id` | `string \| null` | No | The ID of the bucket. For buckets, the id and name properties are the same. |
| `ipFilter` | `object \| null` | No | The bucket's IP filter configuration. Specifies the network sources that are allowed to access the operations on the bucket, as well as its underlying objects. Only enforced when the mode is set to 'Enabled'. |
| `kind` | `string \| null` | No | The kind of item this is. For buckets, this is always storage#bucket. |
| `labels` | `Record<string, string> \| null` | No | User-provided labels, in key/value pairs. |
| `lifecycle` | `object \| null` | No | The bucket's lifecycle configuration. See [Lifecycle Management](https://cloud.google.com/storage/docs/lifecycle) for more information. |
| `autoclass` | `object \| null` | No | The bucket's Autoclass configuration. |
| `location` | `string \| null` | No | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the [Developer's Guide](https://cloud.google.com/storage/docs/locations) for the authoritative list. |
| `locationType` | `string \| null` | No | The type of the bucket location. |
| `logging` | `object \| null` | No | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| `generation` | `string \| number \| null` | No | The generation of this bucket. |
| `metageneration` | `string \| number \| null` | No | The metadata generation of this bucket. |
| `name` | `string \| null` | No | The name of the bucket. |
| `owner` | `object \| null` | No | The owner of the bucket. This is always the project team's owner group. |
| `projectNumber` | `string \| number \| null` | No | The project number of the project the bucket belongs to. |
| `retentionPolicy` | `object \| null` | No | The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION\_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION\_DENIED error. |
| `objectRetention` | `object \| null` | No | The bucket's object retention config. |
| `rpo` | `string \| null` | No | The Recovery Point Objective (RPO) of this bucket. Set to ASYNC\_TURBO to turn on Turbo Replication on a bucket. |
| `selfLink` | `string \| null` | No | The URI of this bucket. |
| `softDeletePolicy` | `object \| null` | No | The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted. |
| `storageClass` | `string \| null` | No | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes). |
| `timeCreated` | `string \| null` | No | The creation time of the bucket in RFC 3339 format. |
| `updated` | `string \| null` | No | The modification time of the bucket in RFC 3339 format. |
| `softDeleteTime` | `string \| null` | No | The soft delete time of the bucket in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | The hard delete time of the bucket in RFC 3339 format. |
| `versioning` | `object \| null` | No | The bucket's versioning configuration. |
| `website` | `object \| null` | No | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the [Static Website Examples](https://cloud.google.com/storage/docs/static-website) for more information. |
| `satisfiesPZS` | `boolean \| null` | No | Reserved for future use. |
| `satisfiesPZI` | `boolean \| null` | No | Reserved for future use. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   id?: string | null,
>   kind?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] billing full type
>
> ```ts theme={null}
> {
>   requesterPays?: boolean | null
> } | null
> ```

> [accordion] cors full type
>
> ```ts theme={null}
> {
>   maxAgeSeconds?: number | null,
>   method?: string[] | null,
>   origin?: string[] | null,
>   responseHeader?: string[] | null
> }[] | null
> ```

> [accordion] customPlacementConfig full type
>
> ```ts theme={null}
> {
>   dataLocations?: string[] | null
> } | null
> ```

> [accordion] defaultObjectAcl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] encryption full type
>
> ```ts theme={null}
> {
>   defaultKmsKeyName?: string | null,
>   googleManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerManagedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null,
>   customerSuppliedEncryptionEnforcementConfig?: {
>     restrictionMode?: string | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] hierarchicalNamespace full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] iamConfiguration full type
>
> ```ts theme={null}
> {
>   bucketPolicyOnly?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   uniformBucketLevelAccess?: {
>     enabled?: boolean | null,
>     lockedTime?: string | null
>   } | null,
>   publicAccessPrevention?: string | null
> } | null
> ```

> [accordion] ipFilter full type
>
> ```ts theme={null}
> {
>   mode?: string | null,
>   publicNetworkSource?: {
>     allowedIpCidrRanges?: string[] | null
>   } | null,
>   vpcNetworkSources?: {
>     network?: string | null,
>     allowedIpCidrRanges?: string[] | null
>   }[] | null,
>   allowCrossOrgVpcs?: boolean | null,
>   allowAllServiceAgentAccess?: boolean | null
> } | null
> ```

> [accordion] lifecycle full type
>
> ```ts theme={null}
> {
>   rule?: {
>     action?: {
>       storageClass?: string | null,
>       type?: string | null
>     } | null,
>     condition?: {
>       age?: number | null,
>       createdBefore?: string | null,
>       customTimeBefore?: string | null,
>       daysSinceCustomTime?: number | null,
>       daysSinceNoncurrentTime?: number | null,
>       isLive?: boolean | null,
>       matchesPattern?: string | null,
>       matchesPrefix?: string[] | null,
>       matchesSuffix?: string[] | null,
>       matchesStorageClass?: string[] | null,
>       noncurrentTimeBefore?: string | null,
>       sizeAboveBytes?: string | number | null,
>       sizeBelowBytes?: string | number | null,
>       numNewerVersions?: number | null
>     } | null
>   }[] | null
> } | null
> ```

> [accordion] autoclass full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null,
>   toggleTime?: string | null,
>   terminalStorageClass?: string | null,
>   terminalStorageClassUpdateTime?: string | null
> } | null
> ```

> [accordion] logging full type
>
> ```ts theme={null}
> {
>   logBucket?: string | null,
>   logObjectPrefix?: string | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retentionPolicy full type
>
> ```ts theme={null}
> {
>   effectiveTime?: string | null,
>   isLocked?: boolean | null,
>   retentionPeriod?: string | number | null
> } | null
> ```

> [accordion] objectRetention full type
>
> ```ts theme={null}
> {
>   mode?: string | null
> } | null
> ```

> [accordion] softDeletePolicy full type
>
> ```ts theme={null}
> {
>   retentionDurationSeconds?: string | number | null,
>   effectiveTime?: string | null,
>   hardDeletePause?: {
>     enabled?: boolean | null,
>     effectiveTime?: string | null
>   } | null
> } | null
> ```

> [accordion] versioning full type
>
> ```ts theme={null}
> {
>   enabled?: boolean | null
> } | null
> ```

> [accordion] website full type
>
> ```ts theme={null}
> {
>   mainPageSuffix?: string | null,
>   notFoundPage?: string | null
> } | null
> ```

***

### objects.bulkRestore

`storage.objects.bulkRestore`

Initiates a long-running bulk restore operation on the specified bucket

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storage.objects.bulkRestore({ bucket: 'demo-project.appspot.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `allowOverwrite` | `boolean` | No | If false (default), the restore will not overwrite live objects with the same name at the destination. This means some deleted objects may be skipped. If true, live objects will be overwritten resulting in a noncurrent object (if versioning is enabled). If versioning is not enabled, overwriting the object will result in a soft-deleted object. In either case, if a noncurrent object already exists with the same name, a live version can be written without issue. |
| `softDeletedAfterTime` | `string` | No | Restores only the objects that were soft-deleted after this time. |
| `softDeletedBeforeTime` | `string` | No | Restores only the objects that were soft-deleted before this time. |
| `matchGlobs` | `string[]` | No | Restores only the objects matching any of the specified glob(s). If this parameter is not specified, all objects will be restored within the specified time range. |
| `copySourceAcl` | `boolean` | No | If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false. |
| `createdAfterTime` | `string` | No | Restores only the objects that were created after this time. |
| `createdBeforeTime` | `string` | No | Restores only the objects that were created before this time. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | If the value is "false", it means the operation is still in progress. If "true", the operation is completed, and either "error" or "response" is available. |
| `error` | `object \| null` | No | The "Status" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each "Status" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). |
| `metadata` | `Record<string, any> \| null` | No | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. |
| `name` | `string \| null` | No | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the "name" should be a resource name ending with "operations/\{operationId}". |
| `response` | `Record<string, any> \| null` | No | The normal response of the operation in case of success. If the original method returns no data on success, such as "Delete", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type "XxxResponse", where "Xxx" is the original method name. For example, if the original method name is "TakeSnapshot()", the inferred response type is "TakeSnapshotResponse". |
| `selfLink` | `string \| null` | No | The link to this long running operation. |
| `kind` | `string \| null` | No | The kind of item this is. For operations, this is always storage#operation. |

> [accordion] error full type
>
> ```ts theme={null}
> {
>   code?: number | null,
>   details?: Record<string, any>[] | null,
>   message?: string | null
> } | null
> ```

***

### objects.compose

`storage.objects.compose`

Concatenates a list of existing objects into a new object in the same bucket

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storage.objects.compose({ destinationBucket: 'x1', destinationObject: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `destinationBucket` | `string` | Yes | Name of the bucket containing the source objects. The destination object is stored in this bucket. |
| `destinationObject` | `string` | Yes | Name of the new object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `destinationPredefinedAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of access controls to the destination object. |
| `dropContextGroups` | `string[]` | No | Specifies which object context groups to drop from the source object(s) during a compose operation. The accepted value is 'custom'. Destination contexts behave as follows: - When request body contexts are provided, they override all source contexts. - When no request body contexts are provided, source contexts are preserved unless 'dropContextGroups' contains 'custom', in which case all contexts are dropped. |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration matches the given value. |
| `kmsKeyName` | `string` | No | Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms\_key\_name value, if any. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `destination` | `object` | No | An object. |
| `kind` | `string` | No | The kind of item this is. |
| `sourceObjects` | `object[]` | No | The list of source objects that will be concatenated into a single object. |
| `deleteSourceObjects` | `boolean` | No | If true, the source objects will be deleted. |

> [accordion] destination full type
>
> ```ts theme={null}
> {
>   acl?: {
>     bucket?: string,
>     domain?: string,
>     email?: string,
>     entity?: string,
>     entityId?: string,
>     etag?: string,
>     generation?: string | number,
>     id?: string,
>     kind?: string,
>     object?: string,
>     projectTeam?: {
>       projectNumber?: string,
>       team?: string
>     },
>     role?: string,
>     selfLink?: string
>   }[],
>   bucket?: string,
>   cacheControl?: string,
>   componentCount?: number,
>   contentDisposition?: string,
>   contentEncoding?: string,
>   contentLanguage?: string,
>   contentType?: string,
>   crc32c?: string,
>   customTime?: string,
>   customerEncryption?: {
>     encryptionAlgorithm?: string,
>     keySha256?: string
>   },
>   etag?: string,
>   eventBasedHold?: boolean,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   kmsKeyName?: string,
>   md5Hash?: string,
>   mediaLink?: string,
>   metadata?: Record<string, string | null> | null,
>   contexts?: {
>     custom?: Record<string, {
>       value?: string,
>       createTime?: string,
>       updateTime?: string,
>       extendedDataTypeUrl?: string
>     }>
>   },
>   restoreToken?: string,
>   metageneration?: string | number,
>   name?: string,
>   owner?: {
>     entity?: string,
>     entityId?: string
>   },
>   retentionExpirationTime?: string,
>   retention?: {
>     retainUntilTime?: string,
>     mode?: string
>   },
>   selfLink?: string,
>   size?: string | number,
>   storageClass?: string,
>   temporaryHold?: boolean,
>   timeCreated?: string,
>   timeDeleted?: string,
>   timeFinalized?: string,
>   softDeleteTime?: string,
>   hardDeleteTime?: string,
>   timeStorageClassUpdated?: string,
>   updated?: string,
>   zonalAvailabilityInfo?: {
>     availableZones?: string[]
>   }
> }
> ```

> [accordion] sourceObjects full type
>
> ```ts theme={null}
> {
>   generation?: string | number,
>   name?: string,
>   objectPreconditions?: {
>     ifGenerationMatch?: string | number
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the object. |
| `bucket` | `string \| null` | No | The name of the bucket containing this object. |
| `cacheControl` | `string \| null` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number \| null` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string \| null` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string \| null` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string \| null` | No | Content-Language of the object data. |
| `contentType` | `string \| null` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string \| null` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string \| null` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object \| null` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean \| null` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number \| null` | No | The content generation of this object. Used for object versioning. |
| `id` | `string \| null` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string \| null` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string \| null` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string \| null` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string \| null` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object \| null` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string \| null` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string \| null` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object \| null` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string \| null` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object \| null` | No | A collection of object level retention parameters. |
| `selfLink` | `string \| null` | No | The link to this object. |
| `size` | `string \| number \| null` | No | Content-Length of the data in bytes. |
| `storageClass` | `string \| null` | No | Storage class of the object. |
| `temporaryHold` | `boolean \| null` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string \| null` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string \| null` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string \| null` | No | The time when the object was finalized. |
| `softDeleteTime` | `string \| null` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string \| null` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string \| null` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object \| null` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string | null,
>   keySha256?: string | null
> } | null
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string | null,
>     createTime?: string | null,
>     updateTime?: string | null,
>     extendedDataTypeUrl?: string | null
>   }> | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string | null,
>   mode?: string | null
> } | null
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[] | null
> } | null
> ```

***

### objects.copy

`storage.objects.copy`

Copies a source object to a destination object. Optionally overrides metadata

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storage.objects.copy({
	destinationBucket: 'x1',
	destinationObject: 'x1',
	sourceBucket: 'x1',
	sourceObject: 'x1',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `destinationBucket` | `string` | Yes | Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `destinationKmsKeyName` | `string` | No | Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms\_key\_name value, if any. |
| `destinationObject` | `string` | Yes | Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. |
| `destinationPredefinedAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of access controls to the destination object. |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current metageneration does not match the given value. |
| `ifSourceGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current generation matches the given value. |
| `ifSourceGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current generation does not match the given value. |
| `ifSourceMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current metageneration matches the given value. |
| `ifSourceMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current metageneration does not match the given value. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. |
| `sourceBucket` | `string` | Yes | Name of the bucket in which to find the source object. |
| `sourceGeneration` | `string \| number` | No | If present, selects a specific revision of the source object (as opposed to the latest version, the default). |
| `sourceObject` | `string` | Yes | Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `acl` | `object[]` | No | Access controls on the object. |
| `bucket` | `string` | No | The name of the bucket containing this object. |
| `cacheControl` | `string` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string` | No | Content-Language of the object data. |
| `contentType` | `string` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number` | No | The content generation of this object. Used for object versioning. |
| `id` | `string` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object` | No | A collection of object level retention parameters. |
| `selfLink` | `string` | No | The link to this object. |
| `size` | `string \| number` | No | Content-Length of the data in bytes. |
| `storageClass` | `string` | No | Storage class of the object. |
| `temporaryHold` | `boolean` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string` | No | The time when the object was finalized. |
| `softDeleteTime` | `string` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   object?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string,
>   keySha256?: string
> }
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string,
>     createTime?: string,
>     updateTime?: string,
>     extendedDataTypeUrl?: string
>   }>
> }
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string,
>   entityId?: string
> }
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string,
>   mode?: string
> }
> ```

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the object. |
| `bucket` | `string \| null` | No | The name of the bucket containing this object. |
| `cacheControl` | `string \| null` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number \| null` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string \| null` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string \| null` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string \| null` | No | Content-Language of the object data. |
| `contentType` | `string \| null` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string \| null` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string \| null` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object \| null` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean \| null` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number \| null` | No | The content generation of this object. Used for object versioning. |
| `id` | `string \| null` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string \| null` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string \| null` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string \| null` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string \| null` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object \| null` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string \| null` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string \| null` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object \| null` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string \| null` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object \| null` | No | A collection of object level retention parameters. |
| `selfLink` | `string \| null` | No | The link to this object. |
| `size` | `string \| number \| null` | No | Content-Length of the data in bytes. |
| `storageClass` | `string \| null` | No | Storage class of the object. |
| `temporaryHold` | `boolean \| null` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string \| null` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string \| null` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string \| null` | No | The time when the object was finalized. |
| `softDeleteTime` | `string \| null` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string \| null` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string \| null` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object \| null` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string | null,
>   keySha256?: string | null
> } | null
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string | null,
>     createTime?: string | null,
>     updateTime?: string | null,
>     extendedDataTypeUrl?: string | null
>   }> | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string | null,
>   mode?: string | null
> } | null
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[] | null
> } | null
> ```

***

### objects.delete

`storage.objects.delete`

Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.storage.objects.delete({ bucket: 'demo-project.appspot.com', object: 'uploads/report.pdf' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | No | If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default). |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration does not match the given value. |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### objects.download

`storage.objects.download`

Download an object's bytes (returned as a file)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.storage.objects.download({ bucket: 'demo-project.appspot.com', object: 'uploads/report.pdf' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration does not match the given value. |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `softDeleted` | `boolean` | No | If true, only soft-deleted object versions will be listed. The default is false. For more information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). |
| `restoreToken` | `string` | No | Restore token used to differentiate soft-deleted objects with the same name and generation. Only applicable for hierarchical namespace buckets and if softDeleted is set to true. This parameter is optional, and is only required in the rare case when there are multiple soft-deleted objects with the same name and generation. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### objects.get

`storage.objects.get`

Retrieves an object or its metadata

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.storage.objects.get({ bucket: 'demo-project.appspot.com', object: 'uploads/report.pdf' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration does not match the given value. |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `softDeleted` | `boolean` | No | If true, only soft-deleted object versions will be listed. The default is false. For more information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). |
| `restoreToken` | `string` | No | Restore token used to differentiate soft-deleted objects with the same name and generation. Only applicable for hierarchical namespace buckets and if softDeleted is set to true. This parameter is optional, and is only required in the rare case when there are multiple soft-deleted objects with the same name and generation. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the object. |
| `bucket` | `string \| null` | No | The name of the bucket containing this object. |
| `cacheControl` | `string \| null` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number \| null` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string \| null` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string \| null` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string \| null` | No | Content-Language of the object data. |
| `contentType` | `string \| null` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string \| null` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string \| null` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object \| null` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean \| null` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number \| null` | No | The content generation of this object. Used for object versioning. |
| `id` | `string \| null` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string \| null` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string \| null` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string \| null` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string \| null` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object \| null` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string \| null` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string \| null` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object \| null` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string \| null` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object \| null` | No | A collection of object level retention parameters. |
| `selfLink` | `string \| null` | No | The link to this object. |
| `size` | `string \| number \| null` | No | Content-Length of the data in bytes. |
| `storageClass` | `string \| null` | No | Storage class of the object. |
| `temporaryHold` | `boolean \| null` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string \| null` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string \| null` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string \| null` | No | The time when the object was finalized. |
| `softDeleteTime` | `string \| null` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string \| null` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string \| null` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object \| null` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string | null,
>   keySha256?: string | null
> } | null
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string | null,
>     createTime?: string | null,
>     updateTime?: string | null,
>     extendedDataTypeUrl?: string | null
>   }> | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string | null,
>   mode?: string | null
> } | null
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[] | null
> } | null
> ```

***

### objects.getIamPolicy

`storage.objects.getIamPolicy`

Returns an IAM policy for the specified object

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.storage.objects.getIamPolicy({ bucket: 'demo-project.appspot.com', object: 'uploads/report.pdf' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | An association between a role, which comes with a set of permissions, and members who may assume that role. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the policy. (base64) |
| `kind` | `string \| null` | No | The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. |
| `resourceId` | `string \| null` | No | The ID of the resource to which this policy belongs. Will be of the form projects/*/buckets/bucket for buckets, projects/*/buckets/bucket/objects/object for objects, and projects/*/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/*/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. |
| `version` | `number \| null` | No | The IAM policy format version. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### objects.insert

`storage.objects.insert`

Upload an object to a bucket (`file` with the bytes and `name`), or create it from metadata only

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storage.objects.insert({
	bucket: 'demo-project.appspot.com',
	name: 'uploads/hello.txt',
	file: { base64: 'SGVsbG8gZnJvbSBDb3JzYWly', filename: 'hello.txt', contentType: 'text/plain' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any. |
| `contentEncoding` | `string` | No | If set, sets the contentEncoding property of the final object to this value. Setting this parameter is equivalent to setting the contentEncoding metadata property. This can be useful when uploading an object with uploadType=media to indicate the encoding of the content being uploaded. |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration does not match the given value. |
| `kmsKeyName` | `string` | No | Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms\_key\_name value, if any. |
| `name` | `string` | No | Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `predefinedAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of access controls to this object. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `acl` | `object[]` | No | Access controls on the object. |
| `body_bucket` | `string` | No | The name of the bucket containing this object. |
| `cacheControl` | `string` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string` | No | Content-Disposition of the object data. |
| `body_contentEncoding` | `string` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string` | No | Content-Language of the object data. |
| `contentType` | `string` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number` | No | The content generation of this object. Used for object versioning. |
| `id` | `string` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string` | No | The kind of item this is. For objects, this is always storage#object. |
| `body_kmsKeyName` | `string` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `body_name` | `string` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object` | No | A collection of object level retention parameters. |
| `selfLink` | `string` | No | The link to this object. |
| `size` | `string \| number` | No | Content-Length of the data in bytes. |
| `storageClass` | `string` | No | Storage class of the object. |
| `temporaryHold` | `boolean` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string` | No | The time when the object was finalized. |
| `softDeleteTime` | `string` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |
| `file` | `string \| object \| custom` | No | The bytes to upload (a URL, `{ base64 }` or a Blob). Without it the call sends only the JSON metadata. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   object?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string,
>   keySha256?: string
> }
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string,
>     createTime?: string,
>     updateTime?: string,
>     extendedDataTypeUrl?: string
>   }>
> }
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string,
>   entityId?: string
> }
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string,
>   mode?: string
> }
> ```

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

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the object. |
| `bucket` | `string \| null` | No | The name of the bucket containing this object. |
| `cacheControl` | `string \| null` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number \| null` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string \| null` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string \| null` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string \| null` | No | Content-Language of the object data. |
| `contentType` | `string \| null` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string \| null` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string \| null` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object \| null` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean \| null` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number \| null` | No | The content generation of this object. Used for object versioning. |
| `id` | `string \| null` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string \| null` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string \| null` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string \| null` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string \| null` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object \| null` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string \| null` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string \| null` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object \| null` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string \| null` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object \| null` | No | A collection of object level retention parameters. |
| `selfLink` | `string \| null` | No | The link to this object. |
| `size` | `string \| number \| null` | No | Content-Length of the data in bytes. |
| `storageClass` | `string \| null` | No | Storage class of the object. |
| `temporaryHold` | `boolean \| null` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string \| null` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string \| null` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string \| null` | No | The time when the object was finalized. |
| `softDeleteTime` | `string \| null` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string \| null` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string \| null` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object \| null` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string | null,
>   keySha256?: string | null
> } | null
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string | null,
>     createTime?: string | null,
>     updateTime?: string | null,
>     extendedDataTypeUrl?: string | null
>   }> | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string | null,
>   mode?: string | null
> } | null
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[] | null
> } | null
> ```

***

### objects.list

`storage.objects.list`

Retrieves a list of objects matching the criteria (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.storage.objects.list({ bucket: 'demo-project.appspot.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which to look for objects. |
| `delimiter` | `string` | No | Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted. |
| `endOffset` | `string` | No | Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive). |
| `includeTrailingDelimiter` | `boolean` | No | If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes. |
| `maxResults` | `number` | No | Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller. |
| `pageToken` | `string` | No | A previously-returned page token representing part of the larger set of results to view. |
| `prefix` | `string` | No | Filter results to objects whose names begin with this prefix. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl. |
| `startOffset` | `string` | No | Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `versions` | `boolean` | No | If true, lists all versions of an object as distinct results. The default is false. For more information, see [Object Versioning](https://cloud.google.com/storage/docs/object-versioning). |
| `matchGlob` | `string` | No | Filter results to objects and prefixes that match this glob pattern. |
| `filter` | `string` | No | Filter the returned objects. Currently only supported for the contexts field. If delimiter is set, the returned prefixes are exempt from this filter. |
| `softDeleted` | `boolean` | No | If true, only soft-deleted object versions will be listed. The default is false. For more information, see [Soft Delete](https://cloud.google.com/storage/docs/soft-delete). |
| `includeFoldersAsPrefixes` | `boolean` | No | Only applicable if delimiter is set to '/'. If true, will also include folders and managed folders (besides objects) in the returned prefixes. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[] \| null` | No | The list of items. |
| `kind` | `string \| null` | No | The kind of item this is. For lists of objects, this is always storage#objects. |
| `nextPageToken` | `string \| null` | No | The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |
| `prefixes` | `string[] \| null` | No | The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   acl?: {
>     bucket?: string | null,
>     domain?: string | null,
>     email?: string | null,
>     entity?: string | null,
>     entityId?: string | null,
>     etag?: string | null,
>     generation?: string | number | null,
>     id?: string | null,
>     kind?: string | null,
>     object?: string | null,
>     projectTeam?: {
>       projectNumber?: string | null,
>       team?: string | null
>     } | null,
>     role?: string | null,
>     selfLink?: string | null
>   }[] | null,
>   bucket?: string | null,
>   cacheControl?: string | null,
>   componentCount?: number | null,
>   contentDisposition?: string | null,
>   contentEncoding?: string | null,
>   contentLanguage?: string | null,
>   contentType?: string | null,
>   crc32c?: string | null,
>   customTime?: string | null,
>   customerEncryption?: {
>     encryptionAlgorithm?: string | null,
>     keySha256?: string | null
>   } | null,
>   etag?: string | null,
>   eventBasedHold?: boolean | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   kmsKeyName?: string | null,
>   md5Hash?: string | null,
>   mediaLink?: string | null,
>   metadata?: Record<string, string | null> | null | null,
>   contexts?: {
>     custom?: Record<string, {
>       value?: string | null,
>       createTime?: string | null,
>       updateTime?: string | null,
>       extendedDataTypeUrl?: string | null
>     }> | null
>   } | null,
>   restoreToken?: string | null,
>   metageneration?: string | number | null,
>   name?: string | null,
>   owner?: {
>     entity?: string | null,
>     entityId?: string | null
>   } | null,
>   retentionExpirationTime?: string | null,
>   retention?: {
>     retainUntilTime?: string | null,
>     mode?: string | null
>   } | null,
>   selfLink?: string | null,
>   size?: string | number | null,
>   storageClass?: string | null,
>   temporaryHold?: boolean | null,
>   timeCreated?: string | null,
>   timeDeleted?: string | null,
>   timeFinalized?: string | null,
>   softDeleteTime?: string | null,
>   hardDeleteTime?: string | null,
>   timeStorageClassUpdated?: string | null,
>   updated?: string | null,
>   zonalAvailabilityInfo?: {
>     availableZones?: string[] | null
>   } | null
> }[] | null
> ```

***

### objects.move

`storage.objects.move`

Moves the source object to the destination object in the same bucket

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storage.objects.move({ bucket: 'demo-project.appspot.com', sourceObject: 'x1', destinationObject: 'x1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `sourceObject` | `string` | Yes | Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `destinationObject` | `string` | Yes | Name of the destination object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `ifSourceGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current generation matches the given value. `ifSourceGenerationMatch` and `ifSourceGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. |
| `ifSourceGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current generation does not match the given value. `ifSourceGenerationMatch` and `ifSourceGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. |
| `ifSourceMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current metageneration matches the given value. `ifSourceMetagenerationMatch` and `ifSourceMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. |
| `ifSourceMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current metageneration does not match the given value. `ifSourceMetagenerationMatch` and `ifSourceMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. `ifGenerationMatch` and `ifGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.`ifGenerationMatch` and `ifGenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current metageneration matches the given value. `ifMetagenerationMatch` and `ifMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current metageneration does not match the given value. `ifMetagenerationMatch` and `ifMetagenerationNotMatch` conditions are mutually exclusive: it's an error for both of them to be set in the request. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the object. |
| `bucket` | `string \| null` | No | The name of the bucket containing this object. |
| `cacheControl` | `string \| null` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number \| null` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string \| null` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string \| null` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string \| null` | No | Content-Language of the object data. |
| `contentType` | `string \| null` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string \| null` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string \| null` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object \| null` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean \| null` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number \| null` | No | The content generation of this object. Used for object versioning. |
| `id` | `string \| null` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string \| null` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string \| null` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string \| null` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string \| null` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object \| null` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string \| null` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string \| null` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object \| null` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string \| null` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object \| null` | No | A collection of object level retention parameters. |
| `selfLink` | `string \| null` | No | The link to this object. |
| `size` | `string \| number \| null` | No | Content-Length of the data in bytes. |
| `storageClass` | `string \| null` | No | Storage class of the object. |
| `temporaryHold` | `boolean \| null` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string \| null` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string \| null` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string \| null` | No | The time when the object was finalized. |
| `softDeleteTime` | `string \| null` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string \| null` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string \| null` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object \| null` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string | null,
>   keySha256?: string | null
> } | null
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string | null,
>     createTime?: string | null,
>     updateTime?: string | null,
>     extendedDataTypeUrl?: string | null
>   }> | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string | null,
>   mode?: string | null
> } | null
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[] | null
> } | null
> ```

***

### objects.patch

`storage.objects.patch`

Patches an object's metadata

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storage.objects.patch({ bucket: 'demo-project.appspot.com', object: 'uploads/report.pdf' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration does not match the given value. |
| `overrideUnlockedRetention` | `boolean` | No | Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked. |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `predefinedAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of access controls to this object. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to full. |
| `userProject` | `string` | No | The project to be billed for this request, for Requester Pays buckets. |
| `acl` | `object[]` | No | Access controls on the object. |
| `body_bucket` | `string` | No | The name of the bucket containing this object. |
| `cacheControl` | `string` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string` | No | Content-Language of the object data. |
| `contentType` | `string` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `body_generation` | `string \| number` | No | The content generation of this object. Used for object versioning. |
| `id` | `string` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object` | No | A collection of object level retention parameters. |
| `selfLink` | `string` | No | The link to this object. |
| `size` | `string \| number` | No | Content-Length of the data in bytes. |
| `storageClass` | `string` | No | Storage class of the object. |
| `temporaryHold` | `boolean` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string` | No | The time when the object was finalized. |
| `softDeleteTime` | `string` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   object?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string,
>   keySha256?: string
> }
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string,
>     createTime?: string,
>     updateTime?: string,
>     extendedDataTypeUrl?: string
>   }>
> }
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string,
>   entityId?: string
> }
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string,
>   mode?: string
> }
> ```

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the object. |
| `bucket` | `string \| null` | No | The name of the bucket containing this object. |
| `cacheControl` | `string \| null` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number \| null` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string \| null` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string \| null` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string \| null` | No | Content-Language of the object data. |
| `contentType` | `string \| null` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string \| null` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string \| null` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object \| null` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean \| null` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number \| null` | No | The content generation of this object. Used for object versioning. |
| `id` | `string \| null` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string \| null` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string \| null` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string \| null` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string \| null` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object \| null` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string \| null` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string \| null` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object \| null` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string \| null` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object \| null` | No | A collection of object level retention parameters. |
| `selfLink` | `string \| null` | No | The link to this object. |
| `size` | `string \| number \| null` | No | Content-Length of the data in bytes. |
| `storageClass` | `string \| null` | No | Storage class of the object. |
| `temporaryHold` | `boolean \| null` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string \| null` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string \| null` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string \| null` | No | The time when the object was finalized. |
| `softDeleteTime` | `string \| null` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string \| null` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string \| null` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object \| null` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string | null,
>   keySha256?: string | null
> } | null
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string | null,
>     createTime?: string | null,
>     updateTime?: string | null,
>     extendedDataTypeUrl?: string | null
>   }> | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string | null,
>   mode?: string | null
> } | null
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[] | null
> } | null
> ```

***

### objects.restore

`storage.objects.restore`

Restores a soft-deleted object

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.storage.objects.restore({ bucket: 'demo-project.appspot.com', generation: 'example', object: 'uploads/report.pdf' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | Yes | Selects a specific revision of this object. |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's one live generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether none of the object's live generations match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's one live metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether none of the object's live metagenerations match the given value. |
| `copySourceAcl` | `boolean` | No | If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to full. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `restoreToken` | `string` | No | Restore token used to differentiate sof-deleted objects with the same name and generation. Only applicable for hierarchical namespace buckets. This parameter is optional, and is only required in the rare case when there are multiple soft-deleted objects with the same name and generation. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the object. |
| `bucket` | `string \| null` | No | The name of the bucket containing this object. |
| `cacheControl` | `string \| null` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number \| null` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string \| null` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string \| null` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string \| null` | No | Content-Language of the object data. |
| `contentType` | `string \| null` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string \| null` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string \| null` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object \| null` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean \| null` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number \| null` | No | The content generation of this object. Used for object versioning. |
| `id` | `string \| null` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string \| null` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string \| null` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string \| null` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string \| null` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object \| null` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string \| null` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string \| null` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object \| null` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string \| null` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object \| null` | No | A collection of object level retention parameters. |
| `selfLink` | `string \| null` | No | The link to this object. |
| `size` | `string \| number \| null` | No | Content-Length of the data in bytes. |
| `storageClass` | `string \| null` | No | Storage class of the object. |
| `temporaryHold` | `boolean \| null` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string \| null` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string \| null` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string \| null` | No | The time when the object was finalized. |
| `softDeleteTime` | `string \| null` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string \| null` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string \| null` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object \| null` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string | null,
>   keySha256?: string | null
> } | null
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string | null,
>     createTime?: string | null,
>     updateTime?: string | null,
>     extendedDataTypeUrl?: string | null
>   }> | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string | null,
>   mode?: string | null
> } | null
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[] | null
> } | null
> ```

***

### objects.rewrite

`storage.objects.rewrite`

Rewrites a source object to a destination object. Optionally overrides metadata

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storage.objects.rewrite({
	destinationBucket: 'x1',
	destinationObject: 'x1',
	sourceBucket: 'x1',
	sourceObject: 'x1',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `destinationBucket` | `string` | Yes | Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any. |
| `destinationKmsKeyName` | `string` | No | Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms\_key\_name value, if any. |
| `destinationObject` | `string` | Yes | Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `destinationPredefinedAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of access controls to the destination object. |
| `dropContextGroups` | `string[]` | No | Specifies which object context groups to drop from the source object during a copy operation. The accepted value is 'custom'. Destination contexts behave as follows: - When request body contexts are provided, they override all source contexts. - When no request body contexts are provided, source contexts are preserved unless 'dropContextGroups' contains 'custom', in which case all contexts are dropped. |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the destination object's current metageneration does not match the given value. |
| `ifSourceGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current generation matches the given value. |
| `ifSourceGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current generation does not match the given value. |
| `ifSourceMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current metageneration matches the given value. |
| `ifSourceMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the source object's current metageneration does not match the given value. |
| `maxBytesRewrittenPerCall` | `string \| number` | No | The maximum number of bytes that will be rewritten per rewrite request. Most callers shouldn't need to specify this parameter - it is primarily in place to support testing. If specified the value must be an integral multiple of 1 MiB (1048576). Also, this only applies to requests where the source and destination span locations and/or storage classes. Finally, this value must not change across rewrite calls else you'll get an error that the rewriteToken is invalid. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full. |
| `rewriteToken` | `string` | No | Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request. |
| `sourceBucket` | `string` | Yes | Name of the bucket in which to find the source object. |
| `sourceGeneration` | `string \| number` | No | If present, selects a specific revision of the source object (as opposed to the latest version, the default). |
| `sourceObject` | `string` | Yes | Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `acl` | `object[]` | No | Access controls on the object. |
| `bucket` | `string` | No | The name of the bucket containing this object. |
| `cacheControl` | `string` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string` | No | Content-Language of the object data. |
| `contentType` | `string` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number` | No | The content generation of this object. Used for object versioning. |
| `id` | `string` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object` | No | A collection of object level retention parameters. |
| `selfLink` | `string` | No | The link to this object. |
| `size` | `string \| number` | No | Content-Length of the data in bytes. |
| `storageClass` | `string` | No | Storage class of the object. |
| `temporaryHold` | `boolean` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string` | No | The time when the object was finalized. |
| `softDeleteTime` | `string` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   object?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string,
>   keySha256?: string
> }
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string,
>     createTime?: string,
>     updateTime?: string,
>     extendedDataTypeUrl?: string
>   }>
> }
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string,
>   entityId?: string
> }
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string,
>   mode?: string
> }
> ```

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `done` | `boolean \| null` | No | true if the copy is finished; otherwise, false if the copy is in progress. This property is always present in the response. |
| `kind` | `string \| null` | No | The kind of item this is. |
| `objectSize` | `string \| number \| null` | No | The total size of the object being copied in bytes. This property is always present in the response. |
| `resource` | `object \| null` | No | An object. |
| `rewriteToken` | `string \| null` | No | A token to use in subsequent requests to continue copying data. This token is present in the response only when there is more data to copy. |
| `totalBytesRewritten` | `string \| number \| null` | No | The total bytes written so far, which can be used to provide a waiting user with a progress indicator. This property is always present in the response. |

> [accordion] resource full type
>
> ```ts theme={null}
> {
>   acl?: {
>     bucket?: string | null,
>     domain?: string | null,
>     email?: string | null,
>     entity?: string | null,
>     entityId?: string | null,
>     etag?: string | null,
>     generation?: string | number | null,
>     id?: string | null,
>     kind?: string | null,
>     object?: string | null,
>     projectTeam?: {
>       projectNumber?: string | null,
>       team?: string | null
>     } | null,
>     role?: string | null,
>     selfLink?: string | null
>   }[] | null,
>   bucket?: string | null,
>   cacheControl?: string | null,
>   componentCount?: number | null,
>   contentDisposition?: string | null,
>   contentEncoding?: string | null,
>   contentLanguage?: string | null,
>   contentType?: string | null,
>   crc32c?: string | null,
>   customTime?: string | null,
>   customerEncryption?: {
>     encryptionAlgorithm?: string | null,
>     keySha256?: string | null
>   } | null,
>   etag?: string | null,
>   eventBasedHold?: boolean | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   kmsKeyName?: string | null,
>   md5Hash?: string | null,
>   mediaLink?: string | null,
>   metadata?: Record<string, string | null> | null | null,
>   contexts?: {
>     custom?: Record<string, {
>       value?: string | null,
>       createTime?: string | null,
>       updateTime?: string | null,
>       extendedDataTypeUrl?: string | null
>     }> | null
>   } | null,
>   restoreToken?: string | null,
>   metageneration?: string | number | null,
>   name?: string | null,
>   owner?: {
>     entity?: string | null,
>     entityId?: string | null
>   } | null,
>   retentionExpirationTime?: string | null,
>   retention?: {
>     retainUntilTime?: string | null,
>     mode?: string | null
>   } | null,
>   selfLink?: string | null,
>   size?: string | number | null,
>   storageClass?: string | null,
>   temporaryHold?: boolean | null,
>   timeCreated?: string | null,
>   timeDeleted?: string | null,
>   timeFinalized?: string | null,
>   softDeleteTime?: string | null,
>   hardDeleteTime?: string | null,
>   timeStorageClassUpdated?: string | null,
>   updated?: string | null,
>   zonalAvailabilityInfo?: {
>     availableZones?: string[] | null
>   } | null
> } | null
> ```

***

### objects.setIamPolicy

`storage.objects.setIamPolicy`

Updates an IAM policy for the specified object

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storage.objects.setIamPolicy({ bucket: 'demo-project.appspot.com', object: 'uploads/report.pdf' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `bindings` | `object[]` | No | An association between a role, which comes with a set of permissions, and members who may assume that role. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the policy. (base64) |
| `kind` | `string` | No | The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. |
| `resourceId` | `string` | No | The ID of the resource to which this policy belongs. Will be of the form projects/*/buckets/bucket for buckets, projects/*/buckets/bucket/objects/object for objects, and projects/*/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/*/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. |
| `version` | `number` | No | The IAM policy format version. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     description?: string,
>     expression?: string,
>     location?: string,
>     title?: string
>   },
>   members?: string[],
>   role?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bindings` | `object[] \| null` | No | An association between a role, which comes with a set of permissions, and members who may assume that role. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the policy. (base64) |
| `kind` | `string \| null` | No | The kind of item this is. For policies, this is always storage#policy. This field is ignored on input. |
| `resourceId` | `string \| null` | No | The ID of the resource to which this policy belongs. Will be of the form projects/*/buckets/bucket for buckets, projects/*/buckets/bucket/objects/object for objects, and projects/*/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/*/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input. |
| `version` | `number \| null` | No | The IAM policy format version. |

> [accordion] bindings full type
>
> ```ts theme={null}
> {
>   condition?: {
>     description?: string | null,
>     expression?: string | null,
>     location?: string | null,
>     title?: string | null
>   } | null,
>   members?: string[] | null,
>   role?: string | null
> }[] | null
> ```

***

### objects.testIamPermissions

`storage.objects.testIamPermissions`

Tests a set of permissions on the given object to see which, if any, are held by the caller

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.storage.objects.testIamPermissions({
	bucket: 'demo-project.appspot.com',
	object: 'uploads/report.pdf',
	permissions: ['example'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `permissions` | `string[]` | Yes | Permissions to test. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | The kind of item this is. |
| `permissions` | `string[] \| null` | No | The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets, objects, or managedFolders. The supported permissions are as follows: - storage.buckets.delete - Delete bucket. - storage.buckets.get - Read bucket metadata. - storage.buckets.getIamPolicy - Read bucket IAM policy. - storage.buckets.create - Create bucket. - storage.buckets.list - List buckets. - storage.buckets.setIamPolicy - Update bucket IAM policy. - storage.buckets.update - Update bucket metadata. - storage.objects.delete - Delete object. |

***

### objects.update

`storage.objects.update`

Updates an object's metadata

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storage.objects.update({ bucket: 'demo-project.appspot.com', object: 'uploads/report.pdf' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `ifGenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object. |
| `ifGenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object. |
| `ifMetagenerationMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration matches the given value. |
| `ifMetagenerationNotMatch` | `string \| number` | No | Makes the operation conditional on whether the object's current metageneration does not match the given value. |
| `overrideUnlockedRetention` | `boolean` | No | Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked. |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `predefinedAcl` | `authenticatedRead \| bucketOwnerFullControl \| bucketOwnerRead \| private \| projectPrivate \| publicRead` | No | Apply a predefined set of access controls to this object. |
| `projection` | `full \| noAcl` | No | Set of properties to return. Defaults to full. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |
| `acl` | `object[]` | No | Access controls on the object. |
| `body_bucket` | `string` | No | The name of the bucket containing this object. |
| `cacheControl` | `string` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string` | No | Content-Language of the object data. |
| `contentType` | `string` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `body_generation` | `string \| number` | No | The content generation of this object. Used for object versioning. |
| `id` | `string` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object` | No | A collection of object level retention parameters. |
| `selfLink` | `string` | No | The link to this object. |
| `size` | `string \| number` | No | Content-Length of the data in bytes. |
| `storageClass` | `string` | No | Storage class of the object. |
| `temporaryHold` | `boolean` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string` | No | The time when the object was finalized. |
| `softDeleteTime` | `string` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string,
>   domain?: string,
>   email?: string,
>   entity?: string,
>   entityId?: string,
>   etag?: string,
>   generation?: string | number,
>   id?: string,
>   kind?: string,
>   object?: string,
>   projectTeam?: {
>     projectNumber?: string,
>     team?: string
>   },
>   role?: string,
>   selfLink?: string
> }[]
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string,
>   keySha256?: string
> }
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string,
>     createTime?: string,
>     updateTime?: string,
>     extendedDataTypeUrl?: string
>   }>
> }
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string,
>   entityId?: string
> }
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string,
>   mode?: string
> }
> ```

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `acl` | `object[] \| null` | No | Access controls on the object. |
| `bucket` | `string \| null` | No | The name of the bucket containing this object. |
| `cacheControl` | `string \| null` | No | Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600. |
| `componentCount` | `number \| null` | No | Number of underlying components that make up this object. Components are accumulated by compose operations. |
| `contentDisposition` | `string \| null` | No | Content-Disposition of the object data. |
| `contentEncoding` | `string \| null` | No | Content-Encoding of the object data. |
| `contentLanguage` | `string \| null` | No | Content-Language of the object data. |
| `contentType` | `string \| null` | No | Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream. |
| `crc32c` | `string \| null` | No | CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `customTime` | `string \| null` | No | A timestamp in RFC 3339 format specified by the user for an object. |
| `customerEncryption` | `object \| null` | No | Metadata of customer-supplied encryption key, if the object is encrypted by such a key. |
| `etag` | `string \| null` | No | HTTP 1.1 Entity tag for the object. |
| `eventBasedHold` | `boolean \| null` | No | Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. |
| `generation` | `string \| number \| null` | No | The content generation of this object. Used for object versioning. |
| `id` | `string \| null` | No | The ID of the object, including the bucket name, object name, and generation number. |
| `kind` | `string \| null` | No | The kind of item this is. For objects, this is always storage#object. |
| `kmsKeyName` | `string \| null` | No | Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request. |
| `md5Hash` | `string \| null` | No | MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation). |
| `mediaLink` | `string \| null` | No | Media download link. |
| `metadata` | `Record<string, string \| null> \| null \| null` | No | User-provided metadata, in key/value pairs. On a patch, a key set to null deletes that entry and `metadata: null` deletes them all. |
| `contexts` | `object \| null` | No | User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata. |
| `restoreToken` | `string \| null` | No | Restore token used to differentiate deleted objects with the same name and generation. This field is only returned for deleted objects in hierarchical namespace buckets. |
| `metageneration` | `string \| number \| null` | No | The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object. |
| `name` | `string \| null` | No | The name of the object. Required if not specified by URL parameter. |
| `owner` | `object \| null` | No | The owner of the object. This will always be the uploader of the object. |
| `retentionExpirationTime` | `string \| null` | No | A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold). |
| `retention` | `object \| null` | No | A collection of object level retention parameters. |
| `selfLink` | `string \| null` | No | The link to this object. |
| `size` | `string \| number \| null` | No | Content-Length of the data in bytes. |
| `storageClass` | `string \| null` | No | Storage class of the object. |
| `temporaryHold` | `boolean \| null` | No | Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object. |
| `timeCreated` | `string \| null` | No | The creation time of the object in RFC 3339 format. |
| `timeDeleted` | `string \| null` | No | The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted. |
| `timeFinalized` | `string \| null` | No | The time when the object was finalized. |
| `softDeleteTime` | `string \| null` | No | The time at which the object became soft-deleted in RFC 3339 format. |
| `hardDeleteTime` | `string \| null` | No | This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket. |
| `timeStorageClassUpdated` | `string \| null` | No | The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated. |
| `updated` | `string \| null` | No | The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration. |
| `zonalAvailabilityInfo` | `object \| null` | No | Information about the object's availability in Rapid Cache Ultra (RCU) zonal caches. This field will only populate once the object is loaded into the cache. |

> [accordion] acl full type
>
> ```ts theme={null}
> {
>   bucket?: string | null,
>   domain?: string | null,
>   email?: string | null,
>   entity?: string | null,
>   entityId?: string | null,
>   etag?: string | null,
>   generation?: string | number | null,
>   id?: string | null,
>   kind?: string | null,
>   object?: string | null,
>   projectTeam?: {
>     projectNumber?: string | null,
>     team?: string | null
>   } | null,
>   role?: string | null,
>   selfLink?: string | null
> }[] | null
> ```

> [accordion] customerEncryption full type
>
> ```ts theme={null}
> {
>   encryptionAlgorithm?: string | null,
>   keySha256?: string | null
> } | null
> ```

> [accordion] contexts full type
>
> ```ts theme={null}
> {
>   custom?: Record<string, {
>     value?: string | null,
>     createTime?: string | null,
>     updateTime?: string | null,
>     extendedDataTypeUrl?: string | null
>   }> | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   entity?: string | null,
>   entityId?: string | null
> } | null
> ```

> [accordion] retention full type
>
> ```ts theme={null}
> {
>   retainUntilTime?: string | null,
>   mode?: string | null
> } | null
> ```

> [accordion] zonalAvailabilityInfo full type
>
> ```ts theme={null}
> {
>   availableZones?: string[] | null
> } | null
> ```

***

### objects.viewFullContext

`storage.objects.viewFullContext`

Retrieves a specific object context with its extended data for a given object

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.storage.objects.viewFullContext({ bucket: 'demo-project.appspot.com', object: 'uploads/report.pdf', contextKey: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Name of the bucket in which the object resides. |
| `object` | `string` | Yes | Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding). |
| `generation` | `string \| number` | No | If present, selects a specific revision of this object (as opposed to the latest version, the default). |
| `contextKey` | `string` | Yes | Key identifying the object context to retrieve. |
| `userProject` | `string` | No | The project to be billed for this request. Required for Requester Pays buckets. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `string \| null` | No | The kind of item this is. For ObjectFullContext, this is always storage#objectFullContext. |
| `type` | `string \| null` | No | The type of the object context. |
| `key` | `string \| null` | No | The key of the object context. |
| `value` | `string \| null` | No | The value of the object context. |
| `createTime` | `string \| null` | No | The time at which the object context was created. This value is in RFC 3339 format. |
| `updateTime` | `string \| null` | No | The time at which the object context was last updated. This value is in RFC 3339 format. |
| `extendedData` | `Record<string, any> \| null` | No | The extended data of the object context. |

***

## Storage Buckets

### buckets.addFirebase

`storageBuckets.buckets.addFirebase`

Links a Google Cloud Storage bucket to a Firebase project

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.storageBuckets.buckets.addFirebase({ bucket: 'projects/demo-project/buckets/demo-project.appspot.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket, `projects/{project_id_or_number}/buckets/{bucket_id}`. Format: `projects/<id>/buckets/<id>`. |
| `body` | `object` | No | The request used to link a Google Cloud Storage bucket to a Firebase project. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Output only. Resource name of the bucket. |

***

### buckets.get

`storageBuckets.buckets.get`

Gets a single linked storage bucket

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.storageBuckets.buckets.get({ name: 'projects/demo-project/buckets/demo-project.appspot.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket, `projects/{project_id_or_number}/buckets/{bucket_id}`. Format: `projects/<id>/buckets/<id>`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string \| null` | No | Output only. Resource name of the bucket. |

***

### buckets.list

`storageBuckets.buckets.list`

Lists the linked storage buckets for a project (paged with pageToken / nextPageToken)

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.storageBuckets.buckets.list({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. Resource name of the parent Firebase project, `projects/{project_id_or_number}`. Format: `projects/<id>`. |
| `pageToken` | `string` | No | A page token, received from a previous `ListBuckets` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBuckets` must match the call that provided the page token. |
| `pageSize` | `number` | No | The maximum number of buckets to return. If not set, the server will use a reasonable default. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `nextPageToken` | `string \| null` | No | A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| `buckets` | `object[] \| null` | No | The list of linked buckets. |

> [accordion] buckets full type
>
> ```ts theme={null}
> {
>   name?: string | null
> }[] | null
> ```

***

### buckets.removeFirebase

`storageBuckets.buckets.removeFirebase`

Unlinks a linked Google Cloud Storage bucket from a Firebase project

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storageBuckets.buckets.removeFirebase({ bucket: 'projects/demo-project/buckets/demo-project.appspot.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `string` | Yes | Required. Resource name of the bucket, mirrors the ID of the underlying Google Cloud Storage bucket, `projects/{project_id_or_number}/buckets/{bucket_id}`. Format: `projects/<id>/buckets/<id>`. |
| `body` | `object` | No | The request used to unlink a Google Cloud Storage bucket from a Firebase project. |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### defaultBucket.create

`storageBuckets.defaultBucket.create`

Creates a Spark tier-eligible Cloud Storage bucket and links it to your Firebase project. If the default bucket already exists, this method will re-link it to your Firebase project

**Risk:** `write`

```ts theme={null}
await corsair.firebase.api.storageBuckets.defaultBucket.create({ parent: 'projects/demo-project' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parent` | `string` | Yes | Required. The parent resource where the default bucket will be created, `projects/{project_id_or_number}`. Format: `projects/<id>`. |
| `location` | `string` | No | Required. Immutable. Location of the default bucket. |
| `name` | `string` | No | Identifier. Resource name of the default bucket. |
| `storageClass` | `string` | No | Immutable. Storage class of the default bucket. Supported values are available at [https://cloud.google.com/storage/docs/storage-classes#classes](https://cloud.google.com/storage/docs/storage-classes#classes). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `object \| null` | No | A storage bucket and its relation to a parent Firebase project. |
| `location` | `string \| null` | No | Required. Immutable. Location of the default bucket. |
| `name` | `string \| null` | No | Identifier. Resource name of the default bucket. |
| `storageClass` | `string \| null` | No | Immutable. Storage class of the default bucket. Supported values are available at [https://cloud.google.com/storage/docs/storage-classes#classes](https://cloud.google.com/storage/docs/storage-classes#classes). |

> [accordion] bucket full type
>
> ```ts theme={null}
> {
>   name?: string | null
> } | null
> ```

***

### projects.deleteDefaultBucket

`storageBuckets.projects.deleteDefaultBucket`

Unlinks and deletes the default bucket

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.firebase.api.storageBuckets.projects.deleteDefaultBucket({ name: 'projects/demo-project/defaultBucket' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the default bucket to delete, `projects/{project_id_or_number}/defaultBucket`. Format: `projects/<id>/defaultBucket`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Firebase accepted the call; it answered with no body (or an empty object). |

***

### projects.getDefaultBucket

`storageBuckets.projects.getDefaultBucket`

Gets the default bucket

**Risk:** `read`

```ts theme={null}
await corsair.firebase.api.storageBuckets.projects.getDefaultBucket({ name: 'projects/demo-project/defaultBucket' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Required. The name of the default bucket to retrieve, `projects/{project_id_or_number}/defaultBucket`. Format: `projects/<id>/defaultBucket`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bucket` | `object \| null` | No | A storage bucket and its relation to a parent Firebase project. |
| `location` | `string \| null` | No | Required. Immutable. Location of the default bucket. |
| `name` | `string \| null` | No | Identifier. Resource name of the default bucket. |
| `storageClass` | `string \| null` | No | Immutable. Storage class of the default bucket. Supported values are available at [https://cloud.google.com/storage/docs/storage-classes#classes](https://cloud.google.com/storage/docs/storage-classes#classes). |

> [accordion] bucket full type
>
> ```ts theme={null}
> {
>   name?: string | null
> } | null
> ```

***


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