knockapi 1.1.0 → 1.2.0
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 +20 -0
- data/README.md +1 -1
- data/lib/knockapi/internal/type/array_of.rb +8 -0
- data/lib/knockapi/internal/type/base_model.rb +7 -0
- data/lib/knockapi/internal/type/boolean.rb +8 -0
- data/lib/knockapi/internal/type/enum.rb +12 -0
- data/lib/knockapi/internal/type/file_input.rb +7 -0
- data/lib/knockapi/internal/type/hash_of.rb +8 -0
- data/lib/knockapi/internal/type/union.rb +12 -0
- data/lib/knockapi/internal/type/unknown.rb +8 -0
- data/lib/knockapi/internal/util.rb +45 -0
- data/lib/knockapi/internal.rb +3 -0
- data/lib/knockapi/models/inline_tenant_request.rb +0 -4
- data/lib/knockapi/models/message_delivery_log.rb +0 -8
- data/lib/knockapi/models/message_get_content_response.rb +0 -21
- data/lib/knockapi/models/message_list_params.rb +5 -2
- data/lib/knockapi/models/messages/batch_get_content_response.rb +0 -21
- data/lib/knockapi/models/object_list_messages_params.rb +5 -2
- data/lib/knockapi/models/recipient.rb +0 -4
- data/lib/knockapi/models/recipient_reference.rb +0 -4
- data/lib/knockapi/models/recipient_request.rb +0 -4
- data/lib/knockapi/models/recipients/channel_data.rb +0 -12
- data/lib/knockapi/models/recipients/channel_data_request.rb +0 -12
- data/lib/knockapi/models/recipients/discord_channel_data.rb +0 -9
- data/lib/knockapi/models/recipients/inline_channel_data_request.rb +0 -12
- data/lib/knockapi/models/recipients/ms_teams_channel_data.rb +0 -9
- data/lib/knockapi/models/recipients/preference_set.rb +0 -18
- data/lib/knockapi/models/recipients/preference_set_channel_types.rb +0 -24
- data/lib/knockapi/models/recipients/preference_set_request.rb +0 -18
- data/lib/knockapi/models/recipients/slack_channel_data.rb +0 -9
- data/lib/knockapi/models/user_list_messages_params.rb +5 -2
- data/lib/knockapi/models/users/feed_list_items_response.rb +0 -9
- data/lib/knockapi/models.rb +30 -19
- data/lib/knockapi/version.rb +1 -1
- data/rbi/knockapi/internal/type/array_of.rbi +6 -0
- data/rbi/knockapi/internal/type/base_model.rbi +5 -0
- data/rbi/knockapi/internal/type/boolean.rbi +6 -0
- data/rbi/knockapi/internal/type/enum.rbi +5 -0
- data/rbi/knockapi/internal/type/file_input.rbi +5 -0
- data/rbi/knockapi/internal/type/hash_of.rbi +6 -0
- data/rbi/knockapi/internal/type/union.rbi +5 -0
- data/rbi/knockapi/internal/type/unknown.rbi +6 -0
- data/rbi/knockapi/internal/util.rbi +34 -0
- data/rbi/knockapi/internal.rbi +3 -0
- data/rbi/knockapi/models/activity.rbi +4 -4
- data/rbi/knockapi/models/message.rbi +4 -20
- data/rbi/knockapi/models/message_delivery_log.rbi +24 -8
- data/rbi/knockapi/models/message_event.rbi +2 -5
- data/rbi/knockapi/models/message_get_content_response.rbi +4 -25
- data/rbi/knockapi/models/message_list_params.rbi +19 -4
- data/rbi/knockapi/models/messages/batch_get_content_response.rbi +4 -22
- data/rbi/knockapi/models/object_list_messages_params.rbi +19 -4
- data/rbi/knockapi/models/recipients/channel_data.rbi +2 -17
- data/rbi/knockapi/models/recipients/preference_set.rbi +4 -16
- data/rbi/knockapi/models/recipients/subscription.rbi +2 -2
- data/rbi/knockapi/models/schedule.rbi +4 -4
- data/rbi/knockapi/models/user_list_messages_params.rbi +19 -4
- data/rbi/knockapi/models/users/feed_list_items_response.rbi +4 -10
- data/sig/knockapi/internal/type/array_of.rbs +3 -0
- data/sig/knockapi/internal/type/base_model.rbs +2 -0
- data/sig/knockapi/internal/type/boolean.rbs +3 -0
- data/sig/knockapi/internal/type/enum.rbs +2 -0
- data/sig/knockapi/internal/type/file_input.rbs +2 -0
- data/sig/knockapi/internal/type/hash_of.rbs +3 -0
- data/sig/knockapi/internal/type/union.rbs +2 -0
- data/sig/knockapi/internal/type/unknown.rbs +3 -0
- data/sig/knockapi/internal/util.rbs +12 -0
- data/sig/knockapi/internal.rbs +2 -0
- data/sig/knockapi/models/message_list_params.rbs +13 -3
- data/sig/knockapi/models/object_list_messages_params.rbs +13 -3
- data/sig/knockapi/models/user_list_messages_params.rbs +13 -3
- metadata +2 -2
@@ -79,15 +79,6 @@ module Knockapi
|
|
79
79
|
|
80
80
|
# @!method self.variants
|
81
81
|
# @return [Array(Boolean, Knockapi::Recipients::PreferenceSetRequest::Category::PreferenceSetWorkflowCategorySettingObject)]
|
82
|
-
|
83
|
-
define_sorbet_constant!(:Variants) do
|
84
|
-
T.type_alias do
|
85
|
-
T.any(
|
86
|
-
T::Boolean,
|
87
|
-
Knockapi::Recipients::PreferenceSetRequest::Category::PreferenceSetWorkflowCategorySettingObject
|
88
|
-
)
|
89
|
-
end
|
90
|
-
end
|
91
82
|
end
|
92
83
|
|
93
84
|
# Workflow or category preferences within a preference set
|
@@ -125,15 +116,6 @@ module Knockapi
|
|
125
116
|
|
126
117
|
# @!method self.variants
|
127
118
|
# @return [Array(Boolean, Knockapi::Recipients::PreferenceSetRequest::Workflow::PreferenceSetWorkflowCategorySettingObject)]
|
128
|
-
|
129
|
-
define_sorbet_constant!(:Variants) do
|
130
|
-
T.type_alias do
|
131
|
-
T.any(
|
132
|
-
T::Boolean,
|
133
|
-
Knockapi::Recipients::PreferenceSetRequest::Workflow::PreferenceSetWorkflowCategorySettingObject
|
134
|
-
)
|
135
|
-
end
|
136
|
-
end
|
137
119
|
end
|
138
120
|
end
|
139
121
|
end
|
@@ -80,15 +80,6 @@ module Knockapi
|
|
80
80
|
|
81
81
|
# @!method self.variants
|
82
82
|
# @return [Array(Knockapi::Recipients::SlackChannelData::Connection::SlackTokenConnection, Knockapi::Recipients::SlackChannelData::Connection::SlackIncomingWebhookConnection)]
|
83
|
-
|
84
|
-
define_sorbet_constant!(:Variants) do
|
85
|
-
T.type_alias do
|
86
|
-
T.any(
|
87
|
-
Knockapi::Recipients::SlackChannelData::Connection::SlackTokenConnection,
|
88
|
-
Knockapi::Recipients::SlackChannelData::Connection::SlackIncomingWebhookConnection
|
89
|
-
)
|
90
|
-
end
|
91
|
-
end
|
92
83
|
end
|
93
84
|
|
94
85
|
# @see Knockapi::Recipients::SlackChannelData#token
|
@@ -138,10 +138,13 @@ module Knockapi
|
|
138
138
|
extend Knockapi::Internal::Type::Enum
|
139
139
|
|
140
140
|
SEEN = :seen
|
141
|
+
UNSEEN = :unseen
|
141
142
|
READ = :read
|
142
|
-
|
143
|
-
LINK_CLICKED = :link_clicked
|
143
|
+
UNREAD = :unread
|
144
144
|
ARCHIVED = :archived
|
145
|
+
UNARCHIVED = :unarchived
|
146
|
+
LINK_CLICKED = :link_clicked
|
147
|
+
INTERACTED = :interacted
|
145
148
|
|
146
149
|
# @!method self.values
|
147
150
|
# @return [Array<Symbol>]
|
@@ -288,15 +288,6 @@ module Knockapi
|
|
288
288
|
|
289
289
|
# @!method self.variants
|
290
290
|
# @return [Array(Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedContentBlock, Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedButtonSetBlock)]
|
291
|
-
|
292
|
-
define_sorbet_constant!(:Variants) do
|
293
|
-
T.type_alias do
|
294
|
-
T.any(
|
295
|
-
Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedContentBlock,
|
296
|
-
Knockapi::Models::Users::FeedListItemsResponse::Block::MessageInAppFeedButtonSetBlock
|
297
|
-
)
|
298
|
-
end
|
299
|
-
end
|
300
291
|
end
|
301
292
|
|
302
293
|
# @see Knockapi::Models::Users::FeedListItemsResponse#source
|
data/lib/knockapi/models.rb
CHANGED
@@ -5,29 +5,40 @@ module Knockapi
|
|
5
5
|
cls.define_sorbet_constant!(:OrHash) { T.type_alias { T.any(cls, Knockapi::Internal::AnyHash) } }
|
6
6
|
end
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
8
|
+
Knockapi::Internal::Util.walk_namespaces(Knockapi::Models).each do |mod|
|
9
|
+
case mod
|
10
|
+
in Knockapi::Internal::Type::Enum | Knockapi::Internal::Type::Union
|
11
|
+
mod.constants.each do |name|
|
12
|
+
case mod.const_get(name)
|
13
|
+
in true | false
|
14
|
+
mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T.all(T::Boolean, mod) } }
|
15
|
+
mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
|
16
|
+
in Integer
|
17
|
+
mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { T.all(Integer, mod) } }
|
18
|
+
mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
|
19
|
+
in Float
|
20
|
+
mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { T.all(Float, mod) } }
|
21
|
+
mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
|
22
|
+
in Symbol
|
23
|
+
mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { T.all(Symbol, mod) } }
|
24
|
+
mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
|
25
|
+
else
|
26
|
+
end
|
27
27
|
end
|
28
|
+
else
|
28
29
|
end
|
29
30
|
end
|
30
31
|
|
32
|
+
Knockapi::Internal::Util.walk_namespaces(Knockapi::Models)
|
33
|
+
.lazy
|
34
|
+
.grep(Knockapi::Internal::Type::Union)
|
35
|
+
.each do |mod|
|
36
|
+
const = :Variants
|
37
|
+
next if mod.sorbet_constant_defined?(const)
|
38
|
+
|
39
|
+
mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
|
40
|
+
end
|
41
|
+
|
31
42
|
Activity = Knockapi::Models::Activity
|
32
43
|
|
33
44
|
AudienceAddMembersParams = Knockapi::Models::AudienceAddMembersParams
|
data/lib/knockapi/version.rb
CHANGED
@@ -8,6 +8,7 @@ module Knockapi
|
|
8
8
|
# Array of items of a given type.
|
9
9
|
class ArrayOf
|
10
10
|
include Knockapi::Internal::Type::Converter
|
11
|
+
include Knockapi::Internal::Util::SorbetRuntimeSupport
|
11
12
|
|
12
13
|
abstract!
|
13
14
|
|
@@ -63,6 +64,11 @@ module Knockapi
|
|
63
64
|
def dump(value, state:)
|
64
65
|
end
|
65
66
|
|
67
|
+
# @api private
|
68
|
+
sig { returns(T.anything) }
|
69
|
+
def to_sorbet_type
|
70
|
+
end
|
71
|
+
|
66
72
|
# @api private
|
67
73
|
sig { returns(Elem) }
|
68
74
|
protected def item_type
|
@@ -8,6 +8,7 @@ module Knockapi
|
|
8
8
|
# Ruby has no Boolean class; this is something for models to refer to.
|
9
9
|
class Boolean
|
10
10
|
extend Knockapi::Internal::Type::Converter
|
11
|
+
extend Knockapi::Internal::Util::SorbetRuntimeSupport
|
11
12
|
|
12
13
|
abstract!
|
13
14
|
|
@@ -43,6 +44,11 @@ module Knockapi
|
|
43
44
|
end
|
44
45
|
def dump(value, state:)
|
45
46
|
end
|
47
|
+
|
48
|
+
# @api private
|
49
|
+
sig { returns(T.anything) }
|
50
|
+
def to_sorbet_type
|
51
|
+
end
|
46
52
|
end
|
47
53
|
end
|
48
54
|
end
|
@@ -8,6 +8,7 @@ module Knockapi
|
|
8
8
|
# Hash of items of a given type.
|
9
9
|
class HashOf
|
10
10
|
include Knockapi::Internal::Type::Converter
|
11
|
+
include Knockapi::Internal::Util::SorbetRuntimeSupport
|
11
12
|
|
12
13
|
abstract!
|
13
14
|
|
@@ -63,6 +64,11 @@ module Knockapi
|
|
63
64
|
def dump(value, state:)
|
64
65
|
end
|
65
66
|
|
67
|
+
# @api private
|
68
|
+
sig { returns(T.anything) }
|
69
|
+
def to_sorbet_type
|
70
|
+
end
|
71
|
+
|
66
72
|
# @api private
|
67
73
|
sig { returns(Elem) }
|
68
74
|
protected def item_type
|
@@ -8,6 +8,7 @@ module Knockapi
|
|
8
8
|
# When we don't know what to expect for the value.
|
9
9
|
class Unknown
|
10
10
|
extend Knockapi::Internal::Type::Converter
|
11
|
+
extend Knockapi::Internal::Util::SorbetRuntimeSupport
|
11
12
|
|
12
13
|
abstract!
|
13
14
|
|
@@ -43,6 +44,11 @@ module Knockapi
|
|
43
44
|
end
|
44
45
|
def dump(value, state:)
|
45
46
|
end
|
47
|
+
|
48
|
+
# @api private
|
49
|
+
sig { returns(T.anything) }
|
50
|
+
def to_sorbet_type
|
51
|
+
end
|
46
52
|
end
|
47
53
|
end
|
48
54
|
end
|
@@ -11,6 +11,15 @@ module Knockapi
|
|
11
11
|
def self.monotonic_secs
|
12
12
|
end
|
13
13
|
|
14
|
+
# @api private
|
15
|
+
sig do
|
16
|
+
params(ns: T.any(Module, T::Class[T.anything])).returns(
|
17
|
+
T::Enumerable[T.any(Module, T::Class[T.anything])]
|
18
|
+
)
|
19
|
+
end
|
20
|
+
def self.walk_namespaces(ns)
|
21
|
+
end
|
22
|
+
|
14
23
|
class << self
|
15
24
|
# @api private
|
16
25
|
sig { returns(String) }
|
@@ -441,10 +450,35 @@ module Knockapi
|
|
441
450
|
def const_missing(name)
|
442
451
|
end
|
443
452
|
|
453
|
+
# @api private
|
454
|
+
sig { params(name: Symbol).returns(T::Boolean) }
|
455
|
+
def sorbet_constant_defined?(name)
|
456
|
+
end
|
457
|
+
|
444
458
|
# @api private
|
445
459
|
sig { params(name: Symbol, blk: T.proc.returns(T.anything)).void }
|
446
460
|
def define_sorbet_constant!(name, &blk)
|
447
461
|
end
|
462
|
+
|
463
|
+
# @api private
|
464
|
+
sig { returns(T.anything) }
|
465
|
+
def to_sorbet_type
|
466
|
+
end
|
467
|
+
|
468
|
+
class << self
|
469
|
+
# @api private
|
470
|
+
sig do
|
471
|
+
params(
|
472
|
+
type:
|
473
|
+
T.any(
|
474
|
+
Knockapi::Internal::Util::SorbetRuntimeSupport,
|
475
|
+
T.anything
|
476
|
+
)
|
477
|
+
).returns(T.anything)
|
478
|
+
end
|
479
|
+
def to_sorbet_type(type)
|
480
|
+
end
|
481
|
+
end
|
448
482
|
end
|
449
483
|
end
|
450
484
|
end
|
data/rbi/knockapi/internal.rbi
CHANGED
@@ -8,6 +8,9 @@ module Knockapi
|
|
8
8
|
# this alias might be refined in the future.
|
9
9
|
AnyHash = T.type_alias { T::Hash[Symbol, T.anything] }
|
10
10
|
|
11
|
+
FileInput =
|
12
|
+
T.type_alias { T.any(Pathname, StringIO, IO, String, Knockapi::FilePart) }
|
13
|
+
|
11
14
|
OMIT = T.let(Object.new.freeze, T.anything)
|
12
15
|
end
|
13
16
|
end
|
@@ -21,7 +21,7 @@ module Knockapi
|
|
21
21
|
attr_writer :_typename
|
22
22
|
|
23
23
|
# A recipient of a notification, which is either a user or an object.
|
24
|
-
sig { returns(T.nilable(
|
24
|
+
sig { returns(T.nilable(Knockapi::Recipient::Variants)) }
|
25
25
|
attr_accessor :actor
|
26
26
|
|
27
27
|
# The workflow trigger `data` payload associated with the activity.
|
@@ -36,7 +36,7 @@ module Knockapi
|
|
36
36
|
attr_writer :inserted_at
|
37
37
|
|
38
38
|
# A recipient of a notification, which is either a user or an object.
|
39
|
-
sig { returns(T.nilable(
|
39
|
+
sig { returns(T.nilable(Knockapi::Recipient::Variants)) }
|
40
40
|
attr_reader :recipient
|
41
41
|
|
42
42
|
sig do
|
@@ -92,10 +92,10 @@ module Knockapi
|
|
92
92
|
{
|
93
93
|
id: String,
|
94
94
|
_typename: String,
|
95
|
-
actor: T.nilable(
|
95
|
+
actor: T.nilable(Knockapi::Recipient::Variants),
|
96
96
|
data: T.nilable(T::Hash[Symbol, T.anything]),
|
97
97
|
inserted_at: Time,
|
98
|
-
recipient:
|
98
|
+
recipient: Knockapi::Recipient::Variants,
|
99
99
|
updated_at: Time
|
100
100
|
}
|
101
101
|
)
|
@@ -24,13 +24,7 @@ module Knockapi
|
|
24
24
|
# that can contain up to 10 actors if the message is produced from a
|
25
25
|
# [batch](/designing-workflows/batch-function).
|
26
26
|
sig do
|
27
|
-
returns(
|
28
|
-
T.nilable(
|
29
|
-
T::Array[
|
30
|
-
T.any(String, Knockapi::RecipientReference::ObjectReference)
|
31
|
-
]
|
32
|
-
)
|
33
|
-
)
|
27
|
+
returns(T.nilable(T::Array[Knockapi::RecipientReference::Variants]))
|
34
28
|
end
|
35
29
|
attr_reader :actors
|
36
30
|
|
@@ -111,13 +105,7 @@ module Knockapi
|
|
111
105
|
|
112
106
|
# A reference to a recipient, either a user identifier (string) or an object
|
113
107
|
# reference (ID, collection).
|
114
|
-
sig
|
115
|
-
returns(
|
116
|
-
T.nilable(
|
117
|
-
T.any(String, Knockapi::RecipientReference::ObjectReference)
|
118
|
-
)
|
119
|
-
)
|
120
|
-
end
|
108
|
+
sig { returns(T.nilable(Knockapi::RecipientReference::Variants)) }
|
121
109
|
attr_reader :recipient
|
122
110
|
|
123
111
|
sig do
|
@@ -263,10 +251,7 @@ module Knockapi
|
|
263
251
|
{
|
264
252
|
id: String,
|
265
253
|
_typename: String,
|
266
|
-
actors:
|
267
|
-
T::Array[
|
268
|
-
T.any(String, Knockapi::RecipientReference::ObjectReference)
|
269
|
-
],
|
254
|
+
actors: T::Array[Knockapi::RecipientReference::Variants],
|
270
255
|
archived_at: T.nilable(Time),
|
271
256
|
channel_id: String,
|
272
257
|
clicked_at: T.nilable(Time),
|
@@ -278,8 +263,7 @@ module Knockapi
|
|
278
263
|
link_clicked_at: T.nilable(Time),
|
279
264
|
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
280
265
|
read_at: T.nilable(Time),
|
281
|
-
recipient:
|
282
|
-
T.any(String, Knockapi::RecipientReference::ObjectReference),
|
266
|
+
recipient: Knockapi::RecipientReference::Variants,
|
283
267
|
scheduled_at: T.nilable(Time),
|
284
268
|
seen_at: T.nilable(Time),
|
285
269
|
source: Knockapi::Message::Source,
|
@@ -103,10 +103,18 @@ module Knockapi
|
|
103
103
|
end
|
104
104
|
|
105
105
|
# The body content that was sent with the request.
|
106
|
-
sig
|
106
|
+
sig do
|
107
|
+
returns(
|
108
|
+
T.nilable(Knockapi::MessageDeliveryLog::Request::Body::Variants)
|
109
|
+
)
|
110
|
+
end
|
107
111
|
attr_reader :body
|
108
112
|
|
109
|
-
sig
|
113
|
+
sig do
|
114
|
+
params(
|
115
|
+
body: Knockapi::MessageDeliveryLog::Request::Body::Variants
|
116
|
+
).void
|
117
|
+
end
|
110
118
|
attr_writer :body
|
111
119
|
|
112
120
|
# The headers that were sent with the request.
|
@@ -151,7 +159,7 @@ module Knockapi
|
|
151
159
|
# A message delivery log request.
|
152
160
|
sig do
|
153
161
|
params(
|
154
|
-
body:
|
162
|
+
body: Knockapi::MessageDeliveryLog::Request::Body::Variants,
|
155
163
|
headers: T.nilable(T::Hash[Symbol, T.anything]),
|
156
164
|
host: String,
|
157
165
|
method_: Knockapi::MessageDeliveryLog::Request::Method::OrSymbol,
|
@@ -178,7 +186,7 @@ module Knockapi
|
|
178
186
|
sig do
|
179
187
|
override.returns(
|
180
188
|
{
|
181
|
-
body:
|
189
|
+
body: Knockapi::MessageDeliveryLog::Request::Body::Variants,
|
182
190
|
headers: T.nilable(T::Hash[Symbol, T.anything]),
|
183
191
|
host: String,
|
184
192
|
method_:
|
@@ -272,10 +280,18 @@ module Knockapi
|
|
272
280
|
end
|
273
281
|
|
274
282
|
# The body content that was received with the response.
|
275
|
-
sig
|
283
|
+
sig do
|
284
|
+
returns(
|
285
|
+
T.nilable(Knockapi::MessageDeliveryLog::Response::Body::Variants)
|
286
|
+
)
|
287
|
+
end
|
276
288
|
attr_reader :body
|
277
289
|
|
278
|
-
sig
|
290
|
+
sig do
|
291
|
+
params(
|
292
|
+
body: Knockapi::MessageDeliveryLog::Response::Body::Variants
|
293
|
+
).void
|
294
|
+
end
|
279
295
|
attr_writer :body
|
280
296
|
|
281
297
|
# The headers that were received with the response.
|
@@ -292,7 +308,7 @@ module Knockapi
|
|
292
308
|
# A message delivery log response.
|
293
309
|
sig do
|
294
310
|
params(
|
295
|
-
body:
|
311
|
+
body: Knockapi::MessageDeliveryLog::Response::Body::Variants,
|
296
312
|
headers: T.nilable(T::Hash[Symbol, T.anything]),
|
297
313
|
status: Integer
|
298
314
|
).returns(T.attached_class)
|
@@ -310,7 +326,7 @@ module Knockapi
|
|
310
326
|
sig do
|
311
327
|
override.returns(
|
312
328
|
{
|
313
|
-
body:
|
329
|
+
body: Knockapi::MessageDeliveryLog::Response::Body::Variants,
|
314
330
|
headers: T.nilable(T::Hash[Symbol, T.anything]),
|
315
331
|
status: Integer
|
316
332
|
}
|
@@ -22,9 +22,7 @@ module Knockapi
|
|
22
22
|
|
23
23
|
# A reference to a recipient, either a user identifier (string) or an object
|
24
24
|
# reference (ID, collection).
|
25
|
-
sig
|
26
|
-
returns(T.any(String, Knockapi::RecipientReference::ObjectReference))
|
27
|
-
end
|
25
|
+
sig { returns(Knockapi::RecipientReference::Variants) }
|
28
26
|
attr_accessor :recipient
|
29
27
|
|
30
28
|
# The type of event that occurred.
|
@@ -74,8 +72,7 @@ module Knockapi
|
|
74
72
|
id: String,
|
75
73
|
_typename: String,
|
76
74
|
inserted_at: Time,
|
77
|
-
recipient:
|
78
|
-
T.any(String, Knockapi::RecipientReference::ObjectReference),
|
75
|
+
recipient: Knockapi::RecipientReference::Variants,
|
79
76
|
type: Knockapi::MessageEvent::Type::TaggedSymbol,
|
80
77
|
data: T.nilable(T::Hash[Symbol, T.anything])
|
81
78
|
}
|
@@ -17,15 +17,7 @@ module Knockapi
|
|
17
17
|
|
18
18
|
# Content data specific to the channel type.
|
19
19
|
sig do
|
20
|
-
returns(
|
21
|
-
T.any(
|
22
|
-
Knockapi::Models::MessageGetContentResponse::Data::MessageEmailContent,
|
23
|
-
Knockapi::Models::MessageGetContentResponse::Data::MessageSMSContent,
|
24
|
-
Knockapi::Models::MessageGetContentResponse::Data::MessagePushContent,
|
25
|
-
Knockapi::Models::MessageGetContentResponse::Data::MessageChatContent,
|
26
|
-
Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent
|
27
|
-
)
|
28
|
-
)
|
20
|
+
returns(Knockapi::Models::MessageGetContentResponse::Data::Variants)
|
29
21
|
end
|
30
22
|
attr_accessor :data
|
31
23
|
|
@@ -69,14 +61,7 @@ module Knockapi
|
|
69
61
|
override.returns(
|
70
62
|
{
|
71
63
|
_typename: String,
|
72
|
-
data:
|
73
|
-
T.any(
|
74
|
-
Knockapi::Models::MessageGetContentResponse::Data::MessageEmailContent,
|
75
|
-
Knockapi::Models::MessageGetContentResponse::Data::MessageSMSContent,
|
76
|
-
Knockapi::Models::MessageGetContentResponse::Data::MessagePushContent,
|
77
|
-
Knockapi::Models::MessageGetContentResponse::Data::MessageChatContent,
|
78
|
-
Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent
|
79
|
-
),
|
64
|
+
data: Knockapi::Models::MessageGetContentResponse::Data::Variants,
|
80
65
|
inserted_at: Time,
|
81
66
|
message_id: String
|
82
67
|
}
|
@@ -566,10 +551,7 @@ module Knockapi
|
|
566
551
|
sig do
|
567
552
|
returns(
|
568
553
|
T::Array[
|
569
|
-
|
570
|
-
Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent::Block::MessageInAppFeedContentBlock,
|
571
|
-
Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock
|
572
|
-
)
|
554
|
+
Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent::Block::Variants
|
573
555
|
]
|
574
556
|
)
|
575
557
|
end
|
@@ -602,10 +584,7 @@ module Knockapi
|
|
602
584
|
_typename: String,
|
603
585
|
blocks:
|
604
586
|
T::Array[
|
605
|
-
|
606
|
-
Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent::Block::MessageInAppFeedContentBlock,
|
607
|
-
Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent::Block::MessageInAppFeedButtonSetBlock
|
608
|
-
)
|
587
|
+
Knockapi::Models::MessageGetContentResponse::Data::MessageInAppFeedContent::Block::Variants
|
609
588
|
]
|
610
589
|
}
|
611
590
|
)
|
@@ -230,14 +230,29 @@ module Knockapi
|
|
230
230
|
:seen,
|
231
231
|
Knockapi::MessageListParams::EngagementStatus::TaggedSymbol
|
232
232
|
)
|
233
|
+
UNSEEN =
|
234
|
+
T.let(
|
235
|
+
:unseen,
|
236
|
+
Knockapi::MessageListParams::EngagementStatus::TaggedSymbol
|
237
|
+
)
|
233
238
|
READ =
|
234
239
|
T.let(
|
235
240
|
:read,
|
236
241
|
Knockapi::MessageListParams::EngagementStatus::TaggedSymbol
|
237
242
|
)
|
238
|
-
|
243
|
+
UNREAD =
|
239
244
|
T.let(
|
240
|
-
:
|
245
|
+
:unread,
|
246
|
+
Knockapi::MessageListParams::EngagementStatus::TaggedSymbol
|
247
|
+
)
|
248
|
+
ARCHIVED =
|
249
|
+
T.let(
|
250
|
+
:archived,
|
251
|
+
Knockapi::MessageListParams::EngagementStatus::TaggedSymbol
|
252
|
+
)
|
253
|
+
UNARCHIVED =
|
254
|
+
T.let(
|
255
|
+
:unarchived,
|
241
256
|
Knockapi::MessageListParams::EngagementStatus::TaggedSymbol
|
242
257
|
)
|
243
258
|
LINK_CLICKED =
|
@@ -245,9 +260,9 @@ module Knockapi
|
|
245
260
|
:link_clicked,
|
246
261
|
Knockapi::MessageListParams::EngagementStatus::TaggedSymbol
|
247
262
|
)
|
248
|
-
|
263
|
+
INTERACTED =
|
249
264
|
T.let(
|
250
|
-
:
|
265
|
+
:interacted,
|
251
266
|
Knockapi::MessageListParams::EngagementStatus::TaggedSymbol
|
252
267
|
)
|
253
268
|
|