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

@longvansoftware/storefront-js-client

v3.8.6

Published

[![npm version](https://badge.fury.io/js/%40longvansoftware%2Fstorefront-js-client.svg)](https://badge.fury.io/js/%40longvansoftware%2Fstorefront-js-client) [![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typesc

Downloads

1,297

Readme

Longvan Storefront JavaScript Client SDK

npm version TypeScript License: ISC

A comprehensive TypeScript/JavaScript SDK for integrating with the Longvan e-commerce platform. This SDK provides easy-to-use interfaces for managing products, orders, users, payments, and other e-commerce functionalities.

🚀 Quick Start

npm install @longvansoftware/storefront-js-client
import { SDK } from '@longvansoftware/storefront-js-client';

const sdk = new SDK('your-org-id', 'your-store-id', 'dev');
sdk.setToken('your-access-token');

// Ready to use!
const products = await sdk.product.getSimpleProducts({ currentPage: 1, maxResult: 10 });

📚 Documentation

🎯 Getting Started

🔧 Core Services

🛠️ Extended Services

📖 Advanced Topics

💡 Examples & Patterns

🔍 API Reference

🏗️ Architecture Overview

Longvan SDK
├── 🔐 Authentication Layer
├── 🛍️ Core E-commerce Services
│   ├── Product Management
│   ├── Order Processing
│   ├── User Management
│   └── Payment Processing
├── 🔧 Extended Services
│   ├── Warehouse & Inventory
│   ├── CRM & Customer Support
│   ├── Marketing & Campaigns
│   └── Media & File Management
└── 🚀 Infrastructure
    ├── GraphQL Client
    ├── REST API Client
    ├── Error Handling
    └── TypeScript Support

✨ Key Features

  • 🎯 Type-Safe: Full TypeScript support with comprehensive type definitions
  • 🔌 Multi-Protocol: Supports both GraphQL and REST APIs
  • 🔐 Secure: Built-in authentication and token management
  • ⚡ Performance: Optimized for speed with caching and batching
  • 🛠️ Developer-Friendly: Intuitive API design with excellent IntelliSense
  • 📱 Cross-Platform: Works in Node.js, browsers, and React Native
  • 🧪 Well-Tested: Comprehensive test suite with high coverage
  • 📖 Well-Documented: Extensive documentation with real-world examples

🚀 Installation

Using npm

npm install @longvansoftware/storefront-js-client

Using yarn

yarn add @longvansoftware/storefront-js-client

Using pnpm

pnpm add @longvansoftware/storefront-js-client

⚡ Quick Example

import { SDK } from '@longvansoftware/storefront-js-client';

// Initialize SDK
const sdk = new SDK('your-org-id', 'your-store-id', 'dev');

// Authenticate user
const loginResponse = await sdk.auth.login({
  username: '[email protected]',
  password: 'password123'
});
sdk.setToken(loginResponse.accessToken);

// Browse products
const products = await sdk.product.getSimpleProducts({
  keyword: 'laptop',
  currentPage: 1,
  maxResult: 20
});

// Create order
const order = await sdk.order.createOrder({
  customer_id: loginResponse.partyId,
  line_items: [{
    product_id: products[0].id,
    quantity: 1,
    input_price: products[0].price
  }]
}, 'web', false, loginResponse.partyId);

console.log('Order created:', order.id);

// Manage stores
const newStore = await sdk.store.createStore('FOX', 'My New Store');
const channels = await sdk.store.getStoreChannelByEmpId('emp-123');

📦 TypeScript Support

Import types for full TypeScript support:

// Import specific types
import type {
  Product,
  ProductFilterOptions,
} from '@longvansoftware/storefront-js-client/dist/src/types/product';

import type {
  StoreDTO,
  CreateStoreRequest,
  StoreConfiguration,
} from '@longvansoftware/storefront-js-client/dist/src/types/store';

import type {
  LoginRequest,
  LoginResponse,
} from '@longvansoftware/storefront-js-client/dist/src/types/auth';

// Use with full type safety
const products: Product[] = await sdk.product.getSimpleProducts({
  keyword: 'laptop',
  currentPage: 1,
  maxResult: 10
});

const stores: StoreDTO[] = await sdk.store.getStoreChannelByEmpId('emp-123');

🌟 What's New in v2.9.0

  • ✨ Enhanced TypeScript support with stricter types
  • 🚀 Improved error handling and debugging capabilities
  • 🔧 New utility services for better platform integration
  • ⚡ Performance optimizations and caching improvements
  • 🔒 Updated dependencies and security enhancements
  • 📖 Comprehensive documentation with real-world examples

🤝 Community & Support

🚀 Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • 🔧 Setting up the development environment
  • 📝 Code style and conventions
  • 🧪 Running tests and quality checks
  • 📤 Submitting pull requests

📄 License

This project is licensed under the ISC License - see the LICENSE file for details.


Ready to get started?

Need help? Open an issue on GitLab or check our documentation.