# @piveau/sdk-vue

> Asynchronous state management for interacting with piveau services in Vue.js.

Latest version **1.0.0-beta.1** (published 2025-01-28) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @piveau/sdk-vue
pnpm add @piveau/sdk-vue
yarn add @piveau/sdk-vue
bun add @piveau/sdk-vue
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.0.0-beta.1 |
| Published | 2025-01-28 |
| First published | 2024-05-10 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 1005.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Duy Minh Vo |
| Maintainers | duyminhvo, fabiankirstein |

## Links

- npm: https://www.npmjs.com/package/@piveau/sdk-vue
- npm.io page: https://npm.io/package/@piveau/sdk-vue

## Dependencies (8)

- [vue](https://npm.io/package/vue.md) ^3.5.13
- [zod](https://npm.io/package/zod.md) ^3.24.1
- [vue-demi](https://npm.io/package/vue-demi.md) ^0.14.7
- [@vueuse/core](https://npm.io/package/@vueuse/core.md) ^11.3.0
- [@vueuse/router](https://npm.io/package/@vueuse/router.md) ^10.9.0
- [merge-anything](https://npm.io/package/merge-anything.md) ^6.0.2
- [@piveau/sdk-core](https://npm.io/package/@piveau/sdk-core.md) ^0.0.0-beta.0
- [@tanstack/vue-query](https://npm.io/package/@tanstack/vue-query.md) ^5.24.1

## Recent versions

- 1.0.0-beta.1 (latest) — 2025-01-28
- 1.0.0-beta.22 (beta) — 2026-09-22
- 0.0.0-alpha-2.3 (alpha-2) — 2025-01-07
- 0.0.0-alpha-2.2 (alpha-3) — 2024-12-20
- 0.0.0-alpha.10 (alpha) — 2024-10-17
- 1.0.0-beta.21 — 2026-08-04
- 1.0.0-beta.20 — 2026-07-22
- 1.0.0-beta.19 — 2026-03-27
- 1.0.0-beta.18 — 2026-03-27
- 1.0.0-beta.17 — 2026-03-27
- 1.0.0-beta.16 — 2026-03-27
- 1.0.0-beta.15 — 2026-03-25
- 1.0.0-beta.13 — 2025-11-17
- 1.0.0-beta.12 — 2025-11-07
- 1.0.0-beta.10 — 2025-09-10
- … 20 more at https://npm.io/package/@piveau/sdk-vue/versions

## README

# @piveau/sdk-vue

Asynchronous state management for interacting with piveau services in Vue.js.

Looking for a standalone API client? Try @piveau/sdk-core

## Quick Features

- Provides intelligent client-side caching, background updates, and optimistic updates of piveau backend data state in a declarative way, powered by [@tanstack/vue-query](https://github.com/TanStack/query)
- Composable utility functions to help you model real-world use cases easier, e.g., facets, search, and pagination
- Runtime resource schema validation and model type inference powered by [Zod](https://zod.dev/)
- Shape data from API to your data model using getters
- Vue 3 compatible
- Supports Server-Side Rendering with Nuxt
- Written with TypeScript

## Usage

<table>
<tbody valign=top align=left>
<tr><th>
Node 20+, Vue 3
</th><td>

Install with <code>npm/pnpm install @piveau/sdk-vue</code>, or <code>yarn add @piveau/sdk-vue</code>. For better devtooling, we recommend installing @piveau/sdk-core and vue-query with <code>npm/pnpm install @piveau/sdk-core @tanstack/vue-query@5</code>.

**Recommended**: In `main.ts`, setup the plugin:
```js
import { plugin } from '@piveau/sdk-vue'
import { QueryClient, VueQueryPlugin } from '@tanstack/vue-query'
import { createApp } from 'vue'
import App from './App.vue'

const qc = new QueryClient()

const app = createApp(App)

app.use(VueQueryPlugin, {
  queryClient: qc,
})

app.use(plugin, {
  queryClient: qc,
})
```

</td></tr>
<tr><th>
Node 20+, Nuxt 3
</th><td>
*Work in Progress* See https://tanstack.com/query/latest/docs/framework/vue/guides/ssr and register the sdk-vue plugin as above
</td></tr>
</tbody>
</table>

## piveau API Support

- `/search/filter={filter}` for searching resources
- `/search/{index}/{id}` for fetching a single resource

## Work in Progress

- hub
- consus
- metrics
- statistics

---
_Source: https://npm.io/package/@piveau/sdk-vue · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
