
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
pancake-client-sdk
Advanced tools
SDK TypeScript chính thức cho Pancake POS API. Thư viện này cung cấp cách đơn giản và type-safe để tương tác với nền tảng Pancake POS.
npm install pancake-client-sdk
# hoặc
yarn add pancake-client-sdk
import { PancakeClient } from 'pancake-client-sdk';
// Khởi tạo client với shop ID
const client = new PancakeClient('your-api-key', 'your-shop-id');
// Ví dụ: Lấy danh sách đơn hàng
const getOrders = async () => {
const orders = await client.orders.list({
page_size: 10,
page_number: 1
});
console.log(orders);
};
// Ví dụ: Tạo sản phẩm mới
const createProduct = async () => {
const product = await client.products.create({
name: 'Test Product',
price: 100,
description: 'A test product'
});
console.log(product);
};
SDK ném ra các lỗi có type định nghĩa sẵn:
try {
const order = await client.orders.getById('order-id');
} catch (error) {
if (error.status === 404) {
console.log('Không tìm thấy đơn hàng');
} else {
console.error('Đã xảy ra lỗi:', error);
}
}
MIT License - Xem LICENSE để biết thêm chi tiết.
FAQs
Official TypeScript SDK for Pancake POS API
We found that pancake-client-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.