knockapi 1.11.0 → 1.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb73648101e7d2bd451a7d998eb5ded40adcd662a9ca06e29ec4f2f1b4c479dc
4
- data.tar.gz: 47715ed958cb260beff0d347ea7e8783a05181e1d34c4394656ba6ac50c3d33a
3
+ metadata.gz: 859757fdcc106f24fdeb9c368910bf51e763ef18996ad2d3336e94df0bbe220d
4
+ data.tar.gz: 1f191c1789ecd593a3c4809b35af51f12ddaedf53de91739c737e4a67947c9ba
5
5
  SHA512:
6
- metadata.gz: 94968e7c435833897b9d5c574f1f2f81556c937661eeaf1f6854802379fddc9bf4e4f70ebb3096fdc84656361b29e70540956ae6c30d355fdd533102c777f559
7
- data.tar.gz: 708aaf055317502fea383da4f0e3350ac35bd08eb07734beffabf71439d46666c67b334eaa5d83afc75f79c83bae241aa949b8d8e8f086257406828f4e352cfa
6
+ metadata.gz: 49a2d3c6f6037d329c3b1fee130ed87d3a11b96e52aa462d66e62fc2414f950b9b52d0c6de6431871a1b95588734fa0bc0f4aacc5ecf3a015d3b7be8fc194d65
7
+ data.tar.gz: 52866301c5f9b0e698fcc9f078fed16182ff86ba646fe05ab04e4df4ce5f7848400ac34692806b13adc8de00a9200e42de490b3a209bb8f921c9338a7cb65c09
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.11.2 (2025-08-24)
4
+
5
+ Full Changelog: [v1.11.1...v1.11.2](https://github.com/knocklabs/knock-ruby/compare/v1.11.1...v1.11.2)
6
+
7
+ ### Chores
8
+
9
+ * add json schema comment for rubocop.yml ([83abcfa](https://github.com/knocklabs/knock-ruby/commit/83abcfa2c17d0495243044a3868ed3e26120c1c3))
10
+
11
+ ## 1.11.1 (2025-08-19)
12
+
13
+ Full Changelog: [v1.11.0...v1.11.1](https://github.com/knocklabs/knock-ruby/compare/v1.11.0...v1.11.1)
14
+
15
+ ### Bug Fixes
16
+
17
+ * bump sorbet version and fix new type errors from the breaking change ([0194974](https://github.com/knocklabs/knock-ruby/commit/0194974b049c8c69ce3749f1bc8086b724a39272))
18
+
3
19
  ## 1.11.0 (2025-08-15)
4
20
 
5
21
  Full Changelog: [v1.10.3...v1.11.0](https://github.com/knocklabs/knock-ruby/compare/v1.10.3...v1.11.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "knockapi", "~> 1.11.0"
20
+ gem "knockapi", "~> 1.11.2"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -193,15 +193,7 @@ module Knockapi
193
193
  end
194
194
 
195
195
  define_sorbet_constant!(:Request) do
196
- T.type_alias do
197
- {
198
- method: Symbol,
199
- url: URI::Generic,
200
- headers: T::Hash[String, String],
201
- body: T.anything,
202
- deadline: Float
203
- }
204
- end
196
+ T.type_alias { {method: Symbol, url: URI::Generic, headers: T::Hash[String, String], body: T.anything, deadline: Float} }
205
197
  end
206
198
  end
207
199
  end
@@ -64,14 +64,7 @@ module Knockapi
64
64
  setter = :"#{name_sym}="
65
65
  api_name = info.fetch(:api_name, name_sym)
66
66
  nilable = info.fetch(:nil?, false)
67
- const = if required && !nilable
68
- info.fetch(
69
- :const,
70
- Knockapi::Internal::OMIT
71
- )
72
- else
73
- Knockapi::Internal::OMIT
74
- end
67
+ const = required && !nilable ? info.fetch(:const, Knockapi::Internal::OMIT) : Knockapi::Internal::OMIT
75
68
 
76
69
  [name_sym, setter].each { undef_method(_1) } if known_fields.key?(name_sym)
77
70
 
@@ -244,7 +244,7 @@ module Knockapi
244
244
  #
245
245
  # @return [String]
246
246
  def uri_origin(uri)
247
- "#{uri.scheme}://#{uri.host}#{uri.port == uri.default_port ? '' : ":#{uri.port}"}"
247
+ "#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}"
248
248
  end
249
249
 
250
250
  # @api private
@@ -11,10 +11,7 @@ module Knockapi
11
11
  # A list of audience members to remove.
12
12
  #
13
13
  # @return [Array<Knockapi::Models::AudienceRemoveMembersParams::Member>]
14
- required :members,
15
- -> {
16
- Knockapi::Internal::Type::ArrayOf[Knockapi::AudienceRemoveMembersParams::Member]
17
- }
14
+ required :members, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::AudienceRemoveMembersParams::Member] }
18
15
 
19
16
  # @!method initialize(members:, request_options: {})
20
17
  # @param members [Array<Knockapi::Models::AudienceRemoveMembersParams::Member>] A list of audience members to remove.
@@ -18,10 +18,7 @@ module Knockapi
18
18
  # Limits the results to messages with the given delivery status.
19
19
  #
20
20
  # @return [Symbol, Knockapi::Models::Channels::BulkUpdateMessageStatusParams::DeliveryStatus, nil]
21
- optional :delivery_status,
22
- enum: -> {
23
- Knockapi::Channels::BulkUpdateMessageStatusParams::DeliveryStatus
24
- }
21
+ optional :delivery_status, enum: -> { Knockapi::Channels::BulkUpdateMessageStatusParams::DeliveryStatus }
25
22
 
26
23
  # @!attribute engagement_status
27
24
  # Limits the results to messages with the given engagement status.
@@ -30,9 +30,7 @@ module Knockapi
30
30
  #
31
31
  # @return [Array<Symbol, Knockapi::Models::ObjectListMessagesParams::EngagementStatus>, nil]
32
32
  optional :engagement_status,
33
- -> {
34
- Knockapi::Internal::Type::ArrayOf[enum: Knockapi::ObjectListMessagesParams::EngagementStatus]
35
- }
33
+ -> { Knockapi::Internal::Type::ArrayOf[enum: Knockapi::ObjectListMessagesParams::EngagementStatus] }
36
34
 
37
35
  # @!attribute inserted_at
38
36
  #
@@ -24,9 +24,7 @@ module Knockapi
24
24
  #
25
25
  # @return [Array<Symbol, Knockapi::Models::ObjectListSubscriptionsParams::Include>, nil]
26
26
  optional :include,
27
- -> {
28
- Knockapi::Internal::Type::ArrayOf[enum: Knockapi::ObjectListSubscriptionsParams::Include]
29
- }
27
+ -> { Knockapi::Internal::Type::ArrayOf[enum: Knockapi::ObjectListSubscriptionsParams::Include] }
30
28
 
31
29
  # @!attribute mode
32
30
  # Mode of the request. `recipient` to list the objects that the provided object is
@@ -12,9 +12,7 @@ module Knockapi
12
12
  #
13
13
  # @return [Hash{Symbol=>Knockapi::Models::Recipients::PushChannelData, Knockapi::Models::Recipients::OneSignalChannelData, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}, nil]
14
14
  optional :channel_data,
15
- -> {
16
- Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::InlineChannelDataRequestItem]
17
- }
15
+ -> { Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::InlineChannelDataRequestItem] }
18
16
 
19
17
  # @!attribute locale
20
18
  # The locale of the object. Used for
@@ -29,10 +27,7 @@ module Knockapi
29
27
  # rather than replacing them.
30
28
  #
31
29
  # @return [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil]
32
- optional :preferences,
33
- -> {
34
- Knockapi::Internal::Type::HashOf[Knockapi::Recipients::PreferenceSetRequest]
35
- }
30
+ optional :preferences, -> { Knockapi::Internal::Type::HashOf[Knockapi::Recipients::PreferenceSetRequest] }
36
31
 
37
32
  # @!attribute timezone
38
33
  # The timezone of the object. Must be a
@@ -13,9 +13,7 @@ module Knockapi
13
13
  #
14
14
  # @return [Array<Knockapi::Models::Objects::BulkAddSubscriptionsParams::Subscription>]
15
15
  required :subscriptions,
16
- -> {
17
- Knockapi::Internal::Type::ArrayOf[Knockapi::Objects::BulkAddSubscriptionsParams::Subscription]
18
- }
16
+ -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Objects::BulkAddSubscriptionsParams::Subscription] }
19
17
 
20
18
  # @!method initialize(subscriptions:, request_options: {})
21
19
  # @param subscriptions [Array<Knockapi::Models::Objects::BulkAddSubscriptionsParams::Subscription>] A list of subscriptions.
@@ -9,9 +9,7 @@ module Knockapi
9
9
  #
10
10
  # @return [Array<Knockapi::Models::Recipients::DiscordChannelData::Connection::DiscordChannelConnection, Knockapi::Models::Recipients::DiscordChannelData::Connection::DiscordIncomingWebhookConnection>]
11
11
  required :connections,
12
- -> {
13
- Knockapi::Internal::Type::ArrayOf[union: Knockapi::Recipients::DiscordChannelData::Connection]
14
- }
12
+ -> { Knockapi::Internal::Type::ArrayOf[union: Knockapi::Recipients::DiscordChannelData::Connection] }
15
13
 
16
14
  # @!method initialize(connections:)
17
15
  # Discord channel data.
@@ -27,9 +25,7 @@ module Knockapi
27
25
  variant -> { Knockapi::Recipients::DiscordChannelData::Connection::DiscordChannelConnection }
28
26
 
29
27
  # Discord incoming webhook connection.
30
- variant -> {
31
- Knockapi::Recipients::DiscordChannelData::Connection::DiscordIncomingWebhookConnection
32
- }
28
+ variant -> { Knockapi::Recipients::DiscordChannelData::Connection::DiscordIncomingWebhookConnection }
33
29
 
34
30
  class DiscordChannelConnection < Knockapi::Internal::Type::BaseModel
35
31
  # @!attribute channel_id
@@ -50,9 +46,7 @@ module Knockapi
50
46
  #
51
47
  # @return [Knockapi::Models::Recipients::DiscordChannelData::Connection::DiscordIncomingWebhookConnection::IncomingWebhook]
52
48
  required :incoming_webhook,
53
- -> {
54
- Knockapi::Recipients::DiscordChannelData::Connection::DiscordIncomingWebhookConnection::IncomingWebhook
55
- }
49
+ -> { Knockapi::Recipients::DiscordChannelData::Connection::DiscordIncomingWebhookConnection::IncomingWebhook }
56
50
 
57
51
  # @!method initialize(incoming_webhook:)
58
52
  # Discord incoming webhook connection.
@@ -9,9 +9,7 @@ module Knockapi
9
9
  #
10
10
  # @return [Array<Knockapi::Models::Recipients::MsTeamsChannelData::Connection::MsTeamsTokenConnection, Knockapi::Models::Recipients::MsTeamsChannelData::Connection::MsTeamsIncomingWebhookConnection>]
11
11
  required :connections,
12
- -> {
13
- Knockapi::Internal::Type::ArrayOf[union: Knockapi::Recipients::MsTeamsChannelData::Connection]
14
- }
12
+ -> { Knockapi::Internal::Type::ArrayOf[union: Knockapi::Recipients::MsTeamsChannelData::Connection] }
15
13
 
16
14
  # @!attribute ms_teams_tenant_id
17
15
  # Microsoft Teams tenant ID.
@@ -34,9 +32,7 @@ module Knockapi
34
32
  variant -> { Knockapi::Recipients::MsTeamsChannelData::Connection::MsTeamsTokenConnection }
35
33
 
36
34
  # Microsoft Teams incoming webhook connection.
37
- variant -> {
38
- Knockapi::Recipients::MsTeamsChannelData::Connection::MsTeamsIncomingWebhookConnection
39
- }
35
+ variant -> { Knockapi::Recipients::MsTeamsChannelData::Connection::MsTeamsIncomingWebhookConnection }
40
36
 
41
37
  class MsTeamsTokenConnection < Knockapi::Internal::Type::BaseModel
42
38
  # @!attribute ms_teams_channel_id
@@ -81,9 +77,7 @@ module Knockapi
81
77
  #
82
78
  # @return [Knockapi::Models::Recipients::MsTeamsChannelData::Connection::MsTeamsIncomingWebhookConnection::IncomingWebhook]
83
79
  required :incoming_webhook,
84
- -> {
85
- Knockapi::Recipients::MsTeamsChannelData::Connection::MsTeamsIncomingWebhookConnection::IncomingWebhook
86
- }
80
+ -> { Knockapi::Recipients::MsTeamsChannelData::Connection::MsTeamsIncomingWebhookConnection::IncomingWebhook }
87
81
 
88
82
  # @!method initialize(incoming_webhook:)
89
83
  # Microsoft Teams incoming webhook connection.
@@ -60,9 +60,7 @@ module Knockapi
60
60
  variant Knockapi::Internal::Type::Boolean
61
61
 
62
62
  # The settings object for a workflow or category, where you can specify channel types or conditions.
63
- variant -> {
64
- Knockapi::Recipients::PreferenceSet::Category::PreferenceSetWorkflowCategorySettingObject
65
- }
63
+ variant -> { Knockapi::Recipients::PreferenceSet::Category::PreferenceSetWorkflowCategorySettingObject }
66
64
 
67
65
  class PreferenceSetWorkflowCategorySettingObject < Knockapi::Internal::Type::BaseModel
68
66
  # @!attribute channel_types
@@ -97,9 +95,7 @@ module Knockapi
97
95
  variant Knockapi::Internal::Type::Boolean
98
96
 
99
97
  # The settings object for a workflow or category, where you can specify channel types or conditions.
100
- variant -> {
101
- Knockapi::Recipients::PreferenceSet::Workflow::PreferenceSetWorkflowCategorySettingObject
102
- }
98
+ variant -> { Knockapi::Recipients::PreferenceSet::Workflow::PreferenceSetWorkflowCategorySettingObject }
103
99
 
104
100
  class PreferenceSetWorkflowCategorySettingObject < Knockapi::Internal::Type::BaseModel
105
101
  # @!attribute channel_types
@@ -76,9 +76,7 @@ module Knockapi
76
76
  variant Knockapi::Internal::Type::Boolean
77
77
 
78
78
  # The settings object for a workflow or category, where you can specify channel types or conditions.
79
- variant -> {
80
- Knockapi::Recipients::PreferenceSetRequest::Category::PreferenceSetWorkflowCategorySettingObject
81
- }
79
+ variant -> { Knockapi::Recipients::PreferenceSetRequest::Category::PreferenceSetWorkflowCategorySettingObject }
82
80
 
83
81
  class PreferenceSetWorkflowCategorySettingObject < Knockapi::Internal::Type::BaseModel
84
82
  # @!attribute channel_types
@@ -113,9 +111,7 @@ module Knockapi
113
111
  variant Knockapi::Internal::Type::Boolean
114
112
 
115
113
  # The settings object for a workflow or category, where you can specify channel types or conditions.
116
- variant -> {
117
- Knockapi::Recipients::PreferenceSetRequest::Workflow::PreferenceSetWorkflowCategorySettingObject
118
- }
114
+ variant -> { Knockapi::Recipients::PreferenceSetRequest::Workflow::PreferenceSetWorkflowCategorySettingObject }
119
115
 
120
116
  class PreferenceSetWorkflowCategorySettingObject < Knockapi::Internal::Type::BaseModel
121
117
  # @!attribute channel_types
@@ -9,9 +9,7 @@ module Knockapi
9
9
  #
10
10
  # @return [Array<Knockapi::Models::Recipients::SlackChannelData::Connection::SlackTokenConnection, Knockapi::Models::Recipients::SlackChannelData::Connection::SlackIncomingWebhookConnection>]
11
11
  required :connections,
12
- -> {
13
- Knockapi::Internal::Type::ArrayOf[union: Knockapi::Recipients::SlackChannelData::Connection]
14
- }
12
+ -> { Knockapi::Internal::Type::ArrayOf[union: Knockapi::Recipients::SlackChannelData::Connection] }
15
13
 
16
14
  # @!attribute token
17
15
  # A Slack connection token.
@@ -30,9 +30,7 @@ module Knockapi
30
30
  #
31
31
  # @return [Array<Symbol, Knockapi::Models::UserListMessagesParams::EngagementStatus>, nil]
32
32
  optional :engagement_status,
33
- -> {
34
- Knockapi::Internal::Type::ArrayOf[enum: Knockapi::UserListMessagesParams::EngagementStatus]
35
- }
33
+ -> { Knockapi::Internal::Type::ArrayOf[enum: Knockapi::UserListMessagesParams::EngagementStatus] }
36
34
 
37
35
  # @!attribute inserted_at
38
36
  #
@@ -62,10 +60,7 @@ module Knockapi
62
60
  # Limits the results to messages with the given delivery status.
63
61
  #
64
62
  # @return [Array<Symbol, Knockapi::Models::UserListMessagesParams::Status>, nil]
65
- optional :status,
66
- -> {
67
- Knockapi::Internal::Type::ArrayOf[enum: Knockapi::UserListMessagesParams::Status]
68
- }
63
+ optional :status, -> { Knockapi::Internal::Type::ArrayOf[enum: Knockapi::UserListMessagesParams::Status] }
69
64
 
70
65
  # @!attribute tenant
71
66
  # Limits the results to items with the corresponding tenant.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Knockapi
4
- VERSION = "1.11.0"
4
+ VERSION = "1.11.2"
5
5
  end
@@ -59,10 +59,10 @@ module Knockapi
59
59
  end
60
60
 
61
61
  class APIConnectionError < Knockapi::Errors::APIError
62
- sig { void }
62
+ sig { returns(NilClass) }
63
63
  attr_accessor :status
64
64
 
65
- sig { void }
65
+ sig { returns(NilClass) }
66
66
  attr_accessor :body
67
67
 
68
68
  # @api private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knockapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.0
4
+ version: 1.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Knock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-08-18 00:00:00.000000000 Z
11
+ date: 2025-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool