feel-cap-native v0.5.6
feel-cap-native
Handles native feat
Install
npm install feel-cap-native
npx cap sync
API
print(...)
getAllPrinters()
initializeScanner()
requestNewDevice(...)
connectToScanner(...)
createChatRoom(...)
proompt(...)
startAdvertising()
startDiscovery()
sendMessage()
stopAllConnections()
- Interfaces
- Type Aliases
print(...)
print({ options, profile, data, address, printerName }: { options: PrintOptions; profile: PrintProfile; data: string; printerName: string; address: string; }) => Promise<void>
Param | Type |
---|---|
__0 | { options: PrintOptions; profile: PrintProfile; data: string; printerName: string; address: string; } |
getAllPrinters()
getAllPrinters() => Promise<any>
Returns: Promise<any>
initializeScanner()
initializeScanner() => Promise<HIDDeviceInfo[]>
Returns: Promise<HIDDeviceInfo[]>
requestNewDevice(...)
requestNewDevice(vendorId: number) => Promise<any>
Param | Type |
---|---|
vendorId | number |
Returns: Promise<any>
connectToScanner(...)
connectToScanner(device: HIDDeviceInfo) => Promise<any>
Param | Type |
---|---|
device | HIDDeviceInfo |
Returns: Promise<any>
createChatRoom(...)
createChatRoom(config: RoomConfig) => Promise<{ ip: string; port: number; }>
Param | Type |
---|---|
config | RoomConfig |
Returns: Promise<{ ip: string; port: number; }>
proompt(...)
proompt({ apiKey, shopInfo }: { apiKey: string; shopInfo: { prompt: string; }; }) => Promise<string>
Param | Type |
---|---|
__0 | { apiKey: string; shopInfo: { prompt: string; }; } |
Returns: Promise<string>
startAdvertising()
startAdvertising() => Promise<any>
Returns: Promise<any>
startDiscovery()
startDiscovery() => Promise<any>
Returns: Promise<any>
sendMessage()
sendMessage() => Promise<any>
Returns: Promise<any>
stopAllConnections()
stopAllConnections() => Promise<any>
Returns: Promise<any>
Interfaces
HIDDeviceInfo
Prop | Type |
---|---|
productId | number |
vendorId | number |
productName | string |
manufacturerName | string |
Type Aliases
PrintOptions
{ preview?: boolean; // Whether to preview before printing width?: string; // Width of the document (e.g., "80mm") margin?: string; // Margin of the document (e.g., "0 0 0 0") copies?: number; // Number of copies to print printerName?: string; // Name of the printer silent?: boolean; // Whether to print silently without a prompt address?: string }
PrintProfile
{ name: string image: string username: string }
RoomConfig
{ owner: string staff: any[] products: any[] prepUnits: any[] }
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago