Skip to content
Merged
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 23
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/beeper%2Fbeeper-desktop-api-5a8ac7b545c48dc892e5c680303e305254921554dabee848e40a808659dbcf1e.yml
openapi_spec_hash: 0103975601aac1445d3a4ef418c5d17a
config_hash: 66617ffb2c7b6ef016e9704e766e7f65
config_hash: ca148af6be59ec54295b2c5f852a38d1
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Changelog

## 0.1.0 (2026-03-13)

Full Changelog: [v0.0.1...v0.1.0](https://github.com/beeper/desktop-api-sql/compare/v0.0.1...v0.1.0)

### Features

* **api:** manual updates ([c6d83ec](https://github.com/beeper/desktop-api-sql/commit/c6d83ece9c89e1c0e261c66552c0282c59d904ef))


### Bug Fixes

* **client:** reduce unnecessary renamings ([88591c5](https://github.com/beeper/desktop-api-sql/commit/88591c56977efe6616e92cc21ba4c23fb28d6991))


### Chores

* configure new SDK language ([086ac9f](https://github.com/beeper/desktop-api-sql/commit/086ac9f34ee515d19180678e802fef3cf97a1e3f))
* **internal:** codegen related update ([1aacb8b](https://github.com/beeper/desktop-api-sql/commit/1aacb8ba9a09c987f68d49445b2233617c76d0fc))
* **internal:** codegen related update ([712841f](https://github.com/beeper/desktop-api-sql/commit/712841fe925cc7a2fac5c652dc45f1212bd2a2cd))
* **test:** do not count install time for mock server timeout ([7b60a99](https://github.com/beeper/desktop-api-sql/commit/7b60a995ce257ff5fcde7f96a2505d459571f3a0))
* update SDK settings ([890fa2a](https://github.com/beeper/desktop-api-sql/commit/890fa2a7d8822abeacb197b2d26ab7d8ec8d93d3))
* update SDK settings ([d8d39b2](https://github.com/beeper/desktop-api-sql/commit/d8d39b2a6247e3f8898610026a80a0dcf8a522e3))
7 changes: 4 additions & 3 deletions META.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@
"version": "0.0.1",
"release_status": "testing",
"maintainer": "Beeper Desktop <help@beeper.com>",
"generated_by": "Stainless (https://stainless.com)",
"license": "mit",
"resources": {
"homepage": "https://developers.beeper.com/desktop-api/",
"bugtracker": {
"web": "https://www.github.com/stainless-sdks/beeper-desktop-api-sql/issues",
"web": "https://www.github.com/beeper/desktop-api-sql/issues",
"mailto": "help@beeper.com"
},
"repository": {
"url": "git://github.com/stainless-sdks/beeper-desktop-api-sql.git",
"web": "https://www.github.com/stainless-sdks/beeper-desktop-api-sql",
"url": "git://github.com/beeper/desktop-api-sql.git",
"web": "https://www.github.com/beeper/desktop-api-sql",
"type": "git"
}
},
Expand Down
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
# Beeper Desktop API PostgreSQL Extension

> [!NOTE]
>
> The Beeper Desktop API PostgreSQL Extension is currently **experimental** and we're excited for you to experiment with it!
>
> This extension has not yet been exhaustively tested in production environments and may be missing some features you'd expect in a stable release. As we continue development, there may be breaking changes that require updates to your code.
>
> **We'd love your feedback!** Please share any suggestions, bug reports, feature requests, or general thoughts by [filing an issue](https://www.github.com/stainless-sdks/beeper-desktop-api-sql/issues/new).
> **We'd love your feedback!** Please share any suggestions, bug reports, feature requests, or general thoughts by [filing an issue](https://www.github.com/beeper/desktop-api-sql/issues/new).

The Beeper Desktop API PostgreSQL Extension provides convenient access to the [Beeper Desktop REST API](https://developers.beeper.com/desktop-api/) from PostgreSQL.

It is generated with [Stainless](https://www.stainless.com/).

The REST API documentation can be found on [developers.beeper.com](https://developers.beeper.com/desktop-api/).

## Installation

Clone the repository:

```sh
git clone git@github.com:stainless-sdks/beeper-desktop-api-sql.git
cd beeper-desktop-api-sql
git clone git@github.com:beeper/desktop-api-sql.git
cd desktop-api-sql
```

Install the extension:
Expand Down Expand Up @@ -70,7 +73,9 @@ Configure the client by setting configuration parameters at the database level:
ALTER DATABASE my_database SET beeper_desktop_api.beeper_access_token = 'My Access Token';
```

> [!NOTE] > `ALTER DATABASE` persistently alters the database, but doesn't take effect until the next session. To
> [!NOTE]
>
> `ALTER DATABASE` persistently alters the database, but doesn't take effect until the next session. To
> ephemerally modify the current session, use `SET beeper_desktop_api.beeper_access_token TO 'My Access Token';`.

See this table for the available configuration parameters:
Expand All @@ -84,14 +89,14 @@ See this table for the available configuration parameters:

To send a request to the Beeper Desktop API, call the relevant SQL function with values corresponding to the parameter types and `SELECT` the columns you need from the returned rows.

To construct [composite type](https://www.postgresql.org/docs/current/rowtypes.html) parameters, use the parameter type's provided `make_*` function. For example, `beeper_desktop_api_chats.user` may be constructed like so:
To construct [composite type](https://www.postgresql.org/docs/current/rowtypes.html) parameters, use the parameter type's provided `make_*` function. For example, `beeper_desktop_api_chats.create_params_user` may be constructed like so:

```sql
beeper_desktop_api_chats.make_user(
beeper_desktop_api_chats.make_create_params_user(
id := 'id',
email := 'email',
full_name := 'fullName',
phone_number := 'phoneNumber',
fullName := 'fullName',
phoneNumber := 'phoneNumber',
username := 'username'
)
```
Expand All @@ -113,6 +118,7 @@ LIMIT 200;
```

> [!IMPORTANT]
>
> Place your `LIMIT` as close to the paginated function call as possible. If the `LIMIT` is too far
> removed, then PostgreSQL may not [push down the condition](https://wiki.postgresql.org/wiki/Inlining_of_SQL_functions),
> causing all pages to be requested and buffered.
Expand Down Expand Up @@ -177,4 +183,4 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/beeper-desktop-api-sql/issues) with questions, bugs, or suggestions.
We are keen for your feedback; please open an [issue](https://www.github.com/beeper/desktop-api-sql/issues) with questions, bugs, or suggestions.
68 changes: 68 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"packages": {
".": {}
},
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
"include-v-in-tag": true,
"include-component-in-tag": false,
"versioning": "prerelease",
"prerelease": true,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"pull-request-header": "Automated Release PR",
"pull-request-title-pattern": "release: ${version}",
"changelog-sections": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "revert",
"section": "Reverts"
},
{
"type": "chore",
"section": "Chores"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "style",
"section": "Styles"
},
{
"type": "refactor",
"section": "Refactors"
},
{
"type": "test",
"section": "Tests",
"hidden": true
},
{
"type": "build",
"section": "Build System"
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": true
}
],
"release-type": "simple",
"extra-files": [
"beeper_desktop_api.control",
"META.json",
"Makefile"
]
}
13 changes: 12 additions & 1 deletion scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,22 @@ echo "==> Starting mock server with URL ${URL}"

# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version

npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &

# Wait for server to come online
# Wait for server to come online (max 30s)
echo -n "Waiting for server"
attempts=0
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
attempts=$((attempts + 1))
if [ "$attempts" -ge 300 ]; then
echo
echo "Timed out waiting for Prism server to start"
cat .prism.log
exit 1
fi
echo -n "."
sleep 0.1
done
Expand Down
8 changes: 4 additions & 4 deletions sql/_beeper_desktop_api.sql
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ CREATE TYPE beeper_desktop_api_chats.chat_participant AS ();
CREATE TYPE beeper_desktop_api_chats.chat_create_response AS ();
CREATE TYPE beeper_desktop_api_chats.chat_list_response AS ();
CREATE TYPE beeper_desktop_api_chats.chat_list_response_participant AS ();
CREATE TYPE beeper_desktop_api_chats.user AS ();
CREATE TYPE beeper_desktop_api_chats.create_params_user AS ();

CREATE SCHEMA IF NOT EXISTS beeper_desktop_api_chats_reminders;

CREATE TYPE beeper_desktop_api_chats_reminders.reminder AS ();
CREATE TYPE beeper_desktop_api_chats_reminders.create_params_reminder AS ();

CREATE SCHEMA IF NOT EXISTS beeper_desktop_api_chats_messages_reactions;

Expand All @@ -149,8 +149,8 @@ CREATE SCHEMA IF NOT EXISTS beeper_desktop_api_messages;

CREATE TYPE beeper_desktop_api_messages.message_update_response AS ();
CREATE TYPE beeper_desktop_api_messages.message_send_response AS ();
CREATE TYPE beeper_desktop_api_messages.attachment AS ();
CREATE TYPE beeper_desktop_api_messages.attachment_size AS ();
CREATE TYPE beeper_desktop_api_messages.send_params_attachment AS ();
CREATE TYPE beeper_desktop_api_messages.send_params_attachment_send_params_size AS ();

CREATE SCHEMA IF NOT EXISTS beeper_desktop_api_assets;

Expand Down
Loading
Loading