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

pttavm

v1.0.1

Published

Bu paket pttavm için basit şekilde tedarikçi api entegrasyonu sağlar.

Readme

Paketi İndirin:

npm install pttavm

Özellikler:

  • Ürün ekleme
  • Ürün güncelleme (Fiyat ve stok dahil)
  • Listelenmiş ürünlerinin tamamını varyantlar ile beraber çekme
  • Listelenmiş ürünün bilgilerini alma
  • Ana ve alt kategori bilgilerini alma

Kullanım:

Client oluşturma:

import pttavm from 'pttavm';

const loginUsername = "***" // Login kullanıcı adınızı buraya girin
const loginPassword = "***" // Login şifrenizi buraya girin

const client = new pttavm(loginUsername, loginPassword)

Kategorileri listeleme:

const categoryList = await client.getCategoryList()
console.log(categoryList)

Listelenmiş ürünleri getirme:

Bu servis listelenmiş olan ürünleri detayları ile beraber getirir.

const listedProducts = await client.getListedProducts()
console.log(listedProducts)

Ürün detaylarını getirme:

const productDetails = await client.getProductDetails(productId)
console.log(productDetails)

Ürün ekleme:

const productData = {
    contents: {
        tr: {
            name: "Güllü Lokum", // Ürün İsmi
            subname: "", // Kısa Açıklama
            description: `<ul>
  <li>loremipsum.</li>
  <li>loremipsum.</li>
  <li>loremipsum.</li>
  <li>loremipsum.</li>
</ul>` // Ürün açıklaması - HTML formatında olmalıdır.
        }
    },
    vat_ratio: "1", // Vergi Oranı
    vat_excluded_price: "167.3267", // Vergi Hariç Fiyatı
    no_shipping: "", // Dijital ürün mü ? Evet : "1"
    cargo_from_supplier: "1", // Kargoyu satıcı mı karşılıyor ? Evet : "1"
    single_box: "1", // Ürün tek kutuda mı gönderilecek ?
    weight: 1000, // Ağırlık - Kargo için
    width: 14.41, // Genişlik - Kargo için
    height: 14.41, // Yükseklik - Kargo için
    depth: 14.41, // Uzunluk - Kargo için
    shipment_profile: "", // Kargo Profili | Default : ""
    estimated_courier_delivery: "2", // Kargoya teslim edilmesi süresi
    stock_code: "I101", // Satıcı stok kodu
    warranty_period: "", // Garanti süresi. Yoksa: ""
    warranty_company: "", // Garantiyi veren firma. Yoksa: ""
    quantity: "30", // Stok Miktarı
    barcode: "8611111111119", // Barkod
    ean_isbn_code: "",
    gtin_no: "",
    mpn: "",
    photos: [ // Ürün görselleri
        {
            order: 1, // Fotoğrafın gösterim sırasını belirtir
            url: "https://google.com/media/image.jpg"
        }
    ],
    category_properties: [ // Kategori Özellikleri
        {
            id: 6564, // Marka Property
            value: "123456+Marka İsmi" // Marka ID + Marka Adı (Sistemdeki gibi)
        }
    ],
    evo_category_id: "2423", // Ürün Kategori ID Bilgisi
    variants: [ // Varyantlar. Yok ise : ""
        {
            parameter_id: [19115668], // Varyant özellik id'si
            stock: 30, // Varyant stok miktarı
            price_diff: 150, // KDV dahil olarak, ana ürün fiyatına göre varyantın fiyat farkı
            barcode: "8611111111117" // Varyant barkodu
        },
        {
            parameter_id: [19115689],
            stock: 30,
            price_diff: 50,
            barcode: "8611111111118"
        },
        {
            parameter_id: [19373045],
            stock: 30,
            price_diff: 0,
            barcode: "8611111111119"
        }
    ],
    product_safety: {
        manufacturer_company_ids: ["685************54"], // Üretici firma bilgisine atanan id
        responsible_company_ids: [],
        files_id: []
    }
}

const addProductJob = await client.addProduct(productData)
console.log(addProductJob)

Ürün güncelleme:

Fiyat ve stok güncelleme işlemi de bu yöntemle yapılmaktadır. productData objesine getListedProducts metodu ile elde edilen ürün bilgileri içindeki 'productDetails' alanı kullanılarak erişilebilir. Veya getProductDetails metodu kullanılarak direkt erişilebilir.

const productData = {
    contents: {
        tr: {
            name: 'Portakallı Lokum',
            subname: '',
            description: `<ul>
  <li>********.</li>
  <li>******.</li>
</ul>`
        }
    },
    vat_ratio: 1,
    vat_excluded_price: 167.3267,
    no_shipping: '',
    cargo_from_supplier: 1,
    single_box: 1,
    weight: 1000,
    width: 14.41,
    height: 14.41,
    depth: 14.41,
    shipment_profile: 0,
    estimated_courier_delivery: 2,
    stock_code: 'I104',
    warranty_period: 0,
    warranty_company: '',
    quantity: 90,
    barcode: '861111111111',
    ean_isbn_code: '',
    gtin_no: '',
    mpn: '',
    photos: [
        {
            order: 1,
            url: 'https://cdn-img.pttavm.com/pimages/************98d6.webp'
        }
    ],
    category_properties: [
        {
            id: 6564,
            value: '879216+Marka'
        }
    ],
    evo_category_id: '2423',
    variants: [
        {
            combination_id: 1111111,
            parameter_id: [1111111],
            stock: 30,
            price_diff: 150,
            barcode: '86222222222'
        },
        {
            combination_id: 2222222,
            parameter_id: [2222222],
            stock: 30,
            price_diff: 50,
            barcode: '862222222222'
        },
        {
            combination_id: 33333333,
            parameter_id: [33333333],
            stock: 30,
            price_diff: 0,
            barcode: '861111111111'
        }
    ],
    product_id: '123456789'
};
const updateProductJob = await client.updateProduct(productData)
console.log(updateProductJob)