Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.30.0"
".": "1.31.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 90
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-6458a8bd2021d6d33af7b8b477bd0bdef7270dd2f78fa7891048d519f0d65b22.yml
openapi_spec_hash: 37319ec82d920729dab3ab05ff75f4fc
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-27184418cc06dab3a5bb109116c85fa740df9a140150d2eb9f4c73389905b8fb.yml
openapi_spec_hash: 2aad0a6198ffa00d400bce3b8e41d2e5
config_hash: 2b42d138d85c524e65fa7e205d36cc4a
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Changelog

## 1.31.0 (2026-02-19)

Full Changelog: [v1.30.0...v1.31.0](https://github.com/knocklabs/knock-ruby/compare/v1.30.0...v1.31.0)

### Features

* **api:** api update ([dcc8c6c](https://github.com/knocklabs/knock-ruby/commit/dcc8c6c3e141eb231a053dc35325c8bc639068e8))
* **api:** api update ([2d7ec95](https://github.com/knocklabs/knock-ruby/commit/2d7ec957ddd6b1069ac8aaaa3d7b1c70b456a452))
* **api:** api update ([f78aef3](https://github.com/knocklabs/knock-ruby/commit/f78aef3b059e14786543f033c8a603da8961e7dc))
* **api:** api update ([1cd0625](https://github.com/knocklabs/knock-ruby/commit/1cd0625d5420735e1851b16a7af23fe19b41a394))
* **api:** api update ([3ef0f26](https://github.com/knocklabs/knock-ruby/commit/3ef0f264c2bb77151eca4cd3474c46d318c36749))
* **api:** api update ([1562c35](https://github.com/knocklabs/knock-ruby/commit/1562c35982e64c0870123987b022cb46490be6f8))
* **api:** api update ([1381ed5](https://github.com/knocklabs/knock-ruby/commit/1381ed582a7df881d56425ceb8785664ca6130e9))
* **api:** api update ([0be92ad](https://github.com/knocklabs/knock-ruby/commit/0be92ad96b5f1e973f36fc89fabc2cfdb873cc82))


### Bug Fixes

* **client:** always add content-length to post body, even when empty ([4cd7959](https://github.com/knocklabs/knock-ruby/commit/4cd79592e97e3fafa21d247ab81a72e4bded4f72))
* **client:** loosen json header parsing ([6ab2346](https://github.com/knocklabs/knock-ruby/commit/6ab23468b66b8fdf7de9ebe96d49f1400300c00c))


### Chores

* **docs:** remove www prefix ([5719ce2](https://github.com/knocklabs/knock-ruby/commit/5719ce273d7996e16385184f536facd6fc59c096))
* update mock server docs ([bc0b313](https://github.com/knocklabs/knock-ruby/commit/bc0b313569f751b55f1d3c2ca69a6942c0b012b8))

## 1.30.0 (2026-01-29)

Full Changelog: [v1.29.0...v1.30.0](https://github.com/knocklabs/knock-ruby/compare/v1.29.0...v1.30.0)
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ If you’d like to use the repository from source, you can either install from g
To install via git in your `Gemfile`:

```ruby
gem "knockapi", git: "https://www.github.com/knocklabs/knock-ruby"
gem "knockapi", git: "https://github.com/knocklabs/knock-ruby"
```

Alternatively, reference local copy of the repo:

```bash
$ git clone -- 'https://www.github.com/knocklabs/knock-ruby' '<path-to-repo>'
$ git clone -- 'https://github.com/knocklabs/knock-ruby' '<path-to-repo>'
```

```ruby
Expand All @@ -68,8 +68,8 @@ $ bundle exec rake

Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.

```bash
$ npx prism mock path/to/your/openapi.yml
```sh
$ ./scripts/mock
```

```bash
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
knockapi (1.30.0)
knockapi (1.31.0)
cgi
connection_pool

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "knockapi", "~> 1.30.0"
gem "knockapi", "~> 1.31.0"
```

<!-- x-release-please-end -->
Expand Down
2 changes: 1 addition & 1 deletion lib/knockapi/internal/transport/pooled_net_requester.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def build_request(request, &blk)

case body
in nil
nil
req["content-length"] ||= 0 unless req["transfer-encoding"]
in String
req["content-length"] ||= body.bytesize.to_s unless req["transfer-encoding"]
req.body_stream = Knockapi::Internal::Util::ReadIOAdapter.new(body, &blk)
Expand Down
2 changes: 1 addition & 1 deletion lib/knockapi/internal/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def writable_enum(&blk)
end

# @type [Regexp]
JSON_CONTENT = %r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}
JSON_CONTENT = %r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}
# @type [Regexp]
JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}

Expand Down
4 changes: 2 additions & 2 deletions lib/knockapi/models/audience_add_members_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ class AudienceAddMembersParams < Knockapi::Internal::Type::BaseModel
include Knockapi::Internal::Type::RequestParameters

# @!attribute members
# A list of audience members to add. Limited to 1,000 members per request.
# A list of audience members to add. You can add up to 1,000 members per request.
#
# @return [Array<Knockapi::Models::AudienceAddMembersParams::Member>]
required :members, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::AudienceAddMembersParams::Member] }

# @!method initialize(members:, request_options: {})
# @param members [Array<Knockapi::Models::AudienceAddMembersParams::Member>] A list of audience members to add. Limited to 1,000 members per request.
# @param members [Array<Knockapi::Models::AudienceAddMembersParams::Member>] A list of audience members to add. You can add up to 1,000 members per request.
#
# @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]

Expand Down
8 changes: 6 additions & 2 deletions lib/knockapi/models/audience_remove_members_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ class AudienceRemoveMembersParams < Knockapi::Internal::Type::BaseModel
include Knockapi::Internal::Type::RequestParameters

# @!attribute members
# A list of audience members to remove.
# A list of audience members to remove. You can remove up to 1,000 members per
# request.
#
# @return [Array<Knockapi::Models::AudienceRemoveMembersParams::Member>]
required :members, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::AudienceRemoveMembersParams::Member] }

# @!method initialize(members:, request_options: {})
# @param members [Array<Knockapi::Models::AudienceRemoveMembersParams::Member>] A list of audience members to remove.
# Some parameter documentations has been truncated, see
# {Knockapi::Models::AudienceRemoveMembersParams} for more details.
#
# @param members [Array<Knockapi::Models::AudienceRemoveMembersParams::Member>] A list of audience members to remove. You can remove up to 1,000 members per req
#
# @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]

Expand Down
16 changes: 8 additions & 8 deletions lib/knockapi/models/message_list_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,37 +147,37 @@ module EngagementStatus

class InsertedAt < Knockapi::Internal::Type::BaseModel
# @!attribute gt
# Limits the results to messages inserted after the given date.
# Limits the results to items inserted after the given date.
#
# @return [String, nil]
optional :gt, String

# @!attribute gte
# Limits the results to messages inserted after or on the given date.
# Limits the results to items inserted after or on the given date.
#
# @return [String, nil]
optional :gte, String

# @!attribute lt
# Limits the results to messages inserted before the given date.
# Limits the results to items inserted before the given date.
#
# @return [String, nil]
optional :lt, String

# @!attribute lte
# Limits the results to messages inserted before or on the given date.
# Limits the results to items inserted before or on the given date.
#
# @return [String, nil]
optional :lte, String

# @!method initialize(gt: nil, gte: nil, lt: nil, lte: nil)
# @param gt [String] Limits the results to messages inserted after the given date.
# @param gt [String] Limits the results to items inserted after the given date.
#
# @param gte [String] Limits the results to messages inserted after or on the given date.
# @param gte [String] Limits the results to items inserted after or on the given date.
#
# @param lt [String] Limits the results to messages inserted before the given date.
# @param lt [String] Limits the results to items inserted before the given date.
#
# @param lte [String] Limits the results to messages inserted before or on the given date.
# @param lte [String] Limits the results to items inserted before or on the given date.
end

module Status
Expand Down
16 changes: 8 additions & 8 deletions lib/knockapi/models/object_list_messages_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,37 +148,37 @@ module EngagementStatus

class InsertedAt < Knockapi::Internal::Type::BaseModel
# @!attribute gt
# Limits the results to messages inserted after the given date.
# Limits the results to items inserted after the given date.
#
# @return [String, nil]
optional :gt, String

# @!attribute gte
# Limits the results to messages inserted after or on the given date.
# Limits the results to items inserted after or on the given date.
#
# @return [String, nil]
optional :gte, String

# @!attribute lt
# Limits the results to messages inserted before the given date.
# Limits the results to items inserted before the given date.
#
# @return [String, nil]
optional :lt, String

# @!attribute lte
# Limits the results to messages inserted before or on the given date.
# Limits the results to items inserted before or on the given date.
#
# @return [String, nil]
optional :lte, String

# @!method initialize(gt: nil, gte: nil, lt: nil, lte: nil)
# @param gt [String] Limits the results to messages inserted after the given date.
# @param gt [String] Limits the results to items inserted after the given date.
#
# @param gte [String] Limits the results to messages inserted after or on the given date.
# @param gte [String] Limits the results to items inserted after or on the given date.
#
# @param lt [String] Limits the results to messages inserted before the given date.
# @param lt [String] Limits the results to items inserted before the given date.
#
# @param lte [String] Limits the results to messages inserted before or on the given date.
# @param lte [String] Limits the results to items inserted before or on the given date.
end

module Status
Expand Down
16 changes: 8 additions & 8 deletions lib/knockapi/models/user_list_messages_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,37 +147,37 @@ module EngagementStatus

class InsertedAt < Knockapi::Internal::Type::BaseModel
# @!attribute gt
# Limits the results to messages inserted after the given date.
# Limits the results to items inserted after the given date.
#
# @return [String, nil]
optional :gt, String

# @!attribute gte
# Limits the results to messages inserted after or on the given date.
# Limits the results to items inserted after or on the given date.
#
# @return [String, nil]
optional :gte, String

# @!attribute lt
# Limits the results to messages inserted before the given date.
# Limits the results to items inserted before the given date.
#
# @return [String, nil]
optional :lt, String

# @!attribute lte
# Limits the results to messages inserted before or on the given date.
# Limits the results to items inserted before or on the given date.
#
# @return [String, nil]
optional :lte, String

# @!method initialize(gt: nil, gte: nil, lt: nil, lte: nil)
# @param gt [String] Limits the results to messages inserted after the given date.
# @param gt [String] Limits the results to items inserted after the given date.
#
# @param gte [String] Limits the results to messages inserted after or on the given date.
# @param gte [String] Limits the results to items inserted after or on the given date.
#
# @param lt [String] Limits the results to messages inserted before the given date.
# @param lt [String] Limits the results to items inserted before the given date.
#
# @param lte [String] Limits the results to messages inserted before or on the given date.
# @param lte [String] Limits the results to items inserted before or on the given date.
end

module Status
Expand Down
Loading