npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

vovk-examples

v3.0.17

Published

Vovk examples

Downloads

372

Readme

vovk-examples v3.0.17 TypeScript Vovk.ts

Vovk examples

License: MIT

# Install the package
npm install vovk-examples

UserZodRPC

UserZodRPC.updateUser

Update user (Zod)

Update user by ID with Zod validation

POST https://examples.vovk.dev/api/users-zod/{id}

import { UserZodRPC } from 'vovk-examples';

const response = await UserZodRPC.updateUser({
  body: {
    // -----
    // User object
    // -----
    // User full name
    name: 'string',
    // User age
    age: 0,
    // User email
    email: '[email protected]',
  },
  query: {
    // Notification type
    notify: 'email',
  },
  params: {
    // User ID
    id: '00000000-0000-0000-0000-000000000000',
  },
});

console.log(response);
/* 
{
    // -----
    // Response object
    // -----
    // Success status
    success: true
}
*/

UserZodWithServiceRPC

UserZodWithServiceRPC.updateUser

Update user (Zod with service)

Update user by ID with Zod validation

POST https://examples.vovk.dev/api/users-zod-with-service/{id}

import { UserZodWithServiceRPC } from 'vovk-examples';

const response = await UserZodWithServiceRPC.updateUser({
  body: {
    // -----
    // User object
    // -----
    // User full name
    name: 'string',
    // User age
    age: 0,
    // User email
    email: '[email protected]',
  },
  query: {
    // Notification type
    notify: 'email',
  },
  params: {
    // User ID
    id: '00000000-0000-0000-0000-000000000000',
  },
});

console.log(response);
/* 
{
    // -----
    // Response object
    // -----
    // Success status
    success: true,
    // User ID
    id: "00000000-0000-0000-0000-000000000000"
}
*/

UserYupRPC

UserYupRPC.updateUser

Update user (Yup)

Update user by ID with Yup validation

POST https://examples.vovk.dev/api/users-yup/{id}

import { UserYupRPC } from 'vovk-examples';

const response = await UserYupRPC.updateUser({
  body: {
    // -----
    // User object
    // -----
    // User full name
    name: 'string',
    // User age
    age: 0,
    // User email
    email: '[email protected]',
  },
  query: {
    // Notification type
    notify: 'email',
  },
  params: {
    // User ID
    id: 'string',
  },
});

console.log(response);
/* 
{
    // -----
    // Response object
    // -----
    // Success status
    success: true
}
*/

UserDtoRPC

UserDtoRPC.updateUser

Update user (DTO)

Update user by ID with DTO validation

POST https://examples.vovk.dev/api/users-dto/{id}

import { UserDtoRPC } from 'vovk-examples';

const response = await UserDtoRPC.updateUser({
  body: {
    // -----
    // User object
    // -----
    // User full name
    name: 'string',
    // User age
    age: 0,
    // User email
    email: '[email protected]',
  },
  query: {
    // -----
    // Query parameters
    // -----
    // Notification type
    notify: 'email',
  },
  params: {
    // -----
    // Path parameters
    // -----
    // User ID
    id: '00000000-0000-0000-0000-000000000000',
  },
});

console.log(response);
/* 
{
    // -----
    // Response object
    // -----
    // Success status
    success: true
}
*/

UserArktypeRPC

UserArktypeRPC.updateUser

Update user (Arktype)

Update user by ID with Arktype validation

POST https://examples.vovk.dev/api/users-arktype/{id}

import { UserArktypeRPC } from 'vovk-examples';

const response = await UserArktypeRPC.updateUser({
  body: {
    // User age
    age: 0,
    // User email
    email: '[email protected]',
    // User full name
    name: 'string',
  },
  query: {
    // Notification type
    notify: 'email',
  },
  params: {
    // User ID
    id: '00000000-0000-0000-0000-000000000000',
  },
});

console.log(response);
/* 
{
    // Success status
    success: true
}
*/

UserValibotRPC

UserValibotRPC.updateUser

Update user (Valibot)

Update user by ID with Valibot validation

POST https://examples.vovk.dev/api/users-valibot/{id}

import { UserValibotRPC } from 'vovk-examples';

const response = await UserValibotRPC.updateUser({
  body: {
    // -----
    // User object
    // -----
    // User full name
    name: 'string',
    // User age
    age: 0,
    // User email
    email: '[email protected]',
  },
  query: {
    // Notification type
    notify: 'email',
  },
  params: {
    // User ID
    id: '00000000-0000-0000-0000-000000000000',
  },
});

console.log(response);
/* 
{
    // -----
    // Response object
    // -----
    // Success status
    success: true
}
*/

BasicRPC

BasicRPC.getHello

Get a greeting

Get a greeting from the server

GET https://examples.vovk.dev/api/basic/greeting

