knockapi 1.8.1 → 1.10.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.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/README.md +1 -1
  4. data/lib/knockapi/internal/transport/base_client.rb +10 -2
  5. data/lib/knockapi/models/audience_add_members_params.rb +2 -2
  6. data/lib/knockapi/models/audience_member.rb +2 -2
  7. data/lib/knockapi/models/audience_remove_members_params.rb +2 -2
  8. data/lib/knockapi/models/identify_user_request.rb +2 -2
  9. data/lib/knockapi/models/inline_identify_user_request.rb +4 -4
  10. data/lib/knockapi/models/message.rb +9 -1
  11. data/lib/knockapi/models/message_get_content_response.rb +2 -2
  12. data/lib/knockapi/models/message_list_activities_params.rb +2 -2
  13. data/lib/knockapi/models/message_list_delivery_logs_params.rb +2 -2
  14. data/lib/knockapi/models/message_list_events_params.rb +2 -2
  15. data/lib/knockapi/models/message_list_params.rb +2 -2
  16. data/lib/knockapi/models/messages/batch_get_content_response.rb +2 -2
  17. data/lib/knockapi/models/object_list_messages_params.rb +2 -2
  18. data/lib/knockapi/models/object_list_params.rb +2 -2
  19. data/lib/knockapi/models/object_list_schedules_params.rb +2 -2
  20. data/lib/knockapi/models/object_list_subscriptions_params.rb +2 -2
  21. data/lib/knockapi/models/page_info.rb +2 -2
  22. data/lib/knockapi/models/providers/slack_list_channels_params.rb +2 -1
  23. data/lib/knockapi/models/recipients/channel_data.rb +3 -3
  24. data/lib/knockapi/models/recipients/channel_data_request.rb +3 -3
  25. data/lib/knockapi/models/recipients/inline_channel_data_request.rb +3 -3
  26. data/lib/knockapi/models/recipients/ms_teams_channel_data.rb +1 -1
  27. data/lib/knockapi/models/recipients/push_channel_data.rb +1 -1
  28. data/lib/knockapi/models/recipients/slack_channel_data.rb +1 -1
  29. data/lib/knockapi/models/schedule.rb +5 -5
  30. data/lib/knockapi/models/schedule_create_params.rb +5 -5
  31. data/lib/knockapi/models/schedule_list_params.rb +2 -2
  32. data/lib/knockapi/models/schedule_update_params.rb +5 -5
  33. data/lib/knockapi/models/schedules/bulk_create_params.rb +5 -5
  34. data/lib/knockapi/models/tenant_list_params.rb +2 -2
  35. data/lib/knockapi/models/user.rb +4 -4
  36. data/lib/knockapi/models/user_list_messages_params.rb +2 -2
  37. data/lib/knockapi/models/user_list_params.rb +2 -2
  38. data/lib/knockapi/models/user_list_schedules_params.rb +2 -2
  39. data/lib/knockapi/models/user_list_subscriptions_params.rb +2 -2
  40. data/lib/knockapi/models/users/feed_list_items_params.rb +4 -4
  41. data/lib/knockapi/models/workflow_trigger_params.rb +5 -5
  42. data/lib/knockapi/resources/messages.rb +4 -4
  43. data/lib/knockapi/resources/objects.rb +4 -4
  44. data/lib/knockapi/resources/schedules.rb +3 -3
  45. data/lib/knockapi/resources/tenants.rb +1 -1
  46. data/lib/knockapi/resources/users/feeds.rb +18 -6
  47. data/lib/knockapi/resources/users/guides.rb +4 -4
  48. data/lib/knockapi/resources/users.rb +15 -15
  49. data/lib/knockapi/resources/workflows.rb +1 -1
  50. data/lib/knockapi/version.rb +1 -1
  51. data/rbi/knockapi/models/audience_add_members_params.rbi +2 -2
  52. data/rbi/knockapi/models/audience_member.rbi +2 -2
  53. data/rbi/knockapi/models/audience_remove_members_params.rbi +2 -2
  54. data/rbi/knockapi/models/identify_user_request.rbi +2 -2
  55. data/rbi/knockapi/models/inline_identify_user_request.rbi +4 -4
  56. data/rbi/knockapi/models/message.rbi +11 -3
  57. data/rbi/knockapi/models/message_get_content_response.rbi +1 -1
  58. data/rbi/knockapi/models/message_list_activities_params.rbi +2 -2
  59. data/rbi/knockapi/models/message_list_delivery_logs_params.rbi +2 -2
  60. data/rbi/knockapi/models/message_list_events_params.rbi +2 -2
  61. data/rbi/knockapi/models/message_list_params.rbi +2 -2
  62. data/rbi/knockapi/models/messages/batch_get_content_response.rbi +1 -1
  63. data/rbi/knockapi/models/object_list_messages_params.rbi +2 -2
  64. data/rbi/knockapi/models/object_list_params.rbi +2 -2
  65. data/rbi/knockapi/models/object_list_schedules_params.rbi +2 -2
  66. data/rbi/knockapi/models/object_list_subscriptions_params.rbi +2 -2
  67. data/rbi/knockapi/models/page_info.rbi +2 -2
  68. data/rbi/knockapi/models/providers/slack_list_channels_params.rbi +4 -2
  69. data/rbi/knockapi/models/recipients/ms_teams_channel_data.rbi +1 -1
  70. data/rbi/knockapi/models/recipients/push_channel_data.rbi +1 -1
  71. data/rbi/knockapi/models/recipients/slack_channel_data.rbi +1 -1
  72. data/rbi/knockapi/models/schedule.rbi +8 -8
  73. data/rbi/knockapi/models/schedule_create_params.rbi +8 -8
  74. data/rbi/knockapi/models/schedule_list_params.rbi +2 -2
  75. data/rbi/knockapi/models/schedule_update_params.rbi +8 -8
  76. data/rbi/knockapi/models/schedules/bulk_create_params.rbi +8 -8
  77. data/rbi/knockapi/models/tenant_list_params.rbi +2 -2
  78. data/rbi/knockapi/models/user.rbi +4 -4
  79. data/rbi/knockapi/models/user_list_messages_params.rbi +2 -2
  80. data/rbi/knockapi/models/user_list_params.rbi +2 -2
  81. data/rbi/knockapi/models/user_list_schedules_params.rbi +2 -2
  82. data/rbi/knockapi/models/user_list_subscriptions_params.rbi +2 -2
  83. data/rbi/knockapi/models/users/feed_list_items_params.rbi +4 -4
  84. data/rbi/knockapi/models/workflow_trigger_params.rbi +8 -8
  85. data/rbi/knockapi/resources/messages.rbi +4 -4
  86. data/rbi/knockapi/resources/objects.rbi +4 -4
  87. data/rbi/knockapi/resources/schedules.rbi +9 -9
  88. data/rbi/knockapi/resources/tenants.rbi +1 -1
  89. data/rbi/knockapi/resources/users/feeds.rbi +18 -6
  90. data/rbi/knockapi/resources/users/guides.rbi +4 -4
  91. data/rbi/knockapi/resources/users.rbi +15 -15
  92. data/rbi/knockapi/resources/workflows.rbi +4 -4
  93. data/sig/knockapi/models/message.rbs +8 -3
  94. metadata +2 -2
