*`getTaskLists` - (select) Resolve any registered task lists with their nested tasks
*`hideTaskList( id )` - (dispatch) Hide a task list
*`actionTask( id )` - (dispatch) Mark a task as actioned
*`snoozeTask( id )` - (dispatch) Snooze a task
*`dismissTask( id )` - (dispatch) Dismiss a task
*`optimisticallyCompleteTask( id )` - (dispatch) Optimistically mark a task as complete
### SlotFills
The task UI can be supplemented by registering plugins that fill the provided task slots.
#### Task content
A task list fill is required if no `action_url` is provided for the task. This is the content shown after a task list item has been clicked.
```js
import { WooOnboardingTask } from '@woocommerce/onboarding';
registerPlugin( 'my-task-plugin', {
scope: 'woocommerce-tasks',
render: () => (
<WooOnboardingTaskid="my-task">
{ ( { onComplete, query } ) => (
<MyTaskonComplete={onComplete}/>
) }
</WooOnboardingTask>
),
} );
```
#### Task list item
The items shown in the list can be customized beyond the default task list item. This can allow for custom appearance or specific `onClick` behavior for your task.
```js
import { WooOnboardingTaskListItem } from '@woocommerce/onboarding';
registerPlugin( 'my-task-list-item-plugin', {
scope: 'woocommerce-tasks',
render: () => (
<WooOnboardingTaskListItemid="appearance">
{ ( { defaultTaskItem, onComplete } ) => (
<MyTaskListItemonComplete={onComplete}/>
) }
</WooOnboardingTaskListItem>
),
} );
```
### Endpoints
The following REST endpoints are available to interact with tasks. For ease of use, we recommend using the data store actions above to interact with these endpoints.
*`/wc-admin/onboarding/tasks` (GET) - Retrieve all tasks and their statuses
*`/wc-admin/onboarding/tasks/{list_id}/hide` (POST) - Hide a given task list
*`/wc-admin/onboarding/tasks/{task_id}/dismiss` (POST) - Dismiss a task
*`/wc-admin/onboarding/tasks/{task_id}/undo_dismiss` (POST) - Undo dismissal of a task
*`/wc-admin/onboarding/tasks/{task_id}/snooze` (POST) - Snooze a task for later
*`/wc-admin/onboarding/tasks/{task_id}/undo_snooze` (POST) - Undo snoozing of a task
*`/wc-admin/onboarding/tasks/{task_id}/action` (POST) - Mark a task as actioned