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 .github/workflows/publish-gem.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow is triggered when a GitHub release is created.
# It can also be run manually to re-publish to rubygems.org in case it failed for some reason.
# You can run this workflow by navigating to https://www.github.com/knocklabs/knock-python/actions/workflows/publish-gem.yml
# You can run this workflow by navigating to https://www.github.com/knocklabs/knock-ruby/actions/workflows/publish-gem.yml
name: Publish Gem
on:
workflow_dispatch:
Expand Down
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.6.0"
".": "1.7.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 89
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-e5a7933b414d403d082b34db140fc5b8dca9a5ea3ae322f640b0f9f055c47288.yml
openapi_spec_hash: 3740dc4d5c1f5a0c9ee6de9e40931fd4
config_hash: 2ae8965d371a03bd30c6a56819c04cf2
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-ba629bb393f43737dec9702d5610ac4b5696e58f58177d1d98f4f832c9553b76.yml
openapi_spec_hash: abeac01a8a235ea114e466d4f06e70ad
config_hash: b4c547c1d4c8cd0834bc793ddf5388ee
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 1.7.0 (2025-06-12)

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

### Features

* **api:** api update ([ccc6df0](https://github.com/knocklabs/knock-ruby/commit/ccc6df0d616d93198a605ec4c986e03369a8843b))
* **api:** api update ([fddf322](https://github.com/knocklabs/knock-ruby/commit/fddf3226958f8a212c5c3fa4d0dc8f72c01dcbe5))


### Chores

* **ci:** link to correct github repo ([acd8f88](https://github.com/knocklabs/knock-ruby/commit/acd8f8882a660c449b45113b848944327382f1a0))

## 1.6.0 (2025-06-06)

Full Changelog: [v1.5.0...v1.6.0](https://github.com/knocklabs/knock-ruby/compare/v1.5.0...v1.6.0)
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.6.0)
knockapi (1.7.0)
connection_pool

GEM
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.6.0"
gem "knockapi", "~> 1.7.0"
```

<!-- x-release-please-end -->
Expand Down
2 changes: 2 additions & 0 deletions lib/knockapi/models/identify_user_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ class IdentifyUserRequest < Knockapi::Internal::Type::BaseModel

# @!attribute preferences
# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
#
# @return [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil]
optional :preferences,
Expand Down
2 changes: 2 additions & 0 deletions lib/knockapi/models/inline_identify_user_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ class InlineIdentifyUserRequest < Knockapi::Internal::Type::BaseModel

# @!attribute preferences
# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
#
# @return [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil]
optional :preferences,
Expand Down
5 changes: 5 additions & 0 deletions lib/knockapi/models/inline_object_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,18 @@ class InlineObjectRequest < Knockapi::Internal::Type::BaseModel

# @!attribute preferences
# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
#
# @return [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil]
optional :preferences,
-> { Knockapi::Internal::Type::HashOf[Knockapi::Recipients::PreferenceSetRequest] },
nil?: true

# @!method initialize(id:, collection:, channel_data: nil, created_at: nil, preferences: nil)
# Some parameter documentations has been truncated, see
# {Knockapi::Models::InlineObjectRequest} for more details.
#
# A custom [Object](/concepts/objects) entity which belongs to a collection.
#
# @param id [String] Unique identifier for the object.
Expand Down
2 changes: 2 additions & 0 deletions lib/knockapi/models/object_set_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class ObjectSetParams < Knockapi::Internal::Type::BaseModel

# @!attribute preferences
# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
#
# @return [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil]
optional :preferences,
Expand Down
5 changes: 5 additions & 0 deletions lib/knockapi/models/objects/bulk_set_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,18 @@ class Object < Knockapi::Internal::Type::BaseModel

# @!attribute preferences
# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
#
# @return [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil]
optional :preferences,
-> { Knockapi::Internal::Type::HashOf[Knockapi::Recipients::PreferenceSetRequest] },
nil?: true

# @!method initialize(id:, channel_data: nil, created_at: nil, preferences: nil)
# Some parameter documentations has been truncated, see
# {Knockapi::Models::Objects::BulkSetParams::Object} for more details.
#
# A custom [Object](/concepts/objects) entity which belongs to a collection.
#
# @param id [String] Unique identifier for the object.
Expand Down
5 changes: 5 additions & 0 deletions lib/knockapi/models/tenant_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class TenantRequest < Knockapi::Internal::Type::BaseModel

# @!attribute preferences
# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
#
# @return [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil]
optional :preferences,
Expand All @@ -34,6 +36,9 @@ class TenantRequest < Knockapi::Internal::Type::BaseModel
optional :settings, -> { Knockapi::TenantRequest::Settings }

# @!method initialize(id:, channel_data: nil, preferences: nil, settings: nil)
# Some parameter documentations has been truncated, see
# {Knockapi::Models::TenantRequest} for more details.
#
# A tenant to be set in the system. You can supply any additional properties on
# the tenant object.
#
Expand Down
15 changes: 8 additions & 7 deletions lib/knockapi/resources/users/bulk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ module Knockapi
module Resources
class Users
class Bulk
# Deletes multiple users in a single operation. Accepts up to 100 user IDs to
# delete and returns a bulk operation that can be queried for progress.
# Permanently deletes up to 1,000 users at a time.
#
# @overload delete(user_ids:, request_options: {})
#
Expand All @@ -28,8 +27,8 @@ def delete(params)
end

# Identifies multiple users in a single operation. Allows creating or updating up
# to 100 users in a single batch with various properties, preferences, and channel
# data.
# to 1,000 users in a single batch with various properties, preferences, and
# channel data.
#
# @overload identify(users:, request_options: {})
#
Expand All @@ -51,9 +50,11 @@ def identify(params)
)
end

# Sets preferences for multiple users in a single operation. Supports either
# setting the same preferences for multiple users or specific preferences for each
# user.
# Bulk sets the preferences for up to 1,000 users at a time. The preference
# set `:id` can be either `default` or a `tenant.id`. Learn more
# about [per-tenant preferences](/preferences/tenant-preferences). Note that this
# is a destructive operation and will replace any existing users' preferences with
# the preferences sent.
#
# @overload set_preferences(preferences:, user_ids:, request_options: {})
#
Expand Down
2 changes: 1 addition & 1 deletion lib/knockapi/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Knockapi
VERSION = "1.6.0"
VERSION = "1.7.0"
end
4 changes: 4 additions & 0 deletions rbi/knockapi/models/identify_user_request.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ module Knockapi
attr_accessor :phone_number

# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
sig do
returns(
T.nilable(T::Hash[Symbol, Knockapi::Recipients::PreferenceSetRequest])
Expand Down Expand Up @@ -118,6 +120,8 @@ module Knockapi
# user (required for SMS channels).
phone_number: nil,
# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
preferences: nil,
# The timezone of the user. Must be a
# valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
Expand Down
4 changes: 4 additions & 0 deletions rbi/knockapi/models/inline_identify_user_request.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ module Knockapi
attr_accessor :phone_number

# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
sig do
returns(
T.nilable(T::Hash[Symbol, Knockapi::Recipients::PreferenceSetRequest])
Expand Down Expand Up @@ -129,6 +131,8 @@ module Knockapi
# user (required for SMS channels).
phone_number: nil,
# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
preferences: nil,
# The timezone of the user. Must be a
# valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
Expand Down
4 changes: 4 additions & 0 deletions rbi/knockapi/models/inline_object_request.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ module Knockapi
attr_accessor :created_at

# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
sig do
returns(
T.nilable(T::Hash[Symbol, Knockapi::Recipients::PreferenceSetRequest])
Expand Down Expand Up @@ -85,6 +87,8 @@ module Knockapi
# Timestamp when the resource was created.
created_at: nil,
# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
preferences: nil
)
end
Expand Down
4 changes: 4 additions & 0 deletions rbi/knockapi/models/object_set_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ module Knockapi
attr_accessor :locale

# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
sig do
returns(
T.nilable(T::Hash[Symbol, Knockapi::Recipients::PreferenceSetRequest])
Expand Down Expand Up @@ -102,6 +104,8 @@ module Knockapi
# [message localization](/concepts/translations).
locale: nil,
# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
preferences: nil,
# The timezone of the object. Must be a
# valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
Expand Down
4 changes: 4 additions & 0 deletions rbi/knockapi/models/objects/bulk_set_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ module Knockapi
attr_accessor :created_at

# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
sig do
returns(
T.nilable(
Expand Down Expand Up @@ -121,6 +123,8 @@ module Knockapi
# Timestamp when the resource was created.
created_at: nil,
# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
preferences: nil
)
end
Expand Down
4 changes: 4 additions & 0 deletions rbi/knockapi/models/tenant_request.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ module Knockapi
attr_accessor :channel_data

# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
sig do
returns(
T.nilable(T::Hash[Symbol, Knockapi::Recipients::PreferenceSetRequest])
Expand Down Expand Up @@ -80,6 +82,8 @@ module Knockapi
# A request to set channel data for a type of channel inline.
channel_data: nil,
# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
preferences: nil,
# The settings for the tenant. Includes branding and preference set.
settings: nil
Expand Down
2 changes: 2 additions & 0 deletions rbi/knockapi/resources/objects.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ module Knockapi
# [message localization](/concepts/translations).
locale: nil,
# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
preferences: nil,
# The timezone of the object. Must be a
# valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
Expand Down
2 changes: 2 additions & 0 deletions rbi/knockapi/resources/users.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ module Knockapi
# user (required for SMS channels).
phone_number: nil,
# Inline set preferences for a recipient, where the key is the preference set id.
# Preferences that are set inline will be merged into any existing preferences
# rather than replacing them.
preferences: nil,
# The timezone of the user. Must be a
# valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
Expand Down
15 changes: 8 additions & 7 deletions rbi/knockapi/resources/users/bulk.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ module Knockapi
module Resources
class Users
class Bulk
# Deletes multiple users in a single operation. Accepts up to 100 user IDs to
# delete and returns a bulk operation that can be queried for progress.
# Permanently deletes up to 1,000 users at a time.
sig do
params(
user_ids: T::Array[String],
Expand All @@ -20,8 +19,8 @@ module Knockapi
end

# Identifies multiple users in a single operation. Allows creating or updating up
# to 100 users in a single batch with various properties, preferences, and channel
# data.
# to 1,000 users in a single batch with various properties, preferences, and
# channel data.
sig do
params(
users: T::Array[Knockapi::InlineIdentifyUserRequest::OrHash],
Expand All @@ -35,9 +34,11 @@ module Knockapi
)
end

# Sets preferences for multiple users in a single operation. Supports either
# setting the same preferences for multiple users or specific preferences for each
# user.
# Bulk sets the preferences for up to 1,000 users at a time. The preference
# set `:id` can be either `default` or a `tenant.id`. Learn more
# about [per-tenant preferences](/preferences/tenant-preferences). Note that this
# is a destructive operation and will replace any existing users' preferences with
# the preferences sent.
sig do
params(
preferences: Knockapi::Recipients::PreferenceSetRequest::OrHash,
Expand Down