@@ -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,
@@ -47,10 +47,10 @@ module Knockapi
47
47
  # (string), an inline user request (object), or an inline object request, which is
48
48
  # determined by the presence of a `collection` property.
49
49
  actor: nil,
50
- # An optional map of data to pass into the workflow execution. There is a 1024
51
- # byte limit on the size of any single string value (with the exception of
52
- # [email attachments](/integrations/email/attachments)), and a 10MB limit on the
53
- # size of the full `data` payload.
50
+ # An optional map of data to pass into the workflow execution. There is a 10MB
51
+ # limit on the size of the full `data` payload. Any individual string value
52
+ # greater than 1024 bytes in length will be
53
+ # [truncated](/developer-tools/api-logs#log-truncation) in your logs.
54
54
  data: nil,
55
55
  # The ending date and time for the schedule.
56
56
  ending_at: nil,
@@ -93,10 +93,10 @@ module Knockapi
93
93
  # A reference to a recipient, either a user identifier (string) or an object
94
94
  # reference (ID, collection).
95
95
  actor: nil,
96
- # An optional map of data to pass into the workflow execution. There is a 1024
97
- # byte limit on the size of any single string value (with the exception of
98
- # [email attachments](/integrations/email/attachments)), and a 10MB limit on the
99
- # size of the full `data` payload.
96
+ # An optional map of data to pass into the workflow execution. There is a 10MB
97
+ # limit on the size of the full `data` payload. Any individual string value
98
+ # greater than 1024 bytes in length will be
99
+ # [truncated](/developer-tools/api-logs#log-truncation) in your logs.
100
100
  data: nil,
