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

@jules_davis/vite-client

v1.1.0

Published

**Vite Client SDK** — SDK JavaScript/TypeScript pour interagir avec l'API Vite (paiements, produits, abonnements, clients, etc.)

Readme

@jules_davis/vite-client

Vite Client SDK — SDK JavaScript/TypeScript pour interagir avec l'API Vite (paiements, produits, abonnements, clients, etc.)

📦 Installation

npm install @jules_davis/vite-client

import { Vite } from "@jules_davis/vite-client"

const client = new Vite({
  publicKey: "pk_Kpxzd9S9rY43qkBGo67rCgUMd9FmMqDHZroQl3vJcjU",
  applicationId: "cdbdea31-ae89-482c-8854-931e63aba7dd"
})

**💳 Paiements**
Récupérer les méthodes de paiement disponibles

const payment_methods = await client.payment.methods.get<any>()
console.log(payment_methods)


Récupérer les méthodes de paiement disponibles

const { data } = await client.payment.intent.create<any>({
  amount: 10.00,
  method_payment: 'airtel-money',
  currency: 'XAF',
  metadata: {
    firstname: "Jules Davis",
    lastname: "Mihindou Nzamba",
    address: "Rue 1639 damas II",
    email: "[email protected]",
    phone: "+24177640625",
    city: "Libreville",
    province: "Estuiaire",
    country: "Gabon"
  }
})
console.log(data.intent)


✅ Valider un paiement
const payment = await client.payment.intent.commit<any>({ 
  paymentRef: 'ref_386686b6-1447-4fd8-a5ce-d628cd0d0944' 
})
console.log(payment)

**📌 Suivi, annulation et remboursement**
// Statut du paiement
const status = await client.payment.intent.status<any>({ 
  paymentRef: 'ref_386686b6-1447-4fd8-a5ce-d628cd0d0944' 
})
console.log(status)

// Annuler le paiement
const cancel = await client.payment.intent.cancel<any>({ 
  paymentRef: 'ref_386686b6-1447-4fd8-a5ce-d628cd0d0944' 
})

// Rembourser le paiement
const refund = await client.payment.intent.refund({ 
  paymentRef: 'ref_386686b6-1447-4fd8-a5ce-d628cd0d0944' 
})
console.log(refund)


**🛍️ Produits**
const products_methods_available = await client.products.get<any>()
console.log(products_methods_available)


**🧪 Invocations distantes (Remote Functions)**
const result_invocation = await client.invocations.invoke<any>({ name: 'hello' })
console.log(result_invocation)


**👤 Gestion des clients**
➕ Créer un client
const { data } = await client.customers.create({
  email: "[email protected]",
  phone: "+24162630655",
  kind: "M",
  country: "Gabon",
  province: "Estuaire",
  city: "Libreville",
  address: "Rue Mihindou Nzamba Jules Davis"
})
console.log(data)


📋 Lister tous les clients
const { data } = await client.customers.get({})
console.log(data)

🔍 Détail d’un client
const { data } = await client.customers.detail("4fa1b545-4238-43b8-9a42-bce19a6595e5")
console.log(data)


📝 Mettre à jour un client
const { data } = await client.customers.update({
  id: "4fa1b545-4238-43b8-9a42-bce19a6595e5",
  firstname: "Jules Davis",
  lastname: "Mihindou Nzamba"
})
console.log(data)


❌ Supprimer un client
const { data } = await client.customers.delete({
  customerId: "4fa1b545-4238-43b8-9a42-bce19a6595e5"
})
console.log(data)



** 🔁 Abonnements **
💡 Créer une intention d’abonnement
Modifier
const { data } = await client.subscriptions.intent({
  productId: "dc447ba7-d8e7-4995-991b-8d1a9ac6829b",
  customerId: "4fa1b545-4238-43b8-9a42-bce19a6595e5"
})
console.log(data)



✅ Souscrire à un abonnement
const { data } = await client.subscriptions.subscribe({
  subscriptionId: "c3a449c8-ab22-46eb-8d23-3287ea53f535"
})
console.log(data)


🔄 Désinscription et annulation
// Désinscription
const { data } = await client.subscriptions.unsubscribe({
  subscriptionId: "c3a449c8-ab22-46eb-8d23-3287ea53f535"
})
console.log(data)

// Annulation
const { data } = await client.subscriptions.cancel({
  subscriptionId: "c00ba3c9-ef21-4103-b96c-0743139ce5aa"
})
console.log(data)


📖 Détail d’un abonnement
const { data } = await client.subscriptions.detail({
  subscriptionId: "c00ba3c9-ef21-4103-b96c-0743139ce5aa"
})
console.log(data)


📋 Lister les abonnements d’un client
const { data } = await client.subscriptions.get({
  customerId: "4fa1b545-4238-43b8-9a42-bce19a6595e5"
})
console.log(data)

---

### ✅ Conseils supplémentaires
- Si le SDK est open source, ajoute un badge `npm` et `license`.
- Pense à documenter les schémas (`type`) attendus ou renvoyés par les appels (si tu as un fichier `types.d.ts`, réfère-le ici).
- Tu pourrais découper ce README en plusieurs sections markdown si tu génères une doc sur un site type Docusaurus, VuePress ou autre.

Souhaites-tu que je t’aide à publier ce package avec `npm`, `tsup`, `rollup` ou `vite` côté build ?