
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-clover-sdk
Advanced tools
React Native wrapper for Clover Android SDK - Access Clover POS inventory and features from React Native
React Native wrapper for Clover Android SDK. Access Clover POS inventory and features from your React Native application.
npm install react-native-clover-sdk
# or
yarn add react-native-clover-sdk
Add Clover repository to your android/build.gradle:
allprojects {
repositories {
// ... existing repos
maven { url 'https://repo.clover.com/releases' }
}
}
The package uses auto-linking (React Native 0.60+). If you need manual linking, add to your MainApplication.java:
import com.reactnativecloversdk.CloverSDKPackage;
// In getPackages():
packages.add(new CloverSDKPackage());
import CloverSDK from 'react-native-clover-sdk';
// Get Clover account
const account = await CloverSDK.getCloverAccount();
console.log('Account:', account); // { name: "...", type: "..." }
// Connect inventory
await CloverSDK.connectInventory();
// Get all items
const items = await CloverSDK.getItems();
console.log('Items:', items);
// Get a specific item
const item = await CloverSDK.getItem('item-id-here');
console.log('Item:', item);
// Add new item
const itemId = await CloverSDK.addItem({
name: 'New Item',
price: 10.99, // dollars
code: 'ITEM001', // optional
taxable: true // optional, default: false
});
console.log('New item ID:', itemId);
// Disconnect when done
CloverSDK.disconnectInventory();
getCloverAccount()Get the Clover merchant account information.
Returns: Promise<{name: string, type: string}>
Throws: Error if account not found
connectInventory()Connect to Clover Inventory Connector. Must be called before using inventory-related methods.
Returns: Promise<boolean>
Throws: Error if connection fails
disconnectInventory()Disconnect from Inventory Connector. Should be called when done (e.g., in componentWillUnmount).
Returns: void
getItems()Get all items from Clover inventory.
Returns: Promise<Array<CloverItem>>
CloverItem:
{
id: string;
name: string;
code: string;
price: number; // dollars (e.g., 10.99)
taxable: boolean;
description: string; // always empty (not available in SDK)
}
getItem(itemId: string)Get a specific item by ID.
Parameters:
itemId (string): Item IDReturns: Promise<CloverItem>
Throws: Error if item not found
addItem(itemData: object)Add a new item to Clover inventory.
Parameters:
itemData.name (string, required): Item nameitemData.price (number, required): Price in dollars (e.g., 10.99)itemData.code (string, optional): Item codeitemData.taxable (boolean, optional): Apply tax (default: false)Returns: Promise<string> - New item ID
Throws: Error if validation fails or add fails
getItemsWithRetry(maxRetries?: number)Helper method to get items with automatic retry logic.
Parameters:
maxRetries (number, optional): Maximum retry attempts (default: 3)Returns: Promise<Array<CloverItem>>
import React, { useEffect, useState } from 'react';
import { View, Text, FlatList, Button } from 'react-native';
import CloverSDK from 'react-native-clover-sdk';
const CloverInventoryScreen = () => {
const [items, setItems] = useState([]);
const [connected, setConnected] = useState(false);
useEffect(() => {
const loadItems = async () => {
try {
// Check account
const account = await CloverSDK.getCloverAccount();
console.log('Account:', account);
// Connect
await CloverSDK.connectInventory();
setConnected(true);
// Get items
const itemsList = await CloverSDK.getItems();
setItems(itemsList);
} catch (error) {
console.error('Error:', error);
}
};
loadItems();
// Cleanup
return () => {
CloverSDK.disconnectInventory();
};
}, []);
const handleAddItem = async () => {
try {
const itemId = await CloverSDK.addItem({
name: 'Test Item',
price: 9.99,
taxable: true
});
console.log('Added item:', itemId);
// Refresh list
const itemsList = await CloverSDK.getItems();
setItems(itemsList);
} catch (error) {
console.error('Error adding item:', error);
}
};
return (
<View>
<Button title="Add Item" onPress={handleAddItem} />
<FlatList
data={items}
keyExtractor={(item) => item.id}
renderItem={({ item }) => (
<View>
<Text>{item.name} - ${item.price.toFixed(2)}</Text>
</View>
)}
/>
</View>
);
};
MIT
Contributions are welcome! Please feel free to submit a Pull Request.
FAQs
React Native wrapper for Clover Android SDK - Access Clover POS inventory and features from React Native
The npm package react-native-clover-sdk receives a total of 0 weekly downloads. As such, react-native-clover-sdk popularity was classified as not popular.
We found that react-native-clover-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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.