Skip to content

Commit

Permalink
Fix simple agent, some database fixes for supabase
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Mar 24, 2024
1 parent 71bf654 commit 81dc45b
Show file tree
Hide file tree
Showing 56 changed files with 578 additions and 467 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ You will need to make sure that the room_id already exists in the database. You

```typescript
const message = {
userId: "user-uuid", // Replace with the sender's UUID
user_id: "user-uuid", // Replace with the sender's UUID
content: { content: content }, // The message content
room_id: "room-uuid", // Replace with the room's UUID
};
Expand Down
34 changes: 17 additions & 17 deletions docs/docs/classes/DatabaseAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ custom_edit_url: null

## Methods

### addParticipantToRoom
### addParticipant

**addParticipantToRoom**(`userId`, `roomId`): `Promise`\<`void`\>
**addParticipant**(`user_id`, `room_id`): `Promise`\<`void`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `userId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `roomId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `user_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `room_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand Down Expand Up @@ -133,13 +133,13 @@ ___

### createRoom

**createRoom**(`name`): `Promise`\<\`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\`\>
**createRoom**(`room_id?`): `Promise`\<\`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `name` | `string` |
| `room_id?` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand All @@ -149,13 +149,13 @@ ___

### getAccountById

**getAccountById**(`userId`): `Promise`\<``null`` \| [`Account`](../interfaces/Account.md)\>
**getAccountById**(`user_id`): `Promise`\<``null`` \| [`Account`](../interfaces/Account.md)\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `userId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `user_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand Down Expand Up @@ -214,7 +214,7 @@ ___
| `params.count?` | `number` |
| `params.onlyInProgress?` | `boolean` |
| `params.room_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `params.userId?` | ``null`` \| \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `params.user_id?` | ``null`` \| \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand Down Expand Up @@ -269,7 +269,7 @@ ___
| Name | Type |
| :------ | :------ |
| `params` | `Object` |
| `params.userId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `params.user_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand All @@ -279,13 +279,13 @@ ___

### getRoomsByParticipant

**getRoomsByParticipant**(`userId`): `Promise`\<\`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\`[]\>
**getRoomsByParticipant**(`user_id`): `Promise`\<\`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\`[]\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `userId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `user_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand Down Expand Up @@ -397,14 +397,14 @@ ___

### removeParticipantFromRoom

**removeParticipantFromRoom**(`userId`, `roomId`): `Promise`\<`void`\>
**removeParticipantFromRoom**(`user_id`, `room_id`): `Promise`\<`void`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `userId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `roomId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `user_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `room_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand All @@ -414,13 +414,13 @@ ___

### removeRoom

**removeRoom**(`roomId`): `Promise`\<`void`\>
**removeRoom**(`room_id`): `Promise`\<`void`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `roomId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `room_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand Down
36 changes: 18 additions & 18 deletions docs/docs/classes/SqlJsDatabaseAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,24 @@ custom_edit_url: null

## Methods

### addParticipantToRoom
### addParticipant

**addParticipantToRoom**(`userId`, `roomId`): `Promise`\<`void`\>
**addParticipant**(`user_id`, `room_id`): `Promise`\<`void`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `userId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `roomId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `user_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `room_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

`Promise`\<`void`\>

#### Overrides

[DatabaseAdapter](DatabaseAdapter.md).[addParticipantToRoom](DatabaseAdapter.md#addparticipanttoroom)
[DatabaseAdapter](DatabaseAdapter.md).[addParticipant](DatabaseAdapter.md#addparticipant)

___

Expand Down Expand Up @@ -168,13 +168,13 @@ ___

### createRoom

**createRoom**(`name`): `Promise`\<\`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\`\>
**createRoom**(`room_id?`): `Promise`\<\`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `name` | `string` |
| `room_id?` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand All @@ -188,13 +188,13 @@ ___

### getAccountById

**getAccountById**(`userId`): `Promise`\<``null`` \| [`Account`](../interfaces/Account.md)\>
**getAccountById**(`user_id`): `Promise`\<``null`` \| [`Account`](../interfaces/Account.md)\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `userId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `user_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand Down Expand Up @@ -265,7 +265,7 @@ ___
| `params.count?` | `number` |
| `params.onlyInProgress?` | `boolean` |
| `params.room_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `params.userId?` | ``null`` \| \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `params.user_id?` | ``null`` \| \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand Down Expand Up @@ -332,7 +332,7 @@ ___
| Name | Type |
| :------ | :------ |
| `params` | `Object` |
| `params.userId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `params.user_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand All @@ -346,13 +346,13 @@ ___

### getRoomsByParticipant

**getRoomsByParticipant**(`userId`): `Promise`\<\`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\`[]\>
**getRoomsByParticipant**(`user_id`): `Promise`\<\`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\`[]\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `userId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `user_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand Down Expand Up @@ -492,14 +492,14 @@ ___

### removeParticipantFromRoom

**removeParticipantFromRoom**(`userId`, `roomId`): `Promise`\<`void`\>
**removeParticipantFromRoom**(`user_id`, `room_id`): `Promise`\<`void`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `userId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `roomId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `user_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `room_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand All @@ -513,13 +513,13 @@ ___

### removeRoom

**removeRoom**(`roomId`): `Promise`\<`void`\>
**removeRoom**(`room_id`): `Promise`\<`void`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `roomId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `room_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand Down
36 changes: 18 additions & 18 deletions docs/docs/classes/SqliteDatabaseAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,24 @@ custom_edit_url: null

## Methods

### addParticipantToRoom
### addParticipant

**addParticipantToRoom**(`userId`, `roomId`): `Promise`\<`void`\>
**addParticipant**(`user_id`, `room_id`): `Promise`\<`void`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `userId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `roomId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `user_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `room_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

`Promise`\<`void`\>

#### Overrides

[DatabaseAdapter](DatabaseAdapter.md).[addParticipantToRoom](DatabaseAdapter.md#addparticipanttoroom)
[DatabaseAdapter](DatabaseAdapter.md).[addParticipant](DatabaseAdapter.md#addparticipant)

___

Expand Down Expand Up @@ -168,13 +168,13 @@ ___

### createRoom

**createRoom**(`name`): `Promise`\<\`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\`\>
**createRoom**(`room_id?`): `Promise`\<\`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `name` | `string` |
| `room_id?` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand All @@ -188,13 +188,13 @@ ___

### getAccountById

**getAccountById**(`userId`): `Promise`\<``null`` \| [`Account`](../interfaces/Account.md)\>
**getAccountById**(`user_id`): `Promise`\<``null`` \| [`Account`](../interfaces/Account.md)\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `userId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `user_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand Down Expand Up @@ -265,7 +265,7 @@ ___
| `params.count?` | `number` |
| `params.onlyInProgress?` | `boolean` |
| `params.room_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `params.userId?` | ``null`` \| \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `params.user_id?` | ``null`` \| \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand Down Expand Up @@ -332,7 +332,7 @@ ___
| Name | Type |
| :------ | :------ |
| `params` | `Object` |
| `params.userId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `params.user_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand All @@ -346,13 +346,13 @@ ___

### getRoomsByParticipant

**getRoomsByParticipant**(`userId`): `Promise`\<\`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\`[]\>
**getRoomsByParticipant**(`user_id`): `Promise`\<\`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\`[]\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `userId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `user_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand Down Expand Up @@ -492,14 +492,14 @@ ___

### removeParticipantFromRoom

**removeParticipantFromRoom**(`userId`, `roomId`): `Promise`\<`void`\>
**removeParticipantFromRoom**(`user_id`, `room_id`): `Promise`\<`void`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `userId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `roomId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `user_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `room_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand All @@ -513,13 +513,13 @@ ___

### removeRoom

**removeRoom**(`roomId`): `Promise`\<`void`\>
**removeRoom**(`room_id`): `Promise`\<`void`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `roomId` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |
| `room_id` | \`$\{string}-$\{string}-$\{string}-$\{string}-$\{string}\` |

#### Returns

Expand Down
Loading

0 comments on commit 81dc45b

Please sign in to comment.