# useAppSettings
A hook for fetching AppSetting values

## Basic usage
```javascript
import { useAppSettings } from '@k-int/stripes-kint-components';
...
const data = useAppSettings({ 
  endpoint: 'oa/settings/appSettings'
});
...
```

This will return a list of AppSettings. If a `keyName` is passed, this will instead return a single AppSetting object.

## Props
| Name              | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                    | default                                                                                                           | required |
|-------------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|----------|
| endpoint          | string | The endpoint to fetch AppSettings from                                                                                                                                                                                                                                                                                                                                                                         |                                                                                                                   | ✓        |
| sectionName       | string | A string representing a section of AppSettings to filter on                                                                                                                                                                                                                                                                                                                                                    |                                                                                                                   | ✕        |
| keyName           | string | A string representing an individual key of an AppSettings to filter on. The presence of this prop will change the output shape from Array to Object. It is not strictly necessary to use `keyName` in conjunction with `sectionName`, but keys are not guaranteed to be unique between sections. In addition it may marginally improve performance to use both, even if a key is unique, so it is recommended. |                                                                                                                   | ✕        |
| queryParams       | object | A set of queryParameters to hand to react-query's `useQuery`                                                                                                                                                                                                                                                                                                                                                   |                                                                                                                   | ✕        |
| returnQueryObject | bool   | A switch to return the entirety of the queryObject from useQuery. If `false`, the data will be destructured, if `true` the return will be the full object returned by react-query's `useQuery`                                                                                                                                                                                                                 | false                                                                                                             | ✕        |
| options           | object | An object of the shape SASQ_MAP (See generateKiwtQuery) to pass to the generateKiwtQuery inside. The default                                                                                                                                                                                                                                                                                                   | `{perPage: 100, stats: false, filters: [{path: 'section', value: sectionName }, {path: 'key', value: keyName }]}` | ✕        |