101
101
  # The ending date and time for the schedule.
102
102
  ending_at: 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,
@@ -24,7 +24,7 @@ module Knockapi
24
24
  before: nil,
25
25
  # Filter tenants by name.
26
26
  name: nil,
27
- # The number of items per page.
27
+ # The number of items per page (defaults to 50).
28
28
  page_size: nil,
29
29
  # Filter tenants by ID.
30
30
  tenant_id: nil,
@@ -13,7 +13,7 @@ module Knockapi
13
13
  ).returns(Knockapi::Models::Users::FeedGetSettingsResponse)
14
14
  end
15
15
  def get_settings(
16
- # The ID for the user that you set when identifying them in Knock.
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, including metadata about the
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 ID for the user that you set when identifying them in Knock.
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 source of the feed items.
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 ID for the user that you set when identifying them in Knock.
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 ID for the user that you set when identifying them in Knock.
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 ID for the user that you set when identifying them in Knock.
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 ID for the user that you set when identifying them in Knock.
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 ID for the user that you set when identifying them in Knock.
52
+ # The unique identifier of the user.
53
53
  user_id,
54
- # URL to the user's avatar image.
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 ID for the user that you set when identifying them in Knock.
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 ID for the user that you set when identifying them in Knock.
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. Allows filtering by
173
- # message status and provides various sorting options. Messages outside the
174
- # account's retention window will not be included in the results.
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 ID for the user that you set when identifying them in Knock.
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 ID for the user that you set when identifying them in Knock.
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 ID for the user that you set when identifying them in Knock.
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 ID for the user that you set when identifying them in Knock.
422
+ # The unique identifier of the user.
423
423
  user_id,
424
424
  # The unique identifier for the channel.
425
425
  channel_id,
@@ -84,10 +84,10 @@ module Knockapi
84
84
  # subsequent cancellation. Should be unique across trigger requests to avoid
85
85
  # unintentional cancellations.
86
86
  cancellation_key: nil,
87
- # An optional map of data to pass into the workflow execution. There is a 1024
88
- # byte limit on the size of any single string value (with the exception of
89
- # [email attachments](/integrations/email/attachments)), and a 10MB limit on the
90
- # size of the full `data` payload.
87
+ # An optional map of data to pass into the workflow execution. There is a 10MB
88
+ # limit on the size of the full `data` payload. Any individual string value
89
+ # greater than 1024 bytes in length will be
90
+ # [truncated](/developer-tools/api-logs#log-truncation) in your logs.
91
91
  data: nil,
92
92
  # An request to set a tenant inline.
93
93
  tenant: nil,
@@ -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.8.1
4
+ version: 1.10.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-18 00:00:00.000000000 Z
11
+ date: 2025-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool