# `MishkaCmsMigration.Activity`
[🔗](https://github.com/mishka-group/mishka_cms_migration/blob/v0.0.1/lib/mishka_cms_migration/activity.ex#L5)

The runs' log (`MishkaCmsMigration.MigrationLog`) as a source of the core's activity log, so a
run's steps show where the CMS shows what happened, each in the sentence the bell says
(`MishkaCmsMigration.Resources.Notifiers.Steps.sentence/2`).

  * The Migration page's Logs, next to the runs table's count, is the core's own feed
    (`MishkaCmsCoreWeb.Live.Admin.Components.ActivityFeed`) over this source alone
    (`MishkaCmsCore.Activity.Behaviours.Source`): the latest entries when it opens, read as the
    admin, and each new one as its broadcast arrives. A master reads every site's, a site admin
    their own site's.
  * The core's full activity log, which the feed's "View all logs" opens, merges the same entries
    as one more branch of its query (`MishkaCmsCore.Activity.Behaviours.UnionSource`), registered
    on `activity:sources`, filed under `MishkaCmsMigration.MigrationRun`, so whoever may read the
    runs (`admin:dashboard:migration`) sees them there.

An entry's badge says how the step went: connected, started, finished, failed or cancelled. A
failed step is an error, a cancelled one a warning, and the rest information.

# `error_return`

```elixir
@type error_return() ::
  {:error, [%{action: atom(), field: atom(), message: String.t()}]}
```

# `okey_return`

```elixir
@type okey_return() :: {:ok, struct() | map() | module() | [any()]}
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `config`

```elixir
@spec config() :: keyword()
```

# `config`

```elixir
@spec config(atom()) :: any()
```

# `enable`

```elixir
@spec enable() :: okey_return() | error_return()
```

# `entry`

```elixir
@spec entry(map()) :: MishkaCmsCore.Activity.Behaviours.Source.entry()
```

One log entry, a `MishkaCmsMigration.MigrationLog` or a map with its fields, as an entry of the
core's activity log (`t:MishkaCmsCore.Activity.Behaviours.Source.entry/0`).

# `get`

```elixir
@spec get() :: keyword()
```

# `health_check`

```elixir
@spec health_check() :: :ok | {:degraded, term()} | {:error, term()}
```

Optional. See `c:MishkaInstaller.Event.Hook.health_check/0`. Override to report health.

# `on_dependency_error`

```elixir
@spec on_dependency_error(term()) :: term()
```

Optional. See `c:MishkaInstaller.Event.Hook.on_dependency_error/1`. Override to react.

# `register`

```elixir
@spec register() :: okey_return() | error_return()
```

# `restart`

```elixir
@spec restart() :: okey_return() | error_return()
```

# `start`

```elixir
@spec start() :: okey_return() | error_return()
```

# `start_link`

# `stop`

```elixir
@spec stop() :: okey_return() | error_return()
```

# `unregister`

```elixir
@spec unregister() :: okey_return() | error_return()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
