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

# SDK Types

> Type definitions and interfaces for the Proview SDK, including configuration objects, session types, and data structures.

## InitOptions

| Attribute | Type | Description | Default |
| - | - | - | - |
| dsn\* | `string` | The DSN tells the SDK where to send the events. If this is not set, the SDK will not send any events. | |
| identifier\* | `string` | Value that can identify the proctored session in the source platform. | |
| allowed\_languages | `[locale.languages]`\[] | This will limit language options for users to select from the supported list | All supported languages |
| language | `[locale.languages]` | Explicitly set the SDK language | Browser default if its not supported then fallback to English (`en-US`). |

## ProviewError

The object passed to your `Proview.onError` handler. See the [Error Reference](/sdk/errors) for the full code list and handling guidance.

| Attribute | Type | Description | Default |
| - | - | - | - |
| code | `string` | Stable identifier for the failure. See [Error codes](/sdk/errors#error-codes). | |
| message | `string` | Human-readable reason for the error, for logs. | |
| type | `'critical' \| 'warning' \| 'info'` | Severity. `critical` means core proctoring delivery is impacted. Set per occurrence, so the same code can arrive at different severities. | |
| validationErrors | `CustomValidationError` | Present only when a configuration object failed schema validation. | |

## CustomValidationError

A single object — **not** an array. The individual failures are in `issues`.

| Attribute | Type | Description | Default |
| - | - | - | - |
| formattedMessage | `string` | Every validation failure rendered into one human-readable string, naming the fields that were rejected. Use this. | |
| issues | `unknown[]` | Raw output from the SDK's schema validator, one entry per failed field. Element shape is not part of the documented contract — opaque diagnostic detail. | |

## Session Type Definitions

### session.constant.type

Its of type enum which contains following values.

* `Recorded`
* `RecordedAndReview`
* `Live`
* `Dynamic`

### session.constant.state

Its of type enum which contains following values.

* `INITIALISED`
* `ONBOARDING_IN_PROGRESS`
* `MONITORING_IN_PROGRESS`
* `PAUSED`
* `SUSPENDED`
* `STOPPED`
* `COMPLETED`
* `TERMINATED`

## SessionOptions

| Attribute | Type | Description | Default |
| - | - | - | - |
| type | `session.constant.type` | | |
| identifier | `string` | unique session identifier from the source system. It will be the session external id in the Talview platform. | |

## SessionOutput

| Attribute | Type | Description | Default |
| - | - | - | - |
| uuid | `GUID` | Reference Talview identifier for client application to track. | |
| state | `session.constant.state` | | |
| attendee | `Attendee` | | |
| workflow\_step | `Workflow` | | If not passed then system will generate email based on identifier. e.g: [Att0001@dnd.talview.com](mailto:Att0001@dnd.talview.com) |
| identifier | `string` | unique session identifier from the source system. It will be the session external id in the Talview platform. | |

## Attendee Type Definitions

### Attendee

| Attribute | Type | Description | Default |
| - | - | - | - |
| identifier\* | `string` | unique user identifier from the source system. It will be the external id in the Talview platform. | |
| first\_name | `string` | | |
| last\_name | `string` | | |
| middle\_name | `string` | | |
| email | `string` | | If not passed then system will generate email based on identifier. e.g: [Att0001@dnd.talview.com](mailto:Att0001@dnd.talview.com) |
| country\_code | `string (3)` | [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements) | |
| country | `string` | Country code is passed then system will auto identify the country otherwise system will identify country code from country. | |
| phone | `string (15)` | E164 format | |
| id | `int` | Talview unique id generated for the course | |

## Workflow Type Definitions

### Exam Workflow

| Attribute | Type | Description | Default |
| - | - | - | - |
| identifier\* | `string` | Unique identifier for the exam from the calling application. It will be the external id in the Talview platform. | |
| name | `string` | Name of the exam | If name is not passed then external id will be used. |
| flow\_id | `int` | This is the proctor session onboarding flow identifier. | if not passed then detail flow will be mapped based on project DSN |
| flow\_uuid | `string` | Proctoring configuration identifier for the provided `dsn`. If the workflow step is already created with a flow, this will not override it. | |
| duration | `int` | duration of the exam in min | |
| resource | `[{string,string}]` | Array of key value pair to persist additional info related to exam. | |
| course | `[Course]` | | |
| id | `int` | Talview unique id generated for the course | |

### Course

| Attribute | Type | Description | Default |
| - | - | - | - |
| id | `int` | Talview unique id generated for the course | |
| name | `string` | Name of the Course the exam is part of. | Exam workflow name |
| identifier | `string` | Unique identifier for the course from the calling application. If not set then exam identifier will be used. | Exam workflow external id |
| resource | `[{string,string}]` | Array of key value pair to persist additional info related to course. | |

### Locale

| Attribute | Type | Description | Default |
| - | - | - | - |
| language | `string` | | based on browser info |
| ~~currency~~ | `string` | ISO 4217 currency codes | based on browser info |
| ~~timezone~~ | `string` | Timezone | based on browser info |


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