getting there

This commit is contained in:
eskimo
2024-10-03 13:45:22 -04:00
parent de6b28ab43
commit 7e77833452
8 changed files with 3657 additions and 21 deletions

101
README.md
View File

@@ -13,25 +13,110 @@ npx cap sync
<docgen-index>
* [`echo(...)`](#echo)
* [`create(...)`](#create)
* [`connect(...)`](#connect)
* [`send(...)`](#send)
* [`disconnect(...)`](#disconnect)
* [`addListener('state', ...)`](#addlistenerstate-)
* [`addListener('message', ...)`](#addlistenermessage-)
* [Interfaces](#interfaces)
</docgen-index>
<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
### echo(...)
### create(...)
```typescript
echo(options: { value: string; }) => Promise<{ value: string; }>
create(options: { id: string; host: string; port: number; useTLS?: boolean; acceptInvalidCertificates?: boolean; }) => Promise<void>
```
| Param | Type |
| ------------- | ------------------------------- |
| **`options`** | <code>{ value: string; }</code> |
**Returns:** <code>Promise&lt;{ value: string; }&gt;</code>
| Param | Type |
| ------------- | --------------------------------------------------------------------------------------------------------------- |
| **`options`** | <code>{ id: string; host: string; port: number; useTLS?: boolean; acceptInvalidCertificates?: boolean; }</code> |
--------------------
### connect(...)
```typescript
connect(options: { id: string; }) => Promise<void>
```
| Param | Type |
| ------------- | ---------------------------- |
| **`options`** | <code>{ id: string; }</code> |
--------------------
### send(...)
```typescript
send(options: { id: string; message: string; }) => Promise<void>
```
| Param | Type |
| ------------- | --------------------------------------------- |
| **`options`** | <code>{ id: string; message: string; }</code> |
--------------------
### disconnect(...)
```typescript
disconnect(options: { id: string; }) => Promise<void>
```
| Param | Type |
| ------------- | ---------------------------- |
| **`options`** | <code>{ id: string; }</code> |
--------------------
### addListener('state', ...)
```typescript
addListener(eventName: 'state', listenerFunc: (message: { id: string; state: string; }) => void) => Promise<PluginListenerHandle>
```
| Param | Type |
| ------------------ | ----------------------------------------------------------------- |
| **`eventName`** | <code>'state'</code> |
| **`listenerFunc`** | <code>(message: { id: string; state: string; }) =&gt; void</code> |
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
--------------------
### addListener('message', ...)
```typescript
addListener(eventName: 'message', listenerFunc: (message: { id: string; message: string; }) => void) => Promise<PluginListenerHandle>
```
| Param | Type |
| ------------------ | ------------------------------------------------------------------- |
| **`eventName`** | <code>'message'</code> |
| **`listenerFunc`** | <code>(message: { id: string; message: string; }) =&gt; void</code> |
**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
--------------------
### Interfaces
#### PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |
</docgen-api>