* Set up nux API

* Bump SDK

* Naming

* Imports
This commit is contained in:
Eric Bailey 2024-09-11 19:56:00 -05:00 committed by GitHub
parent cff7cbb4aa
commit ae71f5ce84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 193 additions and 18 deletions

View file

@ -0,0 +1,29 @@
import zod from 'zod'
import {BaseNux} from '#/state/queries/nuxs/types'
export enum Nux {
One = 'one',
Two = 'two',
}
export const nuxNames = new Set(Object.values(Nux))
export type AppNux =
| BaseNux<{
id: Nux.One
data: {
likes: number
}
}>
| BaseNux<{
id: Nux.Two
data: undefined
}>
export const NuxSchemas = {
[Nux.One]: zod.object({
likes: zod.number(),
}),
[Nux.Two]: undefined,
}