> For the complete documentation index, see [llms.txt](https://docs.caf.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.caf.io/caf-sdk/react-native/standalone-modules/cafsmartauth/expo-modules/typescript-references.md).

# TypeScript References

## Types

### `CafSmartAuthResponse`

| Field       | Type                                        | Description                                         |
| ----------- | ------------------------------------------- | --------------------------------------------------- |
| `success`   | [CafSmartAuthSuccess](#cafsmartauthsuccess) | Shows when smart auth returns a successful capture. |
| `error`     | string                                      | Shows when the smart auth return some error.        |
| `cancelled` | boolean                                     | Shows when user cancel the smart auth.              |
| `pending`   | [CafSmartAuthPending](#cafsmartauthpending) | Shows when smart auth is pending.                   |
| `isLoading` | boolean                                     | Shows when the smart auth is loading.               |

### `CafSmartAuthSuccess`

| Field          | Type    | Description                                                   |
| -------------- | ------- | ------------------------------------------------------------- |
| `isAuthorized` | boolean | A Boolean value indicating whether the smart auth is genuine. |
| `attemptId`    | string  | The ID of the face liveness verification attempt.             |
| `attestation`  | string  | The signed response confirming the smart auth is genuine.     |

### `CafSmartAuthPending`

| Field          | Type    | Description                                                   |
| -------------- | ------- | ------------------------------------------------------------- |
| `isAuthorized` | boolean | A Boolean value indicating whether the smart auth is genuine. |
| `attestation`  | string  | The signed response confirming the smart auth is genuine.     |

### `CafSmartAuthError`

| Field     | Type   | Description                       |
| --------- | ------ | --------------------------------- |
| `message` | string | A message error emitted from SDK. |

### `CafSmartAuthCancel`

| Field         | Type    | Description                                       |
| ------------- | ------- | ------------------------------------------------- |
| `isCancelled` | boolean | Indicates if the smart auth process was canceled. |

### `CafSmartAuthLoading`

| Field       | Type    | Description                             |
| ----------- | ------- | --------------------------------------- |
| `isLoading` | boolean | Indicates if the smart auth is loading. |

### `CafSmartAuthLoaded`

| Field      | Type    | Description                            |
| ---------- | ------- | -------------------------------------- |
| `isLoaded` | boolean | Indicates if the smart auth is loaded. |

### `CafSmartAuthTheme`

| Field                      | Type   | Description                                    | Android | iOS |
| -------------------------- | ------ | ---------------------------------------------- | :-----: | :-: |
| `backgroundColor`          | string | Background color of the authentication screen. |    ✅    |  ✅  |
| `textColor`                | string | Color of primary text on the screen.           |    ✅    |  ✅  |
| `progressColor`            | string | Color of the progress indicator.               |    ✅    |  ✅  |
| `linkColor`                | string | Color of clickable links.                      |    ✅    |  ✅  |
| `boxBackgroundColor`       | string | Background color of input fields.              |    ✅    |  ✅  |
| `boxFilledBackgroundColor` | string | Background color of input fields when filled.  |    ❌    |  ✅  |
| `boxBorderColor`           | string | Border color of input fields.                  |    ✅    |  ✅  |
| `boxFilledBorderColor`     | string | Border color of input fields when filled.      |    ❌    |  ✅  |
| `boxTextColor`             | string | Text color inside input fields.                |    ✅    |  ✅  |

### `CafSmartAuthThemeConfigurator`

| Field        | Type                                    | Description                                                           | Android | iOS |
| ------------ | --------------------------------------- | --------------------------------------------------------------------- | :-----: | :-: |
| `lightTheme` | [CafSmartAuthTheme](#cafsmartauththeme) | Defines the visual theme for the authentication screen in light mode. |    ✅    |  ✅  |
| `darkTheme`  | [CafSmartAuthTheme](#cafsmartauththeme) | Defines the visual theme for the authentication screen in dark mode.  |    ✅    |  ✅  |

### `CafSmartAuthSettings`

| Field                        | Type                                                            | Description                                                                              | Android | iOS |
| ---------------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | :-----: | :-: |
| `faceAuthenticationSettings` | [CafFaceAuthenticationSettings](#caffaceauthenticationsettings) | Used to change the SDK filter.                                                           |    ✅    |  ✅  |
| `stage`                      | [CafStage](#cafstage)                                           | Used to redirect the SDK to the desired stage in caf api.                                |    ✅    |  ✅  |
| `emailUrl`                   | string                                                          | Sets the email authentication URL. Must be HTTPS protocol.                               |    ✅    |  ✅  |
| `phoneUrl`                   | string                                                          | Sets the phone authentication URL. Must be HTTPS protocol.                               |    ✅    |  ✅  |
| `theme`                      | [CafSmartAuthThemeConfigurator](#cafsmartauththemeconfigurator) | Sets the theme configuration for the SDK. Customize appearance for light and dark modes. |    ✅    |  ✅  |

### `CafSmartAuthResponse`

| Field       | Type                                                | Description                                               |
| ----------- | --------------------------------------------------- | --------------------------------------------------------- |
| `success`   | [CafSmartAuthSuccess](#cafsmartauthsuccess)         | Shows when smart auth returns a successful capture.       |
| `error`     | [CafSmartAuthError](#cafsmartautherror) \| null     | Shows when the smart auth returns an error.               |
| `cancelled` | boolean                                             | Indicates if the user canceled the smart auth process.    |
| `pending`   | [CafSmartAuthPending](#cafsmartauthpending) \| null | Shows when smart auth is pending.                         |
| `isLoading` | boolean                                             | Indicates if the smart auth process is currently loading. |

### `CafSmartAuthBridgeModuleEvents`

| Event                  | Type                                        | Description                                       |
| ---------------------- | ------------------------------------------- | ------------------------------------------------- |
| `CafSmartAuth_Success` | [CafSmartAuthSuccess](#cafsmartauthsuccess) | Triggered when a successful capture occurs.       |
| `CafSmartAuth_Pending` | [CafSmartAuthPending](#cafsmartauthpending) | Triggered when the smart auth process is pending. |
| `CafSmartAuth_Error`   | [CafSmartAuthError](#cafsmartautherror)     | Triggered when an error occurs.                   |
| `CafSmartAuth_Cancel`  | [CafSmartAuthCancel](#cafsmartauthcancel)   | Triggered when the process is canceled.           |
| `CafSmartAuth_Loading` | [CafSmartAuthLoading](#cafsmartauthloading) | Triggered when the process is loading.            |
| `CafSmartAuth_Loaded`  | [CafSmartAuthLoaded](#cafsmartauthloaded)   | Triggered when the process has loaded.            |

## Enums

### `CafStage`

| Field  | Description              | Android | iOS |
| ------ | ------------------------ | :-----: | :-: |
| `DEV`  | Developmemnt environment |    ✅    |  ✅  |
| `BETA` | Beta environment.        |    ✅    |  ✅  |
| `PROD` | Production environment.  |    ✅    |  ✅  |

### `CafFilter`

| Field          | Description                         | Android | iOS |
| -------------- | ----------------------------------- | :-----: | :-: |
| `NATURAL`      | Normal mask for face liveness.      |    ✅    |  ✅  |
| `LINE_DRAWING` | Alternative mask for face liveness. |    ✅    |  ✅  |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.caf.io/caf-sdk/react-native/standalone-modules/cafsmartauth/expo-modules/typescript-references.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
