knockapi 1.11.0 → 1.11.1
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 +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/knockapi/internal/transport/pooled_net_requester.rb +1 -9
- data/lib/knockapi/internal/type/base_model.rb +1 -8
- data/lib/knockapi/internal/util.rb +1 -1
- data/lib/knockapi/models/audience_remove_members_params.rb +1 -4
- data/lib/knockapi/models/channels/bulk_update_message_status_params.rb +1 -4
- data/lib/knockapi/models/object_list_messages_params.rb +1 -3
- data/lib/knockapi/models/object_list_subscriptions_params.rb +1 -3
- data/lib/knockapi/models/object_set_params.rb +2 -7
- data/lib/knockapi/models/objects/bulk_add_subscriptions_params.rb +1 -3
- data/lib/knockapi/models/recipients/discord_channel_data.rb +3 -9
- data/lib/knockapi/models/recipients/ms_teams_channel_data.rb +3 -9
- data/lib/knockapi/models/recipients/preference_set.rb +2 -6
- data/lib/knockapi/models/recipients/preference_set_request.rb +2 -6
- data/lib/knockapi/models/recipients/slack_channel_data.rb +1 -3
- data/lib/knockapi/models/user_list_messages_params.rb +2 -7
- data/lib/knockapi/version.rb +1 -1
- data/rbi/knockapi/errors.rbi +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d12a329bbc605a270487388dd768fdaf32d6ea55a9beaecb84be75032db59e4a
|
4
|
+
data.tar.gz: 7c2208d2f1b89d5416d5a4e02e6c5257dfcde6ed07228d59cffb5bb054d1b9b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a72efe89eace5b0d29ce990709293ce186536c8c530f6ec8545a51c4f2f449d6b17d32b2711b619f752191efd8246d1f1f006a3ae7e539948581928e8e68924
|
7
|
+
data.tar.gz: 0e538e699dd375eff82b2ee5e8addf6e05496fca38f54266f28ef6fed6054a656f8ca2fe0ff763f0031d6c56dc69d5e6a12226eef1a8902dea0c8b7f20cf538c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.11.1 (2025-08-19)
|
4
|
+
|
5
|
+
Full Changelog: [v1.11.0...v1.11.1](https://github.com/knocklabs/knock-ruby/compare/v1.11.0...v1.11.1)
|
6
|
+
|
7
|
+
### Bug Fixes
|
8
|
+
|
9
|
+
* bump sorbet version and fix new type errors from the breaking change ([0194974](https://github.com/knocklabs/knock-ruby/commit/0194974b049c8c69ce3749f1bc8086b724a39272))
|
10
|
+
|
3
11
|
## 1.11.0 (2025-08-15)
|
4
12
|
|
5
13
|
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
@@ -193,15 +193,7 @@ module Knockapi
|
|
193
193
|
end
|
194
194
|
|
195
195
|
define_sorbet_constant!(:Request) do
|
196
|
-
T.type_alias
|
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 =
|
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
|
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.
|
data/lib/knockapi/version.rb
CHANGED
data/rbi/knockapi/errors.rbi
CHANGED
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.
|
4
|
+
version: 1.11.1
|
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-
|
11
|
+
date: 2025-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|