Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineConfig } from 'vitepress'
import typedocSidebar from '../api/typedoc-sidebar.json'

// https://vitepress.dev/reference/site-config
export default defineConfig({
Expand All @@ -24,14 +25,7 @@ export default defineConfig({
},

sidebar: {
'/api/': [
{
text: 'API Reference',
items: [
{ text: 'Overview', link: '/api/index' },
]
}
],
'/api/': typedocSidebar,
'/': [
{
text: 'Getting Started',
Expand Down
15 changes: 15 additions & 0 deletions docs/api/functions/createQueryClient.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Functions: createQueryClient()

```ts
function createQueryClient(options?): QueryClient;
```

## Parameters

| Parameter | Type |
| ------ | ------ |
| `options?` | [`ClientOptions`](../types/ClientOptions.md) |

## Returns

[`QueryClient`](../types/QueryClient.md)
5 changes: 5 additions & 0 deletions docs/api/functions/query.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Functions: query

```ts
const query: QueryFunction;
```
40 changes: 40 additions & 0 deletions docs/api/functions/tag.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Functions: tag()

## Call Signature

```ts
function tag<TData>(): QueryTag<TData>;
```

### Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TData` | *typeof* `unset` |

### Returns

[`QueryTag`](../types/QueryTag.md)\<`TData`\>

## Call Signature

```ts
function tag<TData, TInput>(callback): QueryTagFactory<TData, TInput>;
```

### Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TData` | *typeof* `unset` |
| `TInput` | `unknown` |

### Parameters

| Parameter | Type |
| ------ | ------ |
| `callback` | [`QueryTagCallback`](../types/QueryTagCallback.md)\<`TInput`\> |

### Returns

[`QueryTagFactory`](../types/QueryTagFactory.md)\<`TData`, `TInput`\>
5 changes: 5 additions & 0 deletions docs/api/functions/useQuery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Functions: useQuery

```ts
const useQuery: QueryComposition;
```
59 changes: 58 additions & 1 deletion docs/api/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,58 @@
# API
# @kitbag/query

## Functions

- [createQueryClient](functions/createQueryClient.md)
- [tag](functions/tag.md)

## Types

- [AwaitedMutation](types/AwaitedMutation.md)
- [AwaitedQuery](types/AwaitedQuery.md)
- [ClientOptions](types/ClientOptions.md)
- [DefinedMutation](types/DefinedMutation.md)
- [DefinedMutationComposition](types/DefinedMutationComposition.md)
- [DefinedMutationFunction](types/DefinedMutationFunction.md)
- [DefinedQuery](types/DefinedQuery.md)
- [DefinedQueryComposition](types/DefinedQueryComposition.md)
- [DefinedQueryFunction](types/DefinedQueryFunction.md)
- [DefineMutation](types/DefineMutation.md)
- [DefineQuery](types/DefineQuery.md)
- [Mutation](types/Mutation.md)
- [MutationAction](types/MutationAction.md)
- [MutationComposition](types/MutationComposition.md)
- [MutationData](types/MutationData.md)
- [MutationFunction](types/MutationFunction.md)
- [MutationOptions](types/MutationOptions.md)
- [MutationTags](types/MutationTags.md)
- [MutationTagsAfterContext](types/MutationTagsAfterContext.md)
- [MutationTagsBeforeContext](types/MutationTagsBeforeContext.md)
- [MutationTagsContext](types/MutationTagsContext.md)
- [MutationTagsType](types/MutationTagsType.md)
- [OnErrorContext](types/OnErrorContext.md)
- [OnExecuteContext](types/OnExecuteContext.md)
- [OnSuccessContext](types/OnSuccessContext.md)
- [Query](types/Query.md)
- [QueryAction](types/QueryAction.md)
- [QueryActionArgs](types/QueryActionArgs.md)
- [QueryClient](types/QueryClient.md)
- [QueryComposition](types/QueryComposition.md)
- [QueryData](types/QueryData.md)
- [QueryDataSetter](types/QueryDataSetter.md)
- [QueryFunction](types/QueryFunction.md)
- [QueryOptions](types/QueryOptions.md)
- [QueryTag](types/QueryTag.md)
- [QueryTagCallback](types/QueryTagCallback.md)
- [QueryTagFactory](types/QueryTagFactory.md)
- [QueryTags](types/QueryTags.md)
- [QueryTagType](types/QueryTagType.md)
- [RefreshQueryData](types/RefreshQueryData.md)
- [SetQueryData](types/SetQueryData.md)
- [SetQueryDataAfterContext](types/SetQueryDataAfterContext.md)
- [SetQueryDataBeforeContext](types/SetQueryDataBeforeContext.md)
- [UseQueryOptions](types/UseQueryOptions.md)

## Variables

- [query](functions/query.md)
- [useQuery](functions/useQuery.md)
212 changes: 212 additions & 0 deletions docs/api/typedoc-sidebar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
[
{
"text": "Functions",
"collapsed": true,
"items": [
{
"text": "createQueryClient",
"link": "/api/functions/createQueryClient.md"
},
{
"text": "tag",
"link": "/api/functions/tag.md"
}
]
},
{
"text": "Types",
"collapsed": true,
"items": [
{
"text": "AwaitedMutation",
"link": "/api/types/AwaitedMutation.md"
},
{
"text": "AwaitedQuery",
"link": "/api/types/AwaitedQuery.md"
},
{
"text": "ClientOptions",
"link": "/api/types/ClientOptions.md"
},
{
"text": "DefinedMutation",
"link": "/api/types/DefinedMutation.md"
},
{
"text": "DefinedMutationComposition",
"link": "/api/types/DefinedMutationComposition.md"
},
{
"text": "DefinedMutationFunction",
"link": "/api/types/DefinedMutationFunction.md"
},
{
"text": "DefinedQuery",
"link": "/api/types/DefinedQuery.md"
},
{
"text": "DefinedQueryComposition",
"link": "/api/types/DefinedQueryComposition.md"
},
{
"text": "DefinedQueryFunction",
"link": "/api/types/DefinedQueryFunction.md"
},
{
"text": "DefineMutation",
"link": "/api/types/DefineMutation.md"
},
{
"text": "DefineQuery",
"link": "/api/types/DefineQuery.md"
},
{
"text": "Mutation",
"link": "/api/types/Mutation.md"
},
{
"text": "MutationAction",
"link": "/api/types/MutationAction.md"
},
{
"text": "MutationComposition",
"link": "/api/types/MutationComposition.md"
},
{
"text": "MutationData",
"link": "/api/types/MutationData.md"
},
{
"text": "MutationFunction",
"link": "/api/types/MutationFunction.md"
},
{
"text": "MutationOptions",
"link": "/api/types/MutationOptions.md"
},
{
"text": "MutationTags",
"link": "/api/types/MutationTags.md"
},
{
"text": "MutationTagsAfterContext",
"link": "/api/types/MutationTagsAfterContext.md"
},
{
"text": "MutationTagsBeforeContext",
"link": "/api/types/MutationTagsBeforeContext.md"
},
{
"text": "MutationTagsContext",
"link": "/api/types/MutationTagsContext.md"
},
{
"text": "MutationTagsType",
"link": "/api/types/MutationTagsType.md"
},
{
"text": "OnErrorContext",
"link": "/api/types/OnErrorContext.md"
},
{
"text": "OnExecuteContext",
"link": "/api/types/OnExecuteContext.md"
},
{
"text": "OnSuccessContext",
"link": "/api/types/OnSuccessContext.md"
},
{
"text": "Query",
"link": "/api/types/Query.md"
},
{
"text": "QueryAction",
"link": "/api/types/QueryAction.md"
},
{
"text": "QueryActionArgs",
"link": "/api/types/QueryActionArgs.md"
},
{
"text": "QueryClient",
"link": "/api/types/QueryClient.md"
},
{
"text": "QueryComposition",
"link": "/api/types/QueryComposition.md"
},
{
"text": "QueryData",
"link": "/api/types/QueryData.md"
},
{
"text": "QueryDataSetter",
"link": "/api/types/QueryDataSetter.md"
},
{
"text": "QueryFunction",
"link": "/api/types/QueryFunction.md"
},
{
"text": "QueryOptions",
"link": "/api/types/QueryOptions.md"
},
{
"text": "QueryTag",
"link": "/api/types/QueryTag.md"
},
{
"text": "QueryTagCallback",
"link": "/api/types/QueryTagCallback.md"
},
{
"text": "QueryTagFactory",
"link": "/api/types/QueryTagFactory.md"
},
{
"text": "QueryTags",
"link": "/api/types/QueryTags.md"
},
{
"text": "QueryTagType",
"link": "/api/types/QueryTagType.md"
},
{
"text": "RefreshQueryData",
"link": "/api/types/RefreshQueryData.md"
},
{
"text": "SetQueryData",
"link": "/api/types/SetQueryData.md"
},
{
"text": "SetQueryDataAfterContext",
"link": "/api/types/SetQueryDataAfterContext.md"
},
{
"text": "SetQueryDataBeforeContext",
"link": "/api/types/SetQueryDataBeforeContext.md"
},
{
"text": "UseQueryOptions",
"link": "/api/types/UseQueryOptions.md"
}
]
},
{
"text": "Variables",
"collapsed": true,
"items": [
{
"text": "query",
"link": "/api/functions/query.md"
},
{
"text": "useQuery",
"link": "/api/functions/useQuery.md"
}
]
}
]
21 changes: 21 additions & 0 deletions docs/api/types/AwaitedMutation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Types: AwaitedMutation\<TAction\>

```ts
type AwaitedMutation<TAction> = object;
```

## Type Parameters

| Type Parameter |
| ------ |
| `TAction` *extends* [`MutationAction`](MutationAction.md) |

## Properties

| Property | Type |
| ------ | ------ |
| <a id="data"></a> `data` | [`MutationData`](MutationData.md)\<`TAction`\> |
| <a id="error"></a> `error` | `unknown` |
| <a id="errored"></a> `errored` | `boolean` |
| <a id="executed"></a> `executed` | `boolean` |
| <a id="executing"></a> `executing` | `boolean` |
Loading