> ## Documentation Index
> Fetch the complete documentation index at: https://jdev-e8db0569.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Types

> Dart classes for the SEON SDK configuration and results.

## SeonConfig

Configuration class for initializing the SEON SDK via [`initialize()`](/api-reference/initialize).

```dart theme={null}
class SeonConfig {
  final String baseUrl;
  final String token;
  final String? language;
  final Map<String, dynamic>? theme;

  const SeonConfig({
    required this.baseUrl,
    required this.token,
    this.language,
    this.theme,
  });

  String? get themeJson => theme != null ? jsonEncode(theme) : null;
}
```

### Properties

| Property   | Type                    | Required | Description                                                                                                                                                                                                 |
| ---------- | ----------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `baseUrl`  | `String`                | Yes      | The base URL for your SEON API endpoint (see [Regional Base URLs](#regional-base-urls) below)                                                                                                               |
| `token`    | `String`                | Yes      | Session token provided by your backend for this verification session                                                                                                                                        |
| `language` | `String?`               | No       | Language code for the SDK UI (e.g., `'en'`, `'es'`, `'de'`). Defaults to device language                                                                                                                    |
| `theme`    | `Map<String, dynamic>?` | No       | Theme configuration map for UI customization. Automatically JSON-encoded before passing to the native SDK. Refer to the [SEON workflow initialization docs](https://docs.seon.io) for the full theme schema |

### Regional Base URLs

Use the base URL for your SEON region:

| Region | Base URL                                                    |
| ------ | ----------------------------------------------------------- |
| EU     | `https://api.seon.io/orchestration-api`                     |
| US     | `https://api.us-east-1-main.seon.io/orchestration-api`      |
| APAC   | `https://api.ap-southeast-1-main.seon.io/orchestration-api` |

### Theme Configuration

The `theme` parameter accepts a `Map<String, dynamic>` that controls the verification UI appearance. The map is automatically JSON-encoded via the `themeJson` getter before being passed to the native SDK. If omitted, the SDK uses its default theme. Refer to the [SEON workflow initialization docs](https://docs.seon.io) for the full theme schema and available properties.

```dart theme={null}
await SeonOrchestration.initialize(SeonConfig(
  baseUrl: 'https://api.seon.io/orchestration-api',
  token: 'your-session-token',
  theme: { /* your theme config */ },
));
```

### Example

```dart theme={null}
const config = SeonConfig(
  baseUrl: 'https://api.seon.io/orchestration-api',
  token: 'your-session-token',
  language: 'en',
);
```

***

## SeonVerificationResult

The result object returned by [`startVerification()`](/api-reference/start-verification).

```dart theme={null}
class SeonVerificationResult {
  final SeonVerificationStatus status;
  final String? errorMessage;

  const SeonVerificationResult({
    required this.status,
    this.errorMessage,
  });
}
```

### Properties

| Property       | Type                                                                    | Description                                  |
| -------------- | ----------------------------------------------------------------------- | -------------------------------------------- |
| `status`       | [`SeonVerificationStatus`](/api-reference/enums#seonverificationstatus) | The final status of the verification process |
| `errorMessage` | `String?`                                                               | Error message if status is `error`           |

### Example

```dart theme={null}
final result = await SeonOrchestration.startVerification();

if (result.status == SeonVerificationStatus.error) {
  print('Verification error: ${result.errorMessage}');
}
```

***

## SeonException

Exception class thrown when a SEON operation fails.

```dart theme={null}
class SeonException implements Exception {
  final SeonErrorCode code;
  final String rawCode;
  final String message;

  const SeonException({
    required this.code,
    required this.rawCode,
    required this.message,
  });

  @override
  String toString() => 'SeonException(${code.name}): $message';
}
```

### Properties

| Property  | Type                                                  | Description                                                               |
| --------- | ----------------------------------------------------- | ------------------------------------------------------------------------- |
| `code`    | [`SeonErrorCode`](/api-reference/enums#seonerrorcode) | The structured error code enum value                                      |
| `rawCode` | `String`                                              | The raw error code string from the platform (e.g., `'E_NOT_INITIALIZED'`) |
| `message` | `String`                                              | Human-readable error message                                              |

### Example

```dart theme={null}
try {
  await SeonOrchestration.startVerification();
} on SeonException catch (e) {
  if (e.code == SeonErrorCode.eNotInitialized) {
    print('Call initialize() first');
  }
  print('Error: ${e.message}');
}
```