import { BasicRPC } from 'vovk-examples';

const response = await BasicRPC.getHello();

BasicRPC.postHello

Post a greeting

Post a greeting to the server

POST https://examples.vovk.dev/api/basic/greeting

import { BasicRPC } from 'vovk-examples';

const response = await BasicRPC.postHello();

BasicRPCWithService

BasicRPCWithService.getHello

Get a greeting using a service

Get a greeting from the server using a service

GET https://examples.vovk.dev/api/basic-with-service/greeting

import { BasicRPCWithService } from 'vovk-examples';

const response = await BasicRPCWithService.getHello();

JSONLinesRPC

JSONLinesRPC.streamTokens

Stream tokens

Stream tokens to the client

GET https://examples.vovk.dev/api/jsonlines/tokens

import { JSONLinesRPC } from 'vovk-examples';

const response = await JSONLinesRPC.streamTokens();

JSONLinesResponseRPC

JSONLinesResponseRPC.streamTokens

Stream tokens using Response object

Stream tokens to the client using Response object

GET https://examples.vovk.dev/api/jsonlines-response-object/tokens

import { JSONLinesResponseRPC } from 'vovk-examples';

const response = await JSONLinesResponseRPC.streamTokens();

OpenAiRPC

OpenAiRPC.createChatCompletion

Create a chat completion

Create a chat completion using OpenAI and yield the response

POST https://examples.vovk.dev/api/openai/chat

import { OpenAiRPC } from 'vovk-examples';

const response = await OpenAiRPC.createChatCompletion();

AiSdkRPC

AiSdkRPC.chat

Vercel AI SDK

Uses @ai-sdk/openai and ai packages to chat with an AI model

POST https://examples.vovk.dev/api/ai-sdk/chat

import { AiSdkRPC } from 'vovk-examples';

const response = await AiSdkRPC.chat();

ProxyRPC

ProxyRPC.getHello

Proxy endpoint

Get a greeting from vovk.dev

GET https://examples.vovk.dev/api/proxy/greeting

import { ProxyRPC } from 'vovk-examples';

const response = await ProxyRPC.getHello();

PollRPC

PollRPC.streamPollResponse

GET https://examples.vovk.dev/api/polling

import { PollRPC } from 'vovk-examples';

using response = await PollRPC.streamPollResponse({
  query: {
    i: 'string',
  },
});

for await (const item of response) {
  console.log(item);
  /*
    {
        i: 0
    }
    */
}

ProgressiveRPC

ProgressiveRPC.streamProgressiveResponse

GET https://examples.vovk.dev/api/progressive

import { ProgressiveRPC } from 'vovk-examples';

using response = await ProgressiveRPC.streamProgressiveResponse();

for await (const item of response) {
  console.log(item);
  /*
    {
        users: [
            {
                id: 0,
                name: "string"
            }
        ]
    }
    */
}

FormZodRPC

FormZodRPC.submitForm

Submit form (Zod)

Submit form with Zod validation

POST https://examples.vovk.dev/api/form-zod/{id}

import { FormZodRPC } from 'vovk-examples';

const formData = new FormData();
// User email
formData.append('email', '[email protected]');
// Resume file
formData.append('resume', new Blob([binary_data]));
// Portfolio samples
formData.append('portfolioSamples', new Blob([binary_data]));
// Portfolio samples
formData.append('portfolioSamples', new Blob([binary_data]));

const response = await FormZodRPC.submitForm({
  body: formData,
  params: {
    // User ID
    id: '00000000-0000-0000-0000-000000000000',
  },
});

console.log(response);
/* 
{
    // -----
    // Response object
    // -----
    // User email
    email: "[email protected]",
    resume: {
        // Resume file name
        name: "resume.pdf",
        // Resume file size
        size: 0,
        // Resume file type
        type: "application/pdf"
    },
    // Array of portfolio sample files
    portfolioSamples: [
        {
            // Portfolio sample file name
            name: "portfolio.zip",
            // Portfolio sample file size
            size: 0,
            // Portfolio sample file type
            type: "application/zip"
        }
    ]
}
*/

OpenApiRPC

OpenApiRPC.getSpec

OpenAPI spec

Get the OpenAPI spec for the examples API

GET https://examples.vovk.dev/api/static/openapi.json

import { OpenApiRPC } from 'vovk-examples';

const response = await OpenApiRPC.getSpec();

StaticParamsRPC

StaticParamsRPC.getStaticParams

Static Params

Get the static params: section and page

GET https://examples.vovk.dev/api/static/static-params/{section}/page{page}.json

import { StaticParamsRPC } from 'vovk-examples';

const response = await StaticParamsRPC.getStaticParams({
  params: {
    section: 'a',
    page: '1',
  },
});