knockapi 1.8.0 → 1.9.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 +27 -0
- data/README.md +1 -1
- data/lib/knockapi/errors.rb +22 -0
- data/lib/knockapi/internal/type/array_of.rb +6 -1
- data/lib/knockapi/internal/type/base_model.rb +77 -25
- data/lib/knockapi/internal/type/boolean.rb +7 -1
- data/lib/knockapi/internal/type/converter.rb +42 -34
- data/lib/knockapi/internal/type/enum.rb +10 -2
- data/lib/knockapi/internal/type/file_input.rb +6 -1
- data/lib/knockapi/internal/type/hash_of.rb +6 -1
- data/lib/knockapi/internal/type/union.rb +12 -7
- data/lib/knockapi/internal/type/unknown.rb +7 -1
- data/lib/knockapi/models/audience_add_members_params.rb +2 -2
- data/lib/knockapi/models/audience_member.rb +2 -2
- data/lib/knockapi/models/audience_remove_members_params.rb +2 -2
- data/lib/knockapi/models/identify_user_request.rb +2 -2
- data/lib/knockapi/models/inline_identify_user_request.rb +4 -4
- data/lib/knockapi/models/message.rb +9 -1
- data/lib/knockapi/models/message_get_content_response.rb +2 -2
- data/lib/knockapi/models/message_list_activities_params.rb +2 -2
- data/lib/knockapi/models/message_list_delivery_logs_params.rb +2 -2
- data/lib/knockapi/models/message_list_events_params.rb +2 -2
- data/lib/knockapi/models/message_list_params.rb +2 -2
- data/lib/knockapi/models/messages/batch_get_content_response.rb +2 -2
- data/lib/knockapi/models/object_list_messages_params.rb +2 -2
- data/lib/knockapi/models/object_list_params.rb +2 -2
- data/lib/knockapi/models/object_list_schedules_params.rb +2 -2
- data/lib/knockapi/models/object_list_subscriptions_params.rb +2 -2
- data/lib/knockapi/models/page_info.rb +2 -2
- data/lib/knockapi/models/recipients/channel_data.rb +3 -3
- data/lib/knockapi/models/recipients/channel_data_request.rb +3 -3
- data/lib/knockapi/models/recipients/inline_channel_data_request.rb +3 -3
- data/lib/knockapi/models/recipients/ms_teams_channel_data.rb +1 -1
- data/lib/knockapi/models/recipients/push_channel_data.rb +1 -1
- data/lib/knockapi/models/recipients/slack_channel_data.rb +1 -1
- data/lib/knockapi/models/schedule_list_params.rb +2 -2
- data/lib/knockapi/models/tenant_list_params.rb +2 -2
- data/lib/knockapi/models/user.rb +4 -4
- data/lib/knockapi/models/user_list_messages_params.rb +2 -2
- data/lib/knockapi/models/user_list_params.rb +2 -2
- data/lib/knockapi/models/user_list_schedules_params.rb +2 -2
- data/lib/knockapi/models/user_list_subscriptions_params.rb +2 -2
- data/lib/knockapi/models/users/feed_list_items_params.rb +4 -4
- data/lib/knockapi/resources/messages.rb +4 -4
- data/lib/knockapi/resources/objects.rb +4 -4
- data/lib/knockapi/resources/schedules.rb +1 -1
- data/lib/knockapi/resources/tenants.rb +1 -1
- data/lib/knockapi/resources/users/feeds.rb +18 -6
- data/lib/knockapi/resources/users/guides.rb +4 -4
- data/lib/knockapi/resources/users.rb +15 -15
- data/lib/knockapi/version.rb +1 -1
- data/rbi/knockapi/errors.rbi +16 -0
- data/rbi/knockapi/internal/type/boolean.rbi +2 -0
- data/rbi/knockapi/internal/type/converter.rbi +15 -15
- data/rbi/knockapi/internal/type/union.rbi +5 -0
- data/rbi/knockapi/internal/type/unknown.rbi +2 -0
- data/rbi/knockapi/models/audience_add_members_params.rbi +2 -2
- data/rbi/knockapi/models/audience_member.rbi +2 -2
- data/rbi/knockapi/models/audience_remove_members_params.rbi +2 -2
- data/rbi/knockapi/models/identify_user_request.rbi +2 -2
- data/rbi/knockapi/models/inline_identify_user_request.rbi +4 -4
- data/rbi/knockapi/models/message.rbi +11 -3
- data/rbi/knockapi/models/message_get_content_response.rbi +1 -1
- data/rbi/knockapi/models/message_list_activities_params.rbi +2 -2
- data/rbi/knockapi/models/message_list_delivery_logs_params.rbi +2 -2
- data/rbi/knockapi/models/message_list_events_params.rbi +2 -2
- data/rbi/knockapi/models/message_list_params.rbi +2 -2
- data/rbi/knockapi/models/messages/batch_get_content_response.rbi +1 -1
- data/rbi/knockapi/models/object_list_messages_params.rbi +2 -2
- data/rbi/knockapi/models/object_list_params.rbi +2 -2
- data/rbi/knockapi/models/object_list_schedules_params.rbi +2 -2
- data/rbi/knockapi/models/object_list_subscriptions_params.rbi +2 -2
- data/rbi/knockapi/models/page_info.rbi +2 -2
- data/rbi/knockapi/models/recipients/ms_teams_channel_data.rbi +1 -1
- data/rbi/knockapi/models/recipients/push_channel_data.rbi +1 -1
- data/rbi/knockapi/models/recipients/slack_channel_data.rbi +1 -1
- data/rbi/knockapi/models/schedule_list_params.rbi +2 -2
- data/rbi/knockapi/models/tenant_list_params.rbi +2 -2
- data/rbi/knockapi/models/user.rbi +4 -4
- data/rbi/knockapi/models/user_list_messages_params.rbi +2 -2
- data/rbi/knockapi/models/user_list_params.rbi +2 -2
- data/rbi/knockapi/models/user_list_schedules_params.rbi +2 -2
- data/rbi/knockapi/models/user_list_subscriptions_params.rbi +2 -2
- data/rbi/knockapi/models/users/feed_list_items_params.rbi +4 -4
- data/rbi/knockapi/resources/messages.rbi +4 -4
- data/rbi/knockapi/resources/objects.rbi +4 -4
- data/rbi/knockapi/resources/schedules.rbi +1 -1
- data/rbi/knockapi/resources/tenants.rbi +1 -1
- data/rbi/knockapi/resources/users/feeds.rbi +18 -6
- data/rbi/knockapi/resources/users/guides.rbi +4 -4
- data/rbi/knockapi/resources/users.rbi +15 -15
- data/sig/knockapi/errors.rbs +9 -0
- data/sig/knockapi/internal/type/converter.rbs +7 -1
- data/sig/knockapi/models/message.rbs +8 -3
- metadata +2 -2
@@ -10,7 +10,7 @@ module Knockapi
|
|
10
10
|
sig { returns(String) }
|
11
11
|
attr_accessor :_typename
|
12
12
|
|
13
|
-
# The number of items per page.
|
13
|
+
# The number of items per page (defaults to 50).
|
14
14
|
sig { returns(Integer) }
|
15
15
|
attr_accessor :page_size
|
16
16
|
|
@@ -34,7 +34,7 @@ module Knockapi
|
|
34
34
|
def self.new(
|
35
35
|
# The typename of the schema.
|
36
36
|
_typename:,
|
37
|
-
# The number of items per page.
|
37
|
+
# The number of items per page (defaults to 50).
|
38
38
|
page_size:,
|
39
39
|
# The cursor to fetch entries after.
|
40
40
|
after: nil,
|
@@ -16,7 +16,7 @@ module Knockapi
|
|
16
16
|
sig { returns(T::Array[String]) }
|
17
17
|
attr_accessor :tokens
|
18
18
|
|
19
|
-
#
|
19
|
+
# Push channel data.
|
20
20
|
sig { params(tokens: T::Array[String]).returns(T.attached_class) }
|
21
21
|
def self.new(
|
22
22
|
# A list of push channel tokens.
|
@@ -29,7 +29,7 @@ module Knockapi
|
|
29
29
|
sig { params(before: String).void }
|
30
30
|
attr_writer :before
|
31
31
|
|
32
|
-
# The number of items per page.
|
32
|
+
# The number of items per page (defaults to 50).
|
33
33
|
sig { returns(T.nilable(Integer)) }
|
34
34
|
attr_reader :page_size
|
35
35
|
|
@@ -92,7 +92,7 @@ module Knockapi
|
|
92
92
|
after: nil,
|
93
93
|
# The cursor to fetch entries before.
|
94
94
|
before: nil,
|
95
|
-
# The number of items per page.
|
95
|
+
# The number of items per page (defaults to 50).
|
96
96
|
page_size: nil,
|
97
97
|
# Filter by recipient references.
|
98
98
|
recipients: nil,
|
@@ -32,7 +32,7 @@ module Knockapi
|
|
32
32
|
sig { params(name: String).void }
|
33
33
|
attr_writer :name
|
34
34
|
|
35
|
-
# The number of items per page.
|
35
|
+
# The number of items per page (defaults to 50).
|
36
36
|
sig { returns(T.nilable(Integer)) }
|
37
37
|
attr_reader :page_size
|
38
38
|
|
@@ -63,7 +63,7 @@ module Knockapi
|
|
63
63
|
before: nil,
|
64
64
|
# Filter tenants by name.
|
65
65
|
name: nil,
|
66
|
-
# The number of items per page.
|
66
|
+
# The number of items per page (defaults to 50).
|
67
67
|
page_size: nil,
|
68
68
|
# Filter tenants by ID.
|
69
69
|
tenant_id: nil,
|
@@ -6,7 +6,7 @@ module Knockapi
|
|
6
6
|
OrHash =
|
7
7
|
T.type_alias { T.any(Knockapi::User, Knockapi::Internal::AnyHash) }
|
8
8
|
|
9
|
-
# The
|
9
|
+
# The unique identifier of the user.
|
10
10
|
sig { returns(String) }
|
11
11
|
attr_accessor :id
|
12
12
|
|
@@ -18,7 +18,7 @@ module Knockapi
|
|
18
18
|
sig { returns(Time) }
|
19
19
|
attr_accessor :updated_at
|
20
20
|
|
21
|
-
# URL
|
21
|
+
# A URL for the avatar of the user.
|
22
22
|
sig { returns(T.nilable(String)) }
|
23
23
|
attr_accessor :avatar
|
24
24
|
|
@@ -63,13 +63,13 @@ module Knockapi
|
|
63
63
|
).returns(T.attached_class)
|
64
64
|
end
|
65
65
|
def self.new(
|
66
|
-
# The
|
66
|
+
# The unique identifier of the user.
|
67
67
|
id:,
|
68
68
|
# The typename of the schema.
|
69
69
|
_typename:,
|
70
70
|
# The timestamp when the resource was last updated.
|
71
71
|
updated_at:,
|
72
|
-
# URL
|
72
|
+
# A URL for the avatar of the user.
|
73
73
|
avatar: nil,
|
74
74
|
# The creation date of the user from your system.
|
75
75
|
created_at: nil,
|
@@ -72,7 +72,7 @@ module Knockapi
|
|
72
72
|
sig { params(message_ids: T::Array[String]).void }
|
73
73
|
attr_writer :message_ids
|
74
74
|
|
75
|
-
# The number of items per page.
|
75
|
+
# The number of items per page (defaults to 50).
|
76
76
|
sig { returns(T.nilable(Integer)) }
|
77
77
|
attr_reader :page_size
|
78
78
|
|
@@ -176,7 +176,7 @@ module Knockapi
|
|
176
176
|
# Limits the results to only the message IDs given (max 50). Note: when using this
|
177
177
|
# option, the results will be subject to any other filters applied to the query.
|
178
178
|
message_ids: nil,
|
179
|
-
# The number of items per page.
|
179
|
+
# The number of items per page (defaults to 50).
|
180
180
|
page_size: nil,
|
181
181
|
# Limits the results to messages triggered by the given workflow key.
|
182
182
|
source: nil,
|
@@ -40,7 +40,7 @@ module Knockapi
|
|
40
40
|
end
|
41
41
|
attr_writer :include
|
42
42
|
|
43
|
-
# The number of items per page.
|
43
|
+
# The number of items per page (defaults to 50).
|
44
44
|
sig { returns(T.nilable(Integer)) }
|
45
45
|
attr_reader :page_size
|
46
46
|
|
@@ -63,7 +63,7 @@ module Knockapi
|
|
63
63
|
before: nil,
|
64
64
|
# Associated resources to include in the response.
|
65
65
|
include: nil,
|
66
|
-
# The number of items per page.
|
66
|
+
# The number of items per page (defaults to 50).
|
67
67
|
page_size: nil,
|
68
68
|
request_options: {}
|
69
69
|
)
|
@@ -25,7 +25,7 @@ module Knockapi
|
|
25
25
|
sig { params(before: String).void }
|
26
26
|
attr_writer :before
|
27
27
|
|
28
|
-
# The number of items per page.
|
28
|
+
# The number of items per page (defaults to 50).
|
29
29
|
sig { returns(T.nilable(Integer)) }
|
30
30
|
attr_reader :page_size
|
31
31
|
|
@@ -61,7 +61,7 @@ module Knockapi
|
|
61
61
|
after: nil,
|
62
62
|
# The cursor to fetch entries before.
|
63
63
|
before: nil,
|
64
|
-
# The number of items per page.
|
64
|
+
# The number of items per page (defaults to 50).
|
65
65
|
page_size: nil,
|
66
66
|
# The tenant ID to filter schedules for.
|
67
67
|
tenant: nil,
|
@@ -71,7 +71,7 @@ module Knockapi
|
|
71
71
|
end
|
72
72
|
attr_writer :objects
|
73
73
|
|
74
|
-
# The number of items per page.
|
74
|
+
# The number of items per page (defaults to 50).
|
75
75
|
sig { returns(T.nilable(Integer)) }
|
76
76
|
attr_reader :page_size
|
77
77
|
|
@@ -104,7 +104,7 @@ module Knockapi
|
|
104
104
|
include: nil,
|
105
105
|
# Only returns subscriptions for the specified object references.
|
106
106
|
objects: nil,
|
107
|
-
# The number of items per page.
|
107
|
+
# The number of items per page (defaults to 50).
|
108
108
|
page_size: nil,
|
109
109
|
request_options: {}
|
110
110
|
)
|
@@ -51,14 +51,14 @@ module Knockapi
|
|
51
51
|
sig { params(has_tenant: T::Boolean).void }
|
52
52
|
attr_writer :has_tenant
|
53
53
|
|
54
|
-
# The number of items per page.
|
54
|
+
# The number of items per page (defaults to 50).
|
55
55
|
sig { returns(T.nilable(Integer)) }
|
56
56
|
attr_reader :page_size
|
57
57
|
|
58
58
|
sig { params(page_size: Integer).void }
|
59
59
|
attr_writer :page_size
|
60
60
|
|
61
|
-
# The
|
61
|
+
# The workflow key associated with the message in the feed.
|
62
62
|
sig { returns(T.nilable(String)) }
|
63
63
|
attr_reader :source
|
64
64
|
|
@@ -125,9 +125,9 @@ module Knockapi
|
|
125
125
|
before: nil,
|
126
126
|
# Whether the feed items have a tenant.
|
127
127
|
has_tenant: nil,
|
128
|
-
# The number of items per page.
|
128
|
+
# The number of items per page (defaults to 50).
|
129
129
|
page_size: nil,
|
130
|
-
# The
|
130
|
+
# The workflow key associated with the message in the feed.
|
131
131
|
source: nil,
|
132
132
|
# The status of the feed items.
|
133
133
|
status: nil,
|
@@ -40,7 +40,7 @@ module Knockapi
|
|
40
40
|
# Limits the results to only the message IDs given (max 50). Note: when using this
|
41
41
|
# option, the results will be subject to any other filters applied to the query.
|
42
42
|
message_ids: nil,
|
43
|
-
# The number of items per page.
|
43
|
+
# The number of items per page (defaults to 50).
|
44
44
|
page_size: nil,
|
45
45
|
# Limits the results to messages triggered by the given workflow key.
|
46
46
|
source: nil,
|
@@ -125,7 +125,7 @@ module Knockapi
|
|
125
125
|
after: nil,
|
126
126
|
# The cursor to fetch entries before.
|
127
127
|
before: nil,
|
128
|
-
# The number of items per page.
|
128
|
+
# The number of items per page (defaults to 50).
|
129
129
|
page_size: nil,
|
130
130
|
# The trigger data to filter activities by.
|
131
131
|
trigger_data: nil,
|
@@ -150,7 +150,7 @@ module Knockapi
|
|
150
150
|
after: nil,
|
151
151
|
# The cursor to fetch entries before.
|
152
152
|
before: nil,
|
153
|
-
# The number of items per page.
|
153
|
+
# The number of items per page (defaults to 50).
|
154
154
|
page_size: nil,
|
155
155
|
request_options: {}
|
156
156
|
)
|
@@ -173,7 +173,7 @@ module Knockapi
|
|
173
173
|
after: nil,
|
174
174
|
# The cursor to fetch entries before.
|
175
175
|
before: nil,
|
176
|
-
# The number of items per page.
|
176
|
+
# The number of items per page (defaults to 50).
|
177
177
|
page_size: nil,
|
178
178
|
request_options: {}
|
179
179
|
)
|
@@ -27,7 +27,7 @@ module Knockapi
|
|
27
27
|
before: nil,
|
28
28
|
# Includes preferences of the objects in the response.
|
29
29
|
include: nil,
|
30
|
-
# The number of items per page.
|
30
|
+
# The number of items per page (defaults to 50).
|
31
31
|
page_size: nil,
|
32
32
|
request_options: {}
|
33
33
|
)
|
@@ -216,7 +216,7 @@ module Knockapi
|
|
216
216
|
# Limits the results to only the message IDs given (max 50). Note: when using this
|
217
217
|
# option, the results will be subject to any other filters applied to the query.
|
218
218
|
message_ids: nil,
|
219
|
-
# The number of items per page.
|
219
|
+
# The number of items per page (defaults to 50).
|
220
220
|
page_size: nil,
|
221
221
|
# Limits the results to messages triggered by the given workflow key.
|
222
222
|
source: nil,
|
@@ -278,7 +278,7 @@ module Knockapi
|
|
278
278
|
after: nil,
|
279
279
|
# The cursor to fetch entries before.
|
280
280
|
before: nil,
|
281
|
-
# The number of items per page.
|
281
|
+
# The number of items per page (defaults to 50).
|
282
282
|
page_size: nil,
|
283
283
|
# Filter schedules by tenant id.
|
284
284
|
tenant: nil,
|
@@ -334,7 +334,7 @@ module Knockapi
|
|
334
334
|
mode: nil,
|
335
335
|
# Objects to filter by (only used if mode is `recipient`).
|
336
336
|
objects: nil,
|
337
|
-
# The number of items per page.
|
337
|
+
# The number of items per page (defaults to 50).
|
338
338
|
page_size: nil,
|
339
339
|
# Recipients to filter by (only used if mode is `object`).
|
340
340
|
recipients: nil,
|
@@ -136,7 +136,7 @@ module Knockapi
|
|
136
136
|
after: nil,
|
137
137
|
# The cursor to fetch entries before.
|
138
138
|
before: nil,
|
139
|
-
# The number of items per page.
|
139
|
+
# The number of items per page (defaults to 50).
|
140
140
|
page_size: nil,
|
141
141
|
# Filter by recipient references.
|
142
142
|
recipients: nil,
|
@@ -13,7 +13,7 @@ module Knockapi
|
|
13
13
|
).returns(Knockapi::Models::Users::FeedGetSettingsResponse)
|
14
14
|
end
|
15
15
|
def get_settings(
|
16
|
-
# The
|
16
|
+
# The unique identifier of the user.
|
17
17
|
user_id,
|
18
18
|
# The unique identifier for the channel.
|
19
19
|
id,
|
@@ -21,8 +21,20 @@ module Knockapi
|
|
21
21
|
)
|
22
22
|
end
|
23
23
|
|
24
|
-
# Returns a paginated list of feed items for a user
|
25
|
-
# feed.
|
24
|
+
# Returns a paginated list of feed items for a user in reverse chronological
|
25
|
+
# order, including metadata about the feed. If the user has not yet been
|
26
|
+
# identified within Knock, an empty feed will be returned.
|
27
|
+
#
|
28
|
+
# You can customize the response using
|
29
|
+
# [response filters](/integrations/in-app/knock#customizing-api-response-content)
|
30
|
+
# to exclude or only include specific properties on your resources.
|
31
|
+
#
|
32
|
+
# **Notes:**
|
33
|
+
#
|
34
|
+
# - When making this call from a client-side environment, use your publishable key
|
35
|
+
# along with a user token.
|
36
|
+
# - This endpoint’s rate limit is always scoped per-user and per-environment. This
|
37
|
+
# is true even for requests made without a signed user token.
|
26
38
|
sig do
|
27
39
|
params(
|
28
40
|
user_id: String,
|
@@ -45,7 +57,7 @@ module Knockapi
|
|
45
57
|
)
|
46
58
|
end
|
47
59
|
def list_items(
|
48
|
-
# The
|
60
|
+
# The unique identifier of the user.
|
49
61
|
user_id,
|
50
62
|
# The unique identifier for the channel.
|
51
63
|
id,
|
@@ -57,9 +69,9 @@ module Knockapi
|
|
57
69
|
before: nil,
|
58
70
|
# Whether the feed items have a tenant.
|
59
71
|
has_tenant: nil,
|
60
|
-
# The number of items per page.
|
72
|
+
# The number of items per page (defaults to 50).
|
61
73
|
page_size: nil,
|
62
|
-
# The
|
74
|
+
# The workflow key associated with the message in the feed.
|
63
75
|
source: nil,
|
64
76
|
# The status of the feed items.
|
65
77
|
status: nil,
|
@@ -16,7 +16,7 @@ module Knockapi
|
|
16
16
|
).returns(Knockapi::Models::Users::GuideGetChannelResponse)
|
17
17
|
end
|
18
18
|
def get_channel(
|
19
|
-
# The
|
19
|
+
# The unique identifier of the user.
|
20
20
|
user_id,
|
21
21
|
# The unique identifier for the channel.
|
22
22
|
channel_id,
|
@@ -49,7 +49,7 @@ module Knockapi
|
|
49
49
|
).returns(Knockapi::Models::Users::GuideMarkMessageAsArchivedResponse)
|
50
50
|
end
|
51
51
|
def mark_message_as_archived(
|
52
|
-
# The
|
52
|
+
# The unique identifier of the user.
|
53
53
|
user_id,
|
54
54
|
# The unique identifier for the message.
|
55
55
|
message_id,
|
@@ -96,7 +96,7 @@ module Knockapi
|
|
96
96
|
)
|
97
97
|
end
|
98
98
|
def mark_message_as_interacted(
|
99
|
-
# The
|
99
|
+
# The unique identifier of the user.
|
100
100
|
user_id,
|
101
101
|
# The unique identifier for the message.
|
102
102
|
message_id,
|
@@ -141,7 +141,7 @@ module Knockapi
|
|
141
141
|
).returns(Knockapi::Models::Users::GuideMarkMessageAsSeenResponse)
|
142
142
|
end
|
143
143
|
def mark_message_as_seen(
|
144
|
-
# The
|
144
|
+
# The unique identifier of the user.
|
145
145
|
user_id,
|
146
146
|
# The unique identifier for the message.
|
147
147
|
message_id,
|
@@ -49,9 +49,9 @@ module Knockapi
|
|
49
49
|
).returns(Knockapi::User)
|
50
50
|
end
|
51
51
|
def update(
|
52
|
-
# The
|
52
|
+
# The unique identifier of the user.
|
53
53
|
user_id,
|
54
|
-
# URL
|
54
|
+
# A URL for the avatar of the user.
|
55
55
|
avatar: nil,
|
56
56
|
# A request to set channel data for a type of channel inline.
|
57
57
|
channel_data: nil,
|
@@ -97,7 +97,7 @@ module Knockapi
|
|
97
97
|
before: nil,
|
98
98
|
# Associated resources to include in the response.
|
99
99
|
include: nil,
|
100
|
-
# The number of items per page.
|
100
|
+
# The number of items per page (defaults to 50).
|
101
101
|
page_size: nil,
|
102
102
|
request_options: {}
|
103
103
|
)
|
@@ -140,7 +140,7 @@ module Knockapi
|
|
140
140
|
).returns(Knockapi::Recipients::RecipientsChannelData)
|
141
141
|
end
|
142
142
|
def get_channel_data(
|
143
|
-
# The
|
143
|
+
# The unique identifier of the user.
|
144
144
|
user_id,
|
145
145
|
# The unique identifier for the channel.
|
146
146
|
channel_id,
|
@@ -159,7 +159,7 @@ module Knockapi
|
|
159
159
|
).returns(Knockapi::Recipients::PreferenceSet)
|
160
160
|
end
|
161
161
|
def get_preferences(
|
162
|
-
# The
|
162
|
+
# The unique identifier of the user.
|
163
163
|
user_id,
|
164
164
|
# Unique identifier for the preference set.
|
165
165
|
id,
|
@@ -169,9 +169,9 @@ module Knockapi
|
|
169
169
|
)
|
170
170
|
end
|
171
171
|
|
172
|
-
# Returns a paginated list of messages for a specific user.
|
173
|
-
#
|
174
|
-
#
|
172
|
+
# Returns a paginated list of messages for a specific user. Messages are sorted
|
173
|
+
# with the most recent ones appearing first. Messages outside the account's
|
174
|
+
# retention window will not be included in the results.
|
175
175
|
sig do
|
176
176
|
params(
|
177
177
|
user_id: String,
|
@@ -210,7 +210,7 @@ module Knockapi
|
|
210
210
|
# Limits the results to only the message IDs given (max 50). Note: when using this
|
211
211
|
# option, the results will be subject to any other filters applied to the query.
|
212
212
|
message_ids: nil,
|
213
|
-
# The number of items per page.
|
213
|
+
# The number of items per page (defaults to 50).
|
214
214
|
page_size: nil,
|
215
215
|
# Limits the results to messages triggered by the given workflow key.
|
216
216
|
source: nil,
|
@@ -241,7 +241,7 @@ module Knockapi
|
|
241
241
|
).returns(T::Array[Knockapi::Recipients::PreferenceSet])
|
242
242
|
end
|
243
243
|
def list_preferences(
|
244
|
-
# The
|
244
|
+
# The unique identifier of the user.
|
245
245
|
user_id,
|
246
246
|
request_options: {}
|
247
247
|
)
|
@@ -266,7 +266,7 @@ module Knockapi
|
|
266
266
|
after: nil,
|
267
267
|
# The cursor to fetch entries before.
|
268
268
|
before: nil,
|
269
|
-
# The number of items per page.
|
269
|
+
# The number of items per page (defaults to 50).
|
270
270
|
page_size: nil,
|
271
271
|
# The tenant ID to filter schedules for.
|
272
272
|
tenant: nil,
|
@@ -309,7 +309,7 @@ module Knockapi
|
|
309
309
|
include: nil,
|
310
310
|
# Only returns subscriptions for the specified object references.
|
311
311
|
objects: nil,
|
312
|
-
# The number of items per page.
|
312
|
+
# The number of items per page (defaults to 50).
|
313
313
|
page_size: nil,
|
314
314
|
request_options: {}
|
315
315
|
)
|
@@ -352,7 +352,7 @@ module Knockapi
|
|
352
352
|
).returns(Knockapi::Recipients::RecipientsChannelData)
|
353
353
|
end
|
354
354
|
def set_channel_data(
|
355
|
-
# The
|
355
|
+
# The unique identifier of the user.
|
356
356
|
user_id,
|
357
357
|
# The unique identifier for the channel.
|
358
358
|
channel_id,
|
@@ -394,7 +394,7 @@ module Knockapi
|
|
394
394
|
).returns(Knockapi::Recipients::PreferenceSet)
|
395
395
|
end
|
396
396
|
def set_preferences(
|
397
|
-
# The
|
397
|
+
# The unique identifier of the user.
|
398
398
|
user_id,
|
399
399
|
# Unique identifier for the preference set.
|
400
400
|
id,
|
@@ -419,7 +419,7 @@ module Knockapi
|
|
419
419
|
).returns(String)
|
420
420
|
end
|
421
421
|
def unset_channel_data(
|
422
|
-
# The
|
422
|
+
# The unique identifier of the user.
|
423
423
|
user_id,
|
424
424
|
# The unique identifier for the channel.
|
425
425
|
channel_id,
|
data/sig/knockapi/errors.rbs
CHANGED
@@ -5,6 +5,15 @@ module Knockapi
|
|
5
5
|
end
|
6
6
|
|
7
7
|
class ConversionError < Knockapi::Errors::Error
|
8
|
+
def cause: -> StandardError?
|
9
|
+
|
10
|
+
def initialize: (
|
11
|
+
on: Class,
|
12
|
+
method: Symbol,
|
13
|
+
target: top,
|
14
|
+
value: top,
|
15
|
+
?cause: StandardError?
|
16
|
+
) -> void
|
8
17
|
end
|
9
18
|
|
10
19
|
class APIError < Knockapi::Errors::Error
|
@@ -8,8 +8,10 @@ module Knockapi
|
|
8
8
|
|
9
9
|
type coerce_state =
|
10
10
|
{
|
11
|
-
|
11
|
+
translate_names: bool,
|
12
|
+
strictness: bool,
|
12
13
|
exactness: { yes: Integer, no: Integer, maybe: Integer },
|
14
|
+
error: Class,
|
13
15
|
branched: Integer
|
14
16
|
}
|
15
17
|
|
@@ -37,6 +39,10 @@ module Knockapi
|
|
37
39
|
| Knockapi::Internal::Type::Converter::input spec
|
38
40
|
) -> (^-> top)
|
39
41
|
|
42
|
+
def self.new_coerce_state: (
|
43
|
+
?translate_names: bool
|
44
|
+
) -> Knockapi::Internal::Type::Converter::coerce_state
|
45
|
+
|
40
46
|
def self.coerce: (
|
41
47
|
Knockapi::Internal::Type::Converter::input target,
|
42
48
|
top value,
|
@@ -164,7 +164,8 @@ module Knockapi
|
|
164
164
|
_typename: String,
|
165
165
|
categories: ::Array[String],
|
166
166
|
key: String,
|
167
|
-
version_id: String
|
167
|
+
version_id: String,
|
168
|
+
step_ref: String?
|
168
169
|
}
|
169
170
|
|
170
171
|
class Source < Knockapi::Internal::Type::BaseModel
|
@@ -176,18 +177,22 @@ module Knockapi
|
|
176
177
|
|
177
178
|
attr_accessor version_id: String
|
178
179
|
|
180
|
+
attr_accessor step_ref: String?
|
181
|
+
|
179
182
|
def initialize: (
|
180
183
|
_typename: String,
|
181
184
|
categories: ::Array[String],
|
182
185
|
key: String,
|
183
|
-
version_id: String
|
186
|
+
version_id: String,
|
187
|
+
?step_ref: String?
|
184
188
|
) -> void
|
185
189
|
|
186
190
|
def to_hash: -> {
|
187
191
|
_typename: String,
|
188
192
|
categories: ::Array[String],
|
189
193
|
key: String,
|
190
|
-
version_id: String
|
194
|
+
version_id: String,
|
195
|
+
step_ref: String?
|
191
196
|
}
|
192
197
|
end
|
193
198
|
|
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.
|
4
|
+
version: 1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Knock
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-06-
|
11
|
+
date: 2025-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|