# feel-cap-native

Handles native feat

## Install

```bash
npm install feel-cap-native
npx cap sync
```

## API

<docgen-index>

* [`print(...)`](#print)
* [`getAllPrinters()`](#getallprinters)
* [`initializeScanner()`](#initializescanner)
* [`requestNewDevice(...)`](#requestnewdevice)
* [`connectToScanner(...)`](#connecttoscanner)
* [`createChatRoom(...)`](#createchatroom)
* [`proompt(...)`](#proompt)
* [`startAdvertising()`](#startadvertising)
* [`startDiscovery()`](#startdiscovery)
* [`sendMessage()`](#sendmessage)
* [`stopAllConnections()`](#stopallconnections)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### print(...)

```typescript
print({ options, profile, data, address, printerName }: { options: PrintOptions; profile: PrintProfile; data: string; printerName: string; address: string; }) => Promise<void>
```

| Param     | Type                                                                                                                                                                       |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`__0`** | <code>{ options: <a href="#printoptions">PrintOptions</a>; profile: <a href="#printprofile">PrintProfile</a>; data: string; printerName: string; address: string; }</code> |

--------------------


### getAllPrinters()

```typescript
getAllPrinters() => Promise<any>
```

**Returns:** <code>Promise&lt;any&gt;</code>

--------------------


### initializeScanner()

```typescript
initializeScanner() => Promise<HIDDeviceInfo[]>
```

**Returns:** <code>Promise&lt;HIDDeviceInfo[]&gt;</code>

--------------------


### requestNewDevice(...)

```typescript
requestNewDevice(vendorId: number) => Promise<any>
```

| Param          | Type                |
| -------------- | ------------------- |
| **`vendorId`** | <code>number</code> |

**Returns:** <code>Promise&lt;any&gt;</code>

--------------------


### connectToScanner(...)

```typescript
connectToScanner(device: HIDDeviceInfo) => Promise<any>
```

| Param        | Type                                                    |
| ------------ | ------------------------------------------------------- |
| **`device`** | <code><a href="#hiddeviceinfo">HIDDeviceInfo</a></code> |

**Returns:** <code>Promise&lt;any&gt;</code>

--------------------


### createChatRoom(...)

```typescript
createChatRoom(config: RoomConfig) => Promise<{ ip: string; port: number; }>
```

| Param        | Type                                              |
| ------------ | ------------------------------------------------- |
| **`config`** | <code><a href="#roomconfig">RoomConfig</a></code> |

**Returns:** <code>Promise&lt;{ ip: string; port: number; }&gt;</code>

--------------------


### proompt(...)

```typescript
proompt({ apiKey, shopInfo }: { apiKey: string; shopInfo: { prompt: string; }; }) => Promise<string>
```

| Param     | Type                                                            |
| --------- | --------------------------------------------------------------- |
| **`__0`** | <code>{ apiKey: string; shopInfo: { prompt: string; }; }</code> |

**Returns:** <code>Promise&lt;string&gt;</code>

--------------------


### startAdvertising()

```typescript
startAdvertising() => Promise<any>
```

**Returns:** <code>Promise&lt;any&gt;</code>

--------------------


### startDiscovery()

```typescript
startDiscovery() => Promise<any>
```

**Returns:** <code>Promise&lt;any&gt;</code>

--------------------


### sendMessage()

```typescript
sendMessage() => Promise<any>
```

**Returns:** <code>Promise&lt;any&gt;</code>

--------------------


### stopAllConnections()

```typescript
stopAllConnections() => Promise<any>
```

**Returns:** <code>Promise&lt;any&gt;</code>

--------------------


### Interfaces


#### HIDDeviceInfo

| Prop                   | Type                |
| ---------------------- | ------------------- |
| **`productId`**        | <code>number</code> |
| **`vendorId`**         | <code>number</code> |
| **`productName`**      | <code>string</code> |
| **`manufacturerName`** | <code>string</code> |


### Type Aliases


#### PrintOptions

<code>{ 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 }</code>


#### PrintProfile

<code>{ name: string image: string username: string }</code>


#### RoomConfig

<code>{ owner: string staff: any[] products: any[] prepUnits: any[] }</code>

</docgen-api>
