0.0.0-alpha.0 • Published 17 days ago
@piveau/sdk-vue v0.0.0-alpha.0
@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
- 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
- Shape data from API to your data model using getters
- Vue 3 compatible
- Supports Server-Side Rendering with Nuxt
- Written with TypeScript
Usage
Install with npm/pnpm install @piveau/sdk-vue, or yarn add @piveau/sdk-vue. For better devtooling, we recommend installing @piveau/sdk-core and vue-query with npm/pnpm install @piveau/sdk-core @tanstack/vue-query@5.
Recommended: In main.ts
, setup the plugin:
import { createApp } from 'vue'
import { plugin } from '@piveau/sdk-vue'
import { QueryClient, VueQueryPlugin } from '@tanstack/vue-query'
import App from './App.vue'
const qc = new QueryClient()
const app = createApp(App)
app.use(VueQueryPlugin, {
queryClient: qc,
})
app.use(plugin, {
queryClient: qc,
})
piveau API Support
/search/filter={filter}
for searching resources/search/{index}/{id}
for fetching a single resource
Work in Progress
- hub
- consus
- metrics
- statistics
0.0.0-alpha.1
17 days ago
0.0.0-alpha.0
17 days ago