diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3d2ac0b..10f3091 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0" + ".": "0.2.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 325712c..adde7c3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/beeper%2Fbeeper-desktop-api-0763b61997721da6f4514241bf0f7bb5f7a88c7298baf0f1b2d58036aaf7e2f1.yml -openapi_spec_hash: 5158475919c04bb52fb03c6a4582188d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/beeper%2Fbeeper-desktop-api-bea2e5f3b01053a66261a824c75c2640856d0ba00ad795ab71734c4ab9ae33b0.yml +openapi_spec_hash: d766f6e344c12ca6d23e6ef6713b38c4 config_hash: 5fa7ded4bfdffe4cc1944a819da87f9f diff --git a/CHANGELOG.md b/CHANGELOG.md index 941429c..2c5e2a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 0.2.0 (2025-11-12) + +Full Changelog: [v0.1.0...v0.2.0](https://github.com/beeper/desktop-api-go/compare/v0.1.0...v0.2.0) + +### Features + +* **api:** add `description` field to chats, make `title` optional ([fbf0470](https://github.com/beeper/desktop-api-go/commit/fbf047029f11c57542963ed3446ab191ae738643)) + + +### Chores + +* bump gjson version ([1194594](https://github.com/beeper/desktop-api-go/commit/1194594b4e0744f59f66e0cda1929e75eb8973a2)) +* **internal:** grammar fix (it's -> its) ([60171f3](https://github.com/beeper/desktop-api-go/commit/60171f3c6eed029a5689bc8ac58656baf63d88f3)) + ## 0.1.0 (2025-10-16) Full Changelog: [v0.0.1...v0.1.0](https://github.com/beeper/desktop-api-go/compare/v0.0.1...v0.1.0) diff --git a/README.md b/README.md index 7f9cc24..8010735 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Or to pin the version: ```sh -go get -u 'github.com/beeper/desktop-api-go@v0.1.0' +go get -u 'github.com/beeper/desktop-api-go@v0.2.0' ``` @@ -127,7 +127,7 @@ custom := param.Override[beeperdesktopapi.FooParams](12) ### Request unions -Unions are represented as a struct with fields prefixed by "Of" for each of it's variants, +Unions are represented as a struct with fields prefixed by "Of" for each of its variants, only one field can be non-zero. The non-zero field will be serialized. Sub-properties of the union can be accessed via methods on the union struct. diff --git a/chat.go b/chat.go index 83f17bb..8482238 100644 --- a/chat.go +++ b/chat.go @@ -141,19 +141,19 @@ type Chat struct { Network string `json:"network,required"` // Chat participants information. Participants ChatParticipants `json:"participants,required"` - // Display title of the chat as computed by the client/server. - Title string `json:"title,required"` // Chat type: 'single' for direct messages, 'group' for group chats. // // Any of "single", "group". Type ChatType `json:"type,required"` // Number of unread messages. UnreadCount int64 `json:"unreadCount,required"` + // Description of the chat. + Description string `json:"description,nullable"` // True if chat is archived. IsArchived bool `json:"isArchived"` - // True if chat notifications are muted. + // True if the chat is muted. IsMuted bool `json:"isMuted"` - // True if chat is pinned. + // True if the chat is pinned. IsPinned bool `json:"isPinned"` // Timestamp of last activity. LastActivity time.Time `json:"lastActivity" format:"date-time"` @@ -161,21 +161,24 @@ type Chat struct { LastReadMessageSortKey string `json:"lastReadMessageSortKey"` // Local chat ID specific to this Beeper Desktop installation. LocalChatID string `json:"localChatID,nullable"` + // Display title of the chat. + Title string `json:"title,nullable"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field AccountID respjson.Field Network respjson.Field Participants respjson.Field - Title respjson.Field Type respjson.Field UnreadCount respjson.Field + Description respjson.Field IsArchived respjson.Field IsMuted respjson.Field IsPinned respjson.Field LastActivity respjson.Field LastReadMessageSortKey respjson.Field LocalChatID respjson.Field + Title respjson.Field ExtraFields map[string]respjson.Field raw string } `json:"-"` diff --git a/go.mod b/go.mod index bcc31c4..24af450 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/beeper/desktop-api-go go 1.22 require ( - github.com/tidwall/gjson v1.14.4 + github.com/tidwall/gjson v1.18.0 github.com/tidwall/sjson v1.2.5 ) diff --git a/go.sum b/go.sum index a70a5e0..32ba293 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= -github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= +github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= diff --git a/internal/version.go b/internal/version.go index 02eac73..774c6c4 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "0.1.0" // x-release-please-version +const PackageVersion = "0.2.0" // x-release-please-version diff --git a/packages/respjson/respjson.go b/packages/respjson/respjson.go index cc0088c..9e61c5c 100644 --- a/packages/respjson/respjson.go +++ b/packages/respjson/respjson.go @@ -5,7 +5,7 @@ package respjson // Use [Field.Valid] to check if an optional value was null or omitted. // // A Field will always occur in the following structure, where it -// mirrors the original field in it's parent struct: +// mirrors the original field in its parent struct: // // type ExampleObject struct { // Foo bool `json:"foo"`