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

# Types

> Types functionality for Components integration.

[View module source on GitHub](https://github.com/maximhq/maxim-py/blob/main/maxim/logger/components/types.py)

## [Entity](/sdk/python/references/logger/components/types)

```python theme={null}
class Entity(Enum)
```

[Entity](/sdk/python/references/logger/components/types).

This class represents an entity.

## [DateTimeEncoder](/sdk/python/references/logger/components/types)

```python theme={null}
class DateTimeEncoder(json.JSONEncoder)
```

DateTime encoder.

This class represents a date time encoder.

## [CommitLog](/sdk/python/references/logger/components/types)

```python theme={null}
class CommitLog()
```

Commit log.

This class represents a commit log.

#### \_\_init\_\_

```python theme={null}
def __init__(entity: Entity,
             entity_id: str,
             action: str,
             data: Optional[Dict[str, Any]] = None)
```

Initialize a commit log.

**Arguments**:

| Name        | Description                   |
| ----------- | ----------------------------- |
| `entity`    | The entity of the commit log. |
| `entity_id` | The id of the entity.         |
| `action`    | The action of the commit log. |
| `data`      | The data of the commit log.   |

#### serialize

```python theme={null}
def serialize(custom_data: Optional[Dict[str, Any]] = None) -> str
```

Serialize the commit log.

**Arguments**:

| Name          | Description                   |
| ------------- | ----------------------------- |
| `custom_data` | The custom data to serialize. |

**Returns**:

| Name  | Description                |
| ----- | -------------------------- |
| `str` | The serialized commit log. |

#### object\_to\_dict

```python theme={null}
def object_to_dict(obj: Any) -> Union[Dict, List, str, int, float, bool, None]
```

Convert a complex object structure to a dictionary, handling nested custom objects.

**Arguments**:

| Name  | Description                  |
| ----- | ---------------------------- |
| `obj` | Any Python object to convert |

**Returns**:

A dictionary representation of the object

## [GenerationErrorTypedDict](/sdk/python/references/logger/components/types)

```python theme={null}
class GenerationErrorTypedDict(TypedDict)
```

[Generation](/sdk/python/references/logger/components/generation) error typed dict.

This class represents a generation error typed dict.

## [GenerationError](/sdk/python/references/logger/components/types)

```python theme={null}
@deprecated(
    "This class is deprecated and will be removed in a future version. Use GenerationErrorTypedDict instead."
)

@dataclass
class GenerationError()
```

@deprecated: This class is deprecated and will be removed in a future version. Use [GenerationErrorTypedDict](/sdk/python/references/logger/components/types) instead.
