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 🙏

© 2026 – Pkg Stats / Ryan Hefner

gvoice-cloud-helper

v1.0.1

Published

Simple TypeScript helper for GVoice Cloud Files, Images, and Videos APIs.

Readme

gvoice-cloud-helper

A clean TypeScript helper for GVoice Cloud API (Files, Images, Videos) using Axios.

This package reduces repeated API code like manual FormData, api_key params, and endpoint URLs.

Why use this package

  • One client for all endpoints
  • Clean uppercase namespace: client.API.Files, client.API.Images, client.API.Videos
  • TypeScript-first method signatures
  • Automatic api_key injection
  • Supports custom Axios instance/config

Getting Started

  1. First login into: https://cloud.gvoice.app

  2. Then get your API key.

  3. Example API Key:

gvoice_cloude_token_64656d6f_12345678

Installation

npm install gvoice-cloud-helper axios

Quick Start

import { createGvoiceCloudClient } from "gvoice-cloud-helper";

const client = createGvoiceCloudClient({
  apiKey: process.env.GVOICE_API_KEY!,
});

const files = await client.API.Files.list();
console.log(files);

Client Setup

import { createGvoiceCloudClient } from "gvoice-cloud-helper";

const client = createGvoiceCloudClient({
  apiKey: "your_api_key_here", // required
  baseURL: "https://cloud.gvoice.app/api/", // optional
  timeoutMs: 30000, // optional
  axiosConfig: {}, // optional
});

Options

  • apiKey: string (required)
  • baseURL?: string default: https://cloud.gvoice.app/api/
  • timeoutMs?: number default: 30000
  • axiosConfig?: AxiosRequestConfig
  • axiosInstance?: AxiosInstance

API Reference

Recommended (uppercase API namespace)

  • client.API.Files.upload(file, { reduceSize? })

  • client.API.Files.list()

  • client.API.Files.get(id)

  • client.API.Files.delete(fileId)

  • client.API.Images.upload(file, { reduceSize? })

  • client.API.Images.list()

  • client.API.Images.get(id)

  • client.API.Images.delete(fileId)

  • client.API.Videos.upload(file, { reduceSize? })

  • client.API.Videos.list()

  • client.API.Videos.get(id)

  • client.API.Videos.delete(fileId)

Also available (direct methods)

  • uploadFile(file, { reduceSize? })
  • uploadImage(file, { reduceSize? })
  • uploadVideo(file, { reduceSize? })
  • getMediaDetails(id)
  • getFiles()
  • getImages()
  • getVideos()
  • deleteFile(fileId)

Detailed Examples

1) Upload File

const input = document.querySelector("#file") as HTMLInputElement;
const file = input.files?.[0];

if (file) {
  const response = await client.API.Files.upload(file, { reduceSize: true });
  console.log(response);
}

2) Upload Image

const image = imageInput.files?.[0];
if (image) {
  const response = await client.API.Images.upload(image, { reduceSize: true });
  console.log(response);
}

3) Upload Video

const video = videoInput.files?.[0];
if (video) {
  const response = await client.API.Videos.upload(video, { reduceSize: false });
  console.log(response);
}

4) Get Single Media Details

const details = await client.API.Files.get("12345");
console.log(details);

get() for Files/Images/Videos all uses get-media-details.php.

5) List All Files / Images / Videos

const files = await client.API.Files.list();
const images = await client.API.Images.list();
const videos = await client.API.Videos.list();

console.log({ files, images, videos });

6) Delete File / Image / Video

// Backend uses delete-file.php endpoint for all media deletes
await client.API.Files.delete("12345");
await client.API.Images.delete("12345");
await client.API.Videos.delete("12345");

Endpoint Mapping

  • API.Files.upload -> upload-file.php
  • API.Images.upload -> upload-image.php
  • API.Videos.upload -> upload-video.php
  • API.*.get -> get-media-details.php
  • API.Files.list -> get-files.php
  • API.Images.list -> get-images.php
  • API.Videos.list -> get-videos.php
  • API.*.delete -> delete-file.php

Error Handling Example

try {
  const result = await client.API.Files.list();
  console.log(result);
} catch (error) {
  if (error instanceof Error) {
    console.error("GVoice API error:", error.message);
  } else {
    console.error("Unknown error", error);
  }
}

Security Notes

  • Never hardcode API keys in public frontend repositories.
  • Prefer environment variables or secure backend proxy for production usage.