Skip to content

Commit a40a83d

Browse files
authored
Merge pull request #3 from beeper/release-please--branches--main--changes--next
release: 0.1.0
2 parents 9382bd0 + 56d8ef4 commit a40a83d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1752
-1552
lines changed

.github/workflows/create-releases.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.0.1"
2+
".": "0.1.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 13
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/beeper%2Fbeeper-desktop-api-10508b7bd52381c216ed2584b7b0894f70fcc97fbd7f86792e78f72d108157c5.yml
3-
openapi_spec_hash: d5f07fd2a363877f4c72da1187b8aaf1
4-
config_hash: c7a99939afc44f6fae479b7896979f52
1+
configured_endpoints: 15
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/beeper%2Fbeeper-desktop-api-0763b61997721da6f4514241bf0f7bb5f7a88c7298baf0f1b2d58036aaf7e2f1.yml
3+
openapi_spec_hash: 5158475919c04bb52fb03c6a4582188d
4+
config_hash: 5fa7ded4bfdffe4cc1944a819da87f9f

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Changelog
2+
3+
## 0.1.0 (2025-10-16)
4+
5+
Full Changelog: [v0.0.1...v0.1.0](https://github.com/beeper/desktop-api-go/compare/v0.0.1...v0.1.0)
6+
7+
### Features
8+
9+
* **api:** bump for new endpoints ([26fc4bd](https://github.com/beeper/desktop-api-go/commit/26fc4bd1ef7b297fc07cb7b10a63ff33713cb8c1))
10+
* **api:** manual updates ([78129af](https://github.com/beeper/desktop-api-go/commit/78129af51edc7883b0e41aefd57b6adc4e605f5a))
11+
* **api:** manual updates ([4408f20](https://github.com/beeper/desktop-api-go/commit/4408f2032cc58ab59a465bddf91ebe5e8d248cad))
12+
* **api:** manual updates ([0c8017f](https://github.com/beeper/desktop-api-go/commit/0c8017fad7c347bcf437cf685aafdb4270c44a84))
13+
* **api:** manual updates ([db71efa](https://github.com/beeper/desktop-api-go/commit/db71efac468bc6f4b608997bbf0721082733c36b))
14+
* **api:** manual updates ([589a68b](https://github.com/beeper/desktop-api-go/commit/589a68bbf8a2d60a1281db464df43ad9eab67668))
15+
* **api:** manual updates ([39aa081](https://github.com/beeper/desktop-api-go/commit/39aa081c0cf963d834dc7b2ae2e9a6fe38c4cec5))
16+
* **api:** manual updates ([4c76c3b](https://github.com/beeper/desktop-api-go/commit/4c76c3b0b3a134888001bce5e150db1971ac8f14))
17+
* **api:** manual updates ([5c2b75b](https://github.com/beeper/desktop-api-go/commit/5c2b75bdbc04d7548db3b8f5a202ade4590f7143))
18+
* **api:** manual updates ([658f1d0](https://github.com/beeper/desktop-api-go/commit/658f1d09e48180e35248adc7da6e27c395d1fcca))
19+
* **api:** manual updates ([d681504](https://github.com/beeper/desktop-api-go/commit/d681504bf0ff37084a75d5f9a64c4bc48733fcff))
20+
* **api:** remove limit from list routes ([92c49b3](https://github.com/beeper/desktop-api-go/commit/92c49b369b5ace61e67a1f65c4f44c32297bbb5a))
21+
* **api:** update via SDK Studio ([e6707f7](https://github.com/beeper/desktop-api-go/commit/e6707f7a74894867f206865d4d2a36ae00372917))
22+
* **api:** update via SDK Studio ([36be378](https://github.com/beeper/desktop-api-go/commit/36be3780fb98ff95cecde1c4ecdd7d45cdb4aec1))
23+
* **api:** update via SDK Studio ([f32d341](https://github.com/beeper/desktop-api-go/commit/f32d3418ec8b806313a58dac62e4de26c2894a17))
24+
* **api:** update via SDK Studio ([f390e62](https://github.com/beeper/desktop-api-go/commit/f390e629ec0230972d8f84fbffe27ea6a56e92ee))
25+
* **api:** update via SDK Studio ([278cdb3](https://github.com/beeper/desktop-api-go/commit/278cdb321d3459c4019254ea75e5705bd70597b1))
26+
* **api:** update via SDK Studio ([25b5788](https://github.com/beeper/desktop-api-go/commit/25b578877564808fdd3eddb5a4a7238c6b249bc7))
27+
* **api:** update via SDK Studio ([b5a1ff4](https://github.com/beeper/desktop-api-go/commit/b5a1ff452e59274b58586d826e5ebd34efe37a0a))
28+
* **api:** update via SDK Studio ([3b0da67](https://github.com/beeper/desktop-api-go/commit/3b0da676abda606cbb2d58f5dbc558dfbebf16a6))
29+
* **api:** update via SDK Studio ([95da01f](https://github.com/beeper/desktop-api-go/commit/95da01f346d6483cce93fafe9b0ba0a59c50c0a3))
30+
* **api:** update via SDK Studio ([8efb1dd](https://github.com/beeper/desktop-api-go/commit/8efb1ddb9a3c01b51c69e04d16f3e40fcbfebbdb))
31+
* **api:** update via SDK Studio ([cdee3ee](https://github.com/beeper/desktop-api-go/commit/cdee3ee8a2f49c9cbd6a3fd1948b7576b6c5d645))
32+
* **api:** update via SDK Studio ([7cafbfd](https://github.com/beeper/desktop-api-go/commit/7cafbfdcbd5d5aae479a6b665ec5578586dbc215))
33+
* **api:** update via SDK Studio ([9f84441](https://github.com/beeper/desktop-api-go/commit/9f84441fa443bd5f02323eca7676de4d960924e0))
34+
* **api:** update via SDK Studio ([0a97aff](https://github.com/beeper/desktop-api-go/commit/0a97aff2981e3f611cfd829353868f3fb40633d9))
35+
36+
37+
### Bug Fixes
38+
39+
* close body before retrying ([c6145c4](https://github.com/beeper/desktop-api-go/commit/c6145c4b7e1880a13319137608951f0049d94c25))
40+
41+
42+
### Chores
43+
44+
* configure new SDK language ([7f956b3](https://github.com/beeper/desktop-api-go/commit/7f956b3cf69545aed9b0147efa467636fe2ee43b))
45+
* configure new SDK language ([310166b](https://github.com/beeper/desktop-api-go/commit/310166b0b45746db244d1a9e34de1c8dcc04d316))
46+
* **internal:** codegen related update ([b891408](https://github.com/beeper/desktop-api-go/commit/b891408e549e98abd2106329a3c362830639690b))
47+
* **internal:** codegen related update ([3c735fe](https://github.com/beeper/desktop-api-go/commit/3c735fe37a02273620e047afa8e7a28f272fdbd2))

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ $ ./scripts/lint
99

1010
This will install all the required dependencies and build the SDK.
1111

12-
You can also [install go 1.18+ manually](https://go.dev/doc/install).
12+
You can also [install go 1.22+ manually](https://go.dev/doc/install).
1313

1414
## Modifying/Adding code
1515

@@ -41,7 +41,7 @@ To use a local version of this library from source in another project, edit the
4141
directive. This can be done through the CLI with the following:
4242

4343
```sh
44-
$ go mod edit -replace github.com/beeper/beeper-desktop-api-go=/path/to/beeper-desktop-api-go
44+
$ go mod edit -replace github.com/beeper/desktop-api-go=/path/to/desktop-api-go
4545
```
4646

4747
## Running tests

README.md

Lines changed: 49 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
# Beeper Desktop Go API Library
22

3-
<a href="https://pkg.go.dev/github.com/beeper/beeper-desktop-api-go"><img src="https://pkg.go.dev/badge/github.com/beeper/beeper-desktop-api-go.svg" alt="Go Reference"></a>
3+
<!-- x-release-please-start-version -->
44

5-
The Beeper Desktop Go library provides convenient access to the [Beeper Desktop REST API](https://www.beeper.com/desktop-api)
6-
from applications written in Go.
5+
<a href="https://pkg.go.dev/github.com/beeper/desktop-api-go"><img src="https://pkg.go.dev/badge/github.com/beeper/desktop-api-go.svg" alt="Go Reference"></a>
6+
7+
<!-- x-release-please-end -->
78

8-
It is generated with [Stainless](https://www.stainless.com/).
9+
The Beeper Desktop Go library provides convenient access to the [Beeper Desktop REST API](https://developers.beeper.com/desktop-api/)
10+
from applications written in Go.
911

1012
## Installation
1113

1214
<!-- x-release-please-start-version -->
1315

1416
```go
1517
import (
16-
"github.com/beeper/beeper-desktop-api-go" // imported as githubcombeeperbeeperdesktopapigo
18+
"github.com/beeper/desktop-api-go" // imported as beeperdesktopapi
1719
)
1820
```
1921

@@ -24,14 +26,14 @@ Or to pin the version:
2426
<!-- x-release-please-start-version -->
2527

2628
```sh
27-
go get -u 'github.com/beeper/beeper-desktop-api-go@v0.0.1'
29+
go get -u 'github.com/beeper/desktop-api-go@v0.1.0'
2830
```
2931

3032
<!-- x-release-please-end -->
3133

3234
## Requirements
3335

34-
This library requires Go 1.18+.
36+
This library requires Go 1.22+.
3537

3638
## Usage
3739

@@ -44,17 +46,18 @@ import (
4446
"context"
4547
"fmt"
4648

47-
"github.com/beeper/beeper-desktop-api-go"
48-
"github.com/beeper/beeper-desktop-api-go/option"
49+
"github.com/beeper/desktop-api-go"
50+
"github.com/beeper/desktop-api-go/option"
4951
)
5052

5153
func main() {
52-
client := githubcombeeperbeeperdesktopapigo.NewClient(
54+
client := beeperdesktopapi.NewClient(
5355
option.WithAccessToken("My Access Token"), // defaults to os.LookupEnv("BEEPER_ACCESS_TOKEN")
5456
)
55-
page, err := client.Chats.Find(context.TODO(), githubcombeeperbeeperdesktopapigo.ChatFindParams{
56-
Limit: githubcombeeperbeeperdesktopapigo.Int(10),
57-
Type: githubcombeeperbeeperdesktopapigo.ChatFindParamsTypeSingle,
57+
page, err := client.Chats.Search(context.TODO(), beeperdesktopapi.ChatSearchParams{
58+
IncludeMuted: beeperdesktopapi.Bool(true),
59+
Limit: beeperdesktopapi.Int(3),
60+
Type: beeperdesktopapi.ChatSearchParamsTypeSingle,
5861
})
5962
if err != nil {
6063
panic(err.Error())
@@ -66,31 +69,31 @@ func main() {
6669

6770
### Request fields
6871

69-
The githubcombeeperbeeperdesktopapigo library uses the [`omitzero`](https://tip.golang.org/doc/go1.24#encodingjsonpkgencodingjson)
72+
The beeperdesktopapi library uses the [`omitzero`](https://tip.golang.org/doc/go1.24#encodingjsonpkgencodingjson)
7073
semantics from the Go 1.24+ `encoding/json` release for request fields.
7174

7275
Required primitive fields (`int64`, `string`, etc.) feature the tag <code>\`json:"...,required"\`</code>. These
7376
fields are always serialized, even their zero values.
7477

75-
Optional primitive types are wrapped in a `param.Opt[T]`. These fields can be set with the provided constructors, `githubcombeeperbeeperdesktopapigo.String(string)`, `githubcombeeperbeeperdesktopapigo.Int(int64)`, etc.
78+
Optional primitive types are wrapped in a `param.Opt[T]`. These fields can be set with the provided constructors, `beeperdesktopapi.String(string)`, `beeperdesktopapi.Int(int64)`, etc.
7679

7780
Any `param.Opt[T]`, map, slice, struct or string enum uses the
7881
tag <code>\`json:"...,omitzero"\`</code>. Its zero value is considered omitted.
7982

8083
The `param.IsOmitted(any)` function can confirm the presence of any `omitzero` field.
8184

8285
```go
83-
p := githubcombeeperbeeperdesktopapigo.ExampleParams{
84-
ID: "id_xxx", // required property
85-
Name: githubcombeeperbeeperdesktopapigo.String("..."), // optional property
86+
p := beeperdesktopapi.ExampleParams{
87+
ID: "id_xxx", // required property
88+
Name: beeperdesktopapi.String("..."), // optional property
8689

87-
Point: githubcombeeperbeeperdesktopapigo.Point{
88-
X: 0, // required field will serialize as 0
89-
Y: githubcombeeperbeeperdesktopapigo.Int(1), // optional field will serialize as 1
90+
Point: beeperdesktopapi.Point{
91+
X: 0, // required field will serialize as 0
92+
Y: beeperdesktopapi.Int(1), // optional field will serialize as 1
9093
// ... omitted non-required fields will not be serialized
9194
},
9295

93-
Origin: githubcombeeperbeeperdesktopapigo.Origin{}, // the zero value of [Origin] is considered omitted
96+
Origin: beeperdesktopapi.Origin{}, // the zero value of [Origin] is considered omitted
9497
}
9598
```
9699

@@ -119,7 +122,7 @@ p.SetExtraFields(map[string]any{
119122
})
120123

121124
// Send a number instead of an object
122-
custom := param.Override[githubcombeeperbeeperdesktopapigo.FooParams](12)
125+
custom := param.Override[beeperdesktopapi.FooParams](12)
123126
```
124127

125128
### Request unions
@@ -260,7 +263,7 @@ This library uses the functional options pattern. Functions defined in the
260263
requests. For example:
261264

262265
```go
263-
client := githubcombeeperbeeperdesktopapigo.NewClient(
266+
client := beeperdesktopapi.NewClient(
264267
// Adds a header to every request made by the client
265268
option.WithHeader("X-Some-Header", "custom_header_info"),
266269
)
@@ -275,7 +278,7 @@ client.Accounts.List(context.TODO(), ...,
275278

276279
The request option `option.WithDebugLog(nil)` may be helpful while debugging.
277280

278-
See the [full list of request options](https://pkg.go.dev/github.com/beeper/beeper-desktop-api-go/option).
281+
See the [full list of request options](https://pkg.go.dev/github.com/beeper/desktop-api-go/option).
279282

280283
### Pagination
281284

@@ -284,9 +287,10 @@ This library provides some conveniences for working with paginated list endpoint
284287
You can use `.ListAutoPaging()` methods to iterate through items across all pages:
285288

286289
```go
287-
iter := client.Messages.SearchAutoPaging(context.TODO(), githubcombeeperbeeperdesktopapigo.MessageSearchParams{
288-
Limit: githubcombeeperbeeperdesktopapigo.Int(20),
289-
Query: githubcombeeperbeeperdesktopapigo.String("meeting"),
290+
iter := client.Messages.SearchAutoPaging(context.TODO(), beeperdesktopapi.MessageSearchParams{
291+
AccountIDs: []string{"local-telegram_ba_QFrb5lrLPhO3OT5MFBeTWv0x4BI"},
292+
Limit: beeperdesktopapi.Int(10),
293+
Query: beeperdesktopapi.String("deployment"),
290294
})
291295
// Automatically fetches more pages as needed.
292296
for iter.Next() {
@@ -302,12 +306,13 @@ Or you can use simple `.List()` methods to fetch a single page and receive a sta
302306
with additional helper methods like `.GetNextPage()`, e.g.:
303307

304308
```go
305-
page, err := client.Messages.Search(context.TODO(), githubcombeeperbeeperdesktopapigo.MessageSearchParams{
306-
Limit: githubcombeeperbeeperdesktopapigo.Int(20),
307-
Query: githubcombeeperbeeperdesktopapigo.String("meeting"),
309+
page, err := client.Messages.Search(context.TODO(), beeperdesktopapi.MessageSearchParams{
310+
AccountIDs: []string{"local-telegram_ba_QFrb5lrLPhO3OT5MFBeTWv0x4BI"},
311+
Limit: beeperdesktopapi.Int(10),
312+
Query: beeperdesktopapi.String("deployment"),
308313
})
309314
for page != nil {
310-
for _, message := range page.Data {
315+
for _, message := range page.Items {
311316
fmt.Printf("%+v\n", message)
312317
}
313318
page, err = page.GetNextPage()
@@ -320,24 +325,21 @@ if err != nil {
320325
### Errors
321326

322327
When the API returns a non-success status code, we return an error with type
323-
`*githubcombeeperbeeperdesktopapigo.Error`. This contains the `StatusCode`, `*http.Request`, and
328+
`*beeperdesktopapi.Error`. This contains the `StatusCode`, `*http.Request`, and
324329
`*http.Response` values of the request, as well as the JSON of the error body
325330
(much like other response objects in the SDK).
326331

327332
To handle errors, we recommend that you use the `errors.As` pattern:
328333

329334
```go
330-
_, err := client.Messages.Send(context.TODO(), githubcombeeperbeeperdesktopapigo.MessageSendParams{
331-
ChatID: "!invalid-chat-id",
332-
Text: githubcombeeperbeeperdesktopapigo.String("Test message"),
333-
})
335+
_, err := client.Accounts.List(context.TODO())
334336
if err != nil {
335-
var apierr *githubcombeeperbeeperdesktopapigo.Error
337+
var apierr *beeperdesktopapi.Error
336338
if errors.As(err, &apierr) {
337339
println(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request
338340
println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response
339341
}
340-
panic(err.Error()) // GET "/v0/send-message": 400 Bad Request { ... }
342+
panic(err.Error()) // GET "/v1/accounts": 400 Bad Request { ... }
341343
}
342344
```
343345

@@ -372,20 +374,20 @@ The file name and content-type can be customized by implementing `Name() string`
372374
string` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a
373375
file returned by `os.Open` will be sent with the file name on disk.
374376

375-
We also provide a helper `githubcombeeperbeeperdesktopapigo.File(reader io.Reader, filename string, contentType string)`
377+
We also provide a helper `beeperdesktopapi.File(reader io.Reader, filename string, contentType string)`
376378
which can be used to wrap any `io.Reader` with the appropriate file name and content type.
377379

378380
### Retries
379381

380-
Certain errors will be automatically retried 3 times by default, with a short exponential backoff.
382+
Certain errors will be automatically retried 2 times by default, with a short exponential backoff.
381383
We retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,
382384
and >=500 Internal errors.
383385

384386
You can use the `WithMaxRetries` option to configure or disable this:
385387

386388
```go
387389
// Configure the default for all requests:
388-
client := githubcombeeperbeeperdesktopapigo.NewClient(
390+
client := beeperdesktopapi.NewClient(
389391
option.WithMaxRetries(0), // default is 2
390392
)
391393

@@ -401,11 +403,11 @@ you need to examine response headers, status codes, or other details.
401403
```go
402404
// Create a variable to store the HTTP response
403405
var response *http.Response
404-
accountsResponse, err := client.Accounts.List(context.TODO(), option.WithResponseInto(&response))
406+
accounts, err := client.Accounts.List(context.TODO(), option.WithResponseInto(&response))
405407
if err != nil {
406408
// handle error
407409
}
408-
fmt.Printf("%+v\n", accountsResponse)
410+
fmt.Printf("%+v\n", accounts)
409411

410412
fmt.Printf("Status Code: %d\n", response.StatusCode)
411413
fmt.Printf("Headers: %+#v\n", response.Header)
@@ -446,7 +448,7 @@ or the `option.WithJSONSet()` methods.
446448
params := FooNewParams{
447449
ID: "id_xxxx",
448450
Data: FooNewParamsData{
449-
FirstName: githubcombeeperbeeperdesktopapigo.String("John"),
451+
FirstName: beeperdesktopapi.String("John"),
450452
},
451453
}
452454
client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe"))
@@ -481,7 +483,7 @@ func Logger(req *http.Request, next option.MiddlewareNext) (res *http.Response,
481483
return res, err
482484
}
483485

484-
client := githubcombeeperbeeperdesktopapigo.NewClient(
486+
client := beeperdesktopapi.NewClient(
485487
option.WithMiddleware(Logger),
486488
)
487489
```
@@ -506,7 +508,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
506508

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

509-
We are keen for your feedback; please open an [issue](https://www.github.com/beeper/beeper-desktop-api-go/issues) with questions, bugs, or suggestions.
511+
We are keen for your feedback; please open an [issue](https://www.github.com/beeper/desktop-api-go/issues) with questions, bugs, or suggestions.
510512

511513
## Contributing
512514

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ or products provided by Beeper Desktop, please follow the respective company's s
2020

2121
### Beeper Desktop Terms and Policies
2222

23-
Please contact help@beeper.com for any questions or concerns regarding the security of our services.
23+
Please contact security@beeper.com for any questions or concerns regarding the security of our services.
2424

2525
---
2626

0 commit comments

Comments
 (0)