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.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -0
  3. data/README.md +1 -1
  4. data/lib/knockapi/errors.rb +22 -0
  5. data/lib/knockapi/internal/type/array_of.rb +6 -1
  6. data/lib/knockapi/internal/type/base_model.rb +77 -25
  7. data/lib/knockapi/internal/type/boolean.rb +7 -1
  8. data/lib/knockapi/internal/type/converter.rb +42 -34
  9. data/lib/knockapi/internal/type/enum.rb +10 -2
  10. data/lib/knockapi/internal/type/file_input.rb +6 -1
  11. data/lib/knockapi/internal/type/hash_of.rb +6 -1
  12. data/lib/knockapi/internal/type/union.rb +12 -7
  13. data/lib/knockapi/internal/type/unknown.rb +7 -1
  14. data/lib/knockapi/models/audience_add_members_params.rb +2 -2
  15. data/lib/knockapi/models/audience_member.rb +2 -2
  16. data/lib/knockapi/models/audience_remove_members_params.rb +2 -2
  17. data/lib/knockapi/models/identify_user_request.rb +2 -2
  18. data/lib/knockapi/models/inline_identify_user_request.rb +4 -4
  19. data/lib/knockapi/models/message.rb +9 -1
  20. data/lib/knockapi/models/message_get_content_response.rb +2 -2
  21. data/lib/knockapi/models/message_list_activities_params.rb +2 -2
  22. data/lib/knockapi/models/message_list_delivery_logs_params.rb +2 -2
  23. data/lib/knockapi/models/message_list_events_params.rb +2 -2
  24. data/lib/knockapi/models/message_list_params.rb +2 -2
  25. data/lib/knockapi/models/messages/batch_get_content_response.rb +2 -2
  26. data/lib/knockapi/models/object_list_messages_params.rb +2 -2
  27. data/lib/knockapi/models/object_list_params.rb +2 -2
  28. data/lib/knockapi/models/object_list_schedules_params.rb +2 -2
  29. data/lib/knockapi/models/object_list_subscriptions_params.rb +2 -2
  30. data/lib/knockapi/models/page_info.rb +2 -2
  31. data/lib/knockapi/models/recipients/channel_data.rb +3 -3
  32. data/lib/knockapi/models/recipients/channel_data_request.rb +3 -3
  33. data/lib/knockapi/models/recipients/inline_channel_data_request.rb +3 -3
  34. data/lib/knockapi/models/recipients/ms_teams_channel_data.rb +1 -1
  35. data/lib/knockapi/models/recipients/push_channel_data.rb +1 -1
  36. data/lib/knockapi/models/recipients/slack_channel_data.rb +1 -1
  37. data/lib/knockapi/models/schedule_list_params.rb +2 -2
  38. data/lib/knockapi/models/tenant_list_params.rb +2 -2
  39. data/lib/knockapi/models/user.rb +4 -4
  40. data/lib/knockapi/models/user_list_messages_params.rb +2 -2
  41. data/lib/knockapi/models/user_list_params.rb +2 -2
  42. data/lib/knockapi/models/user_list_schedules_params.rb +2 -2
  43. data/lib/knockapi/models/user_list_subscriptions_params.rb +2 -2
  44. data/lib/knockapi/models/users/feed_list_items_params.rb +4 -4
  45. data/lib/knockapi/resources/messages.rb +4 -4
  46. data/lib/knockapi/resources/objects.rb +4 -4
  47. data/lib/knockapi/resources/schedules.rb +1 -1
  48. data/lib/knockapi/resources/tenants.rb +1 -1
  49. data/lib/knockapi/resources/users/feeds.rb +18 -6
  50. data/lib/knockapi/resources/users/guides.rb +4 -4
  51. data/lib/knockapi/resources/users.rb +15 -15
  52. data/lib/knockapi/version.rb +1 -1
  53. data/rbi/knockapi/errors.rbi +16 -0
  54. data/rbi/knockapi/internal/type/boolean.rbi +2 -0
  55. data/rbi/knockapi/internal/type/converter.rbi +15 -15
  56. data/rbi/knockapi/internal/type/union.rbi +5 -0
  57. data/rbi/knockapi/internal/type/unknown.rbi +2 -0
  58. data/rbi/knockapi/models/audience_add_members_params.rbi +2 -2
  59. data/rbi/knockapi/models/audience_member.rbi +2 -2
  60. data/rbi/knockapi/models/audience_remove_members_params.rbi +2 -2
  61. data/rbi/knockapi/models/identify_user_request.rbi +2 -2
  62. data/rbi/knockapi/models/inline_identify_user_request.rbi +4 -4
  63. data/rbi/knockapi/models/message.rbi +11 -3
  64. data/rbi/knockapi/models/message_get_content_response.rbi +1 -1
  65. data/rbi/knockapi/models/message_list_activities_params.rbi +2 -2
  66. data/rbi/knockapi/models/message_list_delivery_logs_params.rbi +2 -2
  67. data/rbi/knockapi/models/message_list_events_params.rbi +2 -2
  68. data/rbi/knockapi/models/message_list_params.rbi +2 -2
  69. data/rbi/knockapi/models/messages/batch_get_content_response.rbi +1 -1
  70. data/rbi/knockapi/models/object_list_messages_params.rbi +2 -2
  71. data/rbi/knockapi/models/object_list_params.rbi +2 -2
  72. data/rbi/knockapi/models/object_list_schedules_params.rbi +2 -2
  73. data/rbi/knockapi/models/object_list_subscriptions_params.rbi +2 -2
  74. data/rbi/knockapi/models/page_info.rbi +2 -2
  75. data/rbi/knockapi/models/recipients/ms_teams_channel_data.rbi +1 -1
  76. data/rbi/knockapi/models/recipients/push_channel_data.rbi +1 -1
  77. data/rbi/knockapi/models/recipients/slack_channel_data.rbi +1 -1
  78. data/rbi/knockapi/models/schedule_list_params.rbi +2 -2
  79. data/rbi/knockapi/models/tenant_list_params.rbi +2 -2
  80. data/rbi/knockapi/models/user.rbi +4 -4
  81. data/rbi/knockapi/models/user_list_messages_params.rbi +2 -2
  82. data/rbi/knockapi/models/user_list_params.rbi +2 -2
  83. data/rbi/knockapi/models/user_list_schedules_params.rbi +2 -2
  84. data/rbi/knockapi/models/user_list_subscriptions_params.rbi +2 -2
  85. data/rbi/knockapi/models/users/feed_list_items_params.rbi +4 -4
  86. data/rbi/knockapi/resources/messages.rbi +4 -4
  87. data/rbi/knockapi/resources/objects.rbi +4 -4
  88. data/rbi/knockapi/resources/schedules.rbi +1 -1
  89. data/rbi/knockapi/resources/tenants.rbi +1 -1
  90. data/rbi/knockapi/resources/users/feeds.rbi +18 -6
  91. data/rbi/knockapi/resources/users/guides.rbi +4 -4
  92. data/rbi/knockapi/resources/users.rbi +15 -15
  93. data/sig/knockapi/errors.rbs +9 -0
  94. data/sig/knockapi/internal/type/converter.rbs +7 -1
  95. data/sig/knockapi/models/message.rbs +8 -3
  96. metadata +2 -2
@@ -16,7 +16,7 @@ module Knockapi
16
16
  #
17
17
  # @param name [String] Filter tenants by name.
18
18
  #
19
- # @param page_size [Integer] The number of items per page.
19
+ # @param page_size [Integer] The number of items per page (defaults to 50).
20
20
  #
21
21
  # @param tenant_id [String] Filter tenants by ID.
22
22
  #
@@ -8,7 +8,7 @@ module Knockapi
8
8
  #
9
9
  # @overload get_settings(user_id, id, request_options: {})
10
10
  #
11
- # @param user_id [String] The ID for the user that you set when identifying them in Knock.
11
+ # @param user_id [String] The unique identifier of the user.
12
12
  #
13
13
  # @param id [String] The unique identifier for the channel.
14
14
  #
@@ -26,12 +26,24 @@ module Knockapi
26
26
  )
27
27
  end
28
28
 
29
- # Returns a paginated list of feed items for a user, including metadata about the
30
- # feed.
29
+ # Returns a paginated list of feed items for a user in reverse chronological
30
+ # order, including metadata about the feed. If the user has not yet been
31
+ # identified within Knock, an empty feed will be returned.
32
+ #
33
+ # You can customize the response using
34
+ # [response filters](/integrations/in-app/knock#customizing-api-response-content)
35
+ # to exclude or only include specific properties on your resources.
36
+ #
37
+ # **Notes:**
38
+ #
39
+ # - When making this call from a client-side environment, use your publishable key
40
+ # along with a user token.
41
+ # - This endpoint’s rate limit is always scoped per-user and per-environment. This
42
+ # is true even for requests made without a signed user token.
31
43
  #
32
44
  # @overload list_items(user_id, id, after: nil, archived: nil, before: nil, has_tenant: nil, page_size: nil, source: nil, status: nil, tenant: nil, trigger_data: nil, workflow_categories: nil, request_options: {})
33
45
  #
34
- # @param user_id [String] The ID for the user that you set when identifying them in Knock.
46
+ # @param user_id [String] The unique identifier of the user.
35
47
  #
36
48
  # @param id [String] The unique identifier for the channel.
37
49
  #
@@ -43,9 +55,9 @@ module Knockapi
43
55
  #
44
56
  # @param has_tenant [Boolean] Whether the feed items have a tenant.
45
57
  #
46
- # @param page_size [Integer] The number of items per page.
58
+ # @param page_size [Integer] The number of items per page (defaults to 50).
47
59
  #
48
- # @param source [String] The source of the feed items.
60
+ # @param source [String] The workflow key associated with the message in the feed.
49
61
  #
50
62
  # @param status [Symbol, Knockapi::Models::Users::FeedListItemsParams::Status] The status of the feed items.
51
63
  #
@@ -8,7 +8,7 @@ module Knockapi
8
8
  #
9
9
  # @overload get_channel(user_id, channel_id, data: nil, tenant: nil, type: nil, request_options: {})
10
10
  #
11
- # @param user_id [String] The ID for the user that you set when identifying them in Knock.
11
+ # @param user_id [String] The unique identifier of the user.
12
12
  #
13
13
  # @param channel_id [String] The unique identifier for the channel.
14
14
  #
@@ -39,7 +39,7 @@ module Knockapi
39
39
  #
40
40
  # @overload mark_message_as_archived(user_id, message_id, channel_id:, guide_id:, guide_key:, guide_step_ref:, content: nil, data: nil, is_final: nil, metadata: nil, tenant: nil, request_options: {})
41
41
  #
42
- # @param user_id [String] The ID for the user that you set when identifying them in Knock.
42
+ # @param user_id [String] The unique identifier of the user.
43
43
  #
44
44
  # @param message_id [String] The unique identifier for the message.
45
45
  #
@@ -82,7 +82,7 @@ module Knockapi
82
82
  #
83
83
  # @overload mark_message_as_interacted(user_id, message_id, channel_id:, guide_id:, guide_key:, guide_step_ref:, content: nil, data: nil, is_final: nil, metadata: nil, tenant: nil, request_options: {})
84
84
  #
85
- # @param user_id [String] The ID for the user that you set when identifying them in Knock.
85
+ # @param user_id [String] The unique identifier of the user.
86
86
  #
87
87
  # @param message_id [String] The unique identifier for the message.
88
88
  #
@@ -125,7 +125,7 @@ module Knockapi
125
125
  #
126
126
  # @overload mark_message_as_seen(user_id, message_id, channel_id:, guide_id:, guide_key:, guide_step_ref:, content: nil, data: nil, is_final: nil, metadata: nil, tenant: nil, request_options: {})
127
127
  #
128
- # @param user_id [String] The ID for the user that you set when identifying them in Knock.
128
+ # @param user_id [String] The unique identifier of the user.
129
129
  #
130
130
  # @param message_id [String] The unique identifier for the message.
131
131
  #
@@ -21,9 +21,9 @@ module Knockapi
21
21
  #
22
22
  # @overload update(user_id, avatar: nil, channel_data: nil, created_at: nil, email: nil, locale: nil, name: nil, phone_number: nil, preferences: nil, timezone: nil, request_options: {})
23
23
  #
24
- # @param user_id [String] The ID for the user that you set when identifying them in Knock.
24
+ # @param user_id [String] The unique identifier of the user.
25
25
  #
26
- # @param avatar [String, nil] URL to the user's avatar image.
26
+ # @param avatar [String, nil] A URL for the avatar of the user.
27
27
  #
28
28
  # @param channel_data [Hash{Symbol=>Knockapi::Models::Recipients::PushChannelData, Knockapi::Models::Recipients::OneSignalChannelData, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}, nil] A request to set channel data for a type of channel inline.
29
29
  #
@@ -68,7 +68,7 @@ module Knockapi
68
68
  #
69
69
  # @param include [Array<Symbol, Knockapi::Models::UserListParams::Include>] Associated resources to include in the response.
70
70
  #
71
- # @param page_size [Integer] The number of items per page.
71
+ # @param page_size [Integer] The number of items per page (defaults to 50).
72
72
  #
73
73
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
74
74
  #
@@ -131,7 +131,7 @@ module Knockapi
131
131
  #
132
132
  # @overload get_channel_data(user_id, channel_id, request_options: {})
133
133
  #
134
- # @param user_id [String] The ID for the user that you set when identifying them in Knock.
134
+ # @param user_id [String] The unique identifier of the user.
135
135
  #
136
136
  # @param channel_id [String] The unique identifier for the channel.
137
137
  #
@@ -154,7 +154,7 @@ module Knockapi
154
154
  #
155
155
  # @overload get_preferences(user_id, id, tenant: nil, request_options: {})
156
156
  #
157
- # @param user_id [String] The ID for the user that you set when identifying them in Knock.
157
+ # @param user_id [String] The unique identifier of the user.
158
158
  #
159
159
  # @param id [String] Unique identifier for the preference set.
160
160
  #
@@ -179,9 +179,9 @@ module Knockapi
179
179
  # Some parameter documentations has been truncated, see
180
180
  # {Knockapi::Models::UserListMessagesParams} for more details.
181
181
  #
182
- # Returns a paginated list of messages for a specific user. Allows filtering by
183
- # message status and provides various sorting options. Messages outside the
184
- # account's retention window will not be included in the results.
182
+ # Returns a paginated list of messages for a specific user. Messages are sorted
183
+ # with the most recent ones appearing first. Messages outside the account's
184
+ # retention window will not be included in the results.
185
185
  #
186
186
  # @overload list_messages(user_id, after: nil, before: nil, channel_id: nil, engagement_status: nil, inserted_at: nil, message_ids: nil, page_size: nil, source: nil, status: nil, tenant: nil, trigger_data: nil, workflow_categories: nil, workflow_recipient_run_id: nil, workflow_run_id: nil, request_options: {})
187
187
  #
@@ -199,7 +199,7 @@ module Knockapi
199
199
  #
200
200
  # @param message_ids [Array<String>] Limits the results to only the message IDs given (max 50). Note: when using this
201
201
  #
202
- # @param page_size [Integer] The number of items per page.
202
+ # @param page_size [Integer] The number of items per page (defaults to 50).
203
203
  #
204
204
  # @param source [String] Limits the results to messages triggered by the given workflow key.
205
205
  #
@@ -236,7 +236,7 @@ module Knockapi
236
236
  #
237
237
  # @overload list_preferences(user_id, request_options: {})
238
238
  #
239
- # @param user_id [String] The ID for the user that you set when identifying them in Knock.
239
+ # @param user_id [String] The unique identifier of the user.
240
240
  #
241
241
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
242
242
  #
@@ -262,7 +262,7 @@ module Knockapi
262
262
  #
263
263
  # @param before [String] The cursor to fetch entries before.
264
264
  #
265
- # @param page_size [Integer] The number of items per page.
265
+ # @param page_size [Integer] The number of items per page (defaults to 50).
266
266
  #
267
267
  # @param tenant [String] The tenant ID to filter schedules for.
268
268
  #
@@ -300,7 +300,7 @@ module Knockapi
300
300
  #
301
301
  # @param objects [Array<String, Knockapi::Models::RecipientReference::ObjectReference>] Only returns subscriptions for the specified object references.
302
302
  #
303
- # @param page_size [Integer] The number of items per page.
303
+ # @param page_size [Integer] The number of items per page (defaults to 50).
304
304
  #
305
305
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
306
306
  #
@@ -350,7 +350,7 @@ module Knockapi
350
350
  #
351
351
  # @overload set_channel_data(user_id, channel_id, data:, request_options: {})
352
352
  #
353
- # @param user_id [String] The ID for the user that you set when identifying them in Knock.
353
+ # @param user_id [String] The unique identifier of the user.
354
354
  #
355
355
  # @param channel_id [String] The unique identifier for the channel.
356
356
  #
@@ -380,7 +380,7 @@ module Knockapi
380
380
  #
381
381
  # @overload set_preferences(user_id, id, categories: nil, channel_types: nil, workflows: nil, request_options: {})
382
382
  #
383
- # @param user_id [String] The ID for the user that you set when identifying them in Knock.
383
+ # @param user_id [String] The unique identifier of the user.
384
384
  #
385
385
  # @param id [String] Unique identifier for the preference set.
386
386
  #
@@ -410,7 +410,7 @@ module Knockapi
410
410
  #
411
411
  # @overload unset_channel_data(user_id, channel_id, request_options: {})
412
412
  #
413
- # @param user_id [String] The ID for the user that you set when identifying them in Knock.
413
+ # @param user_id [String] The unique identifier of the user.
414
414
  #
415
415
  # @param channel_id [String] The unique identifier for the channel.
416
416
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Knockapi
4
- VERSION = "1.8.0"
4
+ VERSION = "1.9.0"
5
5
  end
@@ -8,6 +8,22 @@ module Knockapi
8
8
  end
9
9
 
10
10
  class ConversionError < Knockapi::Errors::Error
11
+ sig { returns(T.nilable(StandardError)) }
12
+ def cause
13
+ end
14
+
15
+ # @api private
16
+ sig do
17
+ params(
18
+ on: T::Class[StandardError],
19
+ method: Symbol,
20
+ target: T.anything,
21
+ value: T.anything,
22
+ cause: T.nilable(StandardError)
23
+ ).returns(T.attached_class)
24
+ end
25
+ def self.new(on:, method:, target:, value:, cause: nil)
26
+ end
11
27
  end
12
28
 
13
29
  class APIError < Knockapi::Errors::Error
@@ -22,6 +22,8 @@ module Knockapi
22
22
 
23
23
  class << self
24
24
  # @api private
25
+ #
26
+ # Coerce value to Boolean if possible, otherwise return the original value.
25
27
  sig do
26
28
  override
27
29
  .params(
@@ -15,12 +15,14 @@ module Knockapi
15
15
  CoerceState =
16
16
  T.type_alias do
17
17
  {
18
- strictness: T.any(T::Boolean, Symbol),
18
+ translate_names: T::Boolean,
19
+ strictness: T::Boolean,
19
20
  exactness: {
20
21
  yes: Integer,
21
22
  no: Integer,
22
23
  maybe: Integer
23
24
  },
25
+ error: T::Class[StandardError],
24
26
  branched: Integer
25
27
  }
26
28
  end
@@ -88,6 +90,15 @@ module Knockapi
88
90
  def self.type_info(spec)
89
91
  end
90
92
 
93
+ # @api private
94
+ sig do
95
+ params(translate_names: T::Boolean).returns(
96
+ Knockapi::Internal::Type::Converter::CoerceState
97
+ )
98
+ end
99
+ def self.new_coerce_state(translate_names: true)
100
+ end
101
+
91
102
  # @api private
92
103
  #
93
104
  # Based on `target`, transform `value` into `target`, to the extent possible:
@@ -109,14 +120,11 @@ module Knockapi
109
120
  def self.coerce(
110
121
  target,
111
122
  value,
112
- # The `strictness` is one of `true`, `false`, or `:strong`. This informs the
113
- # coercion strategy when we have to decide between multiple possible conversion
114
- # targets:
123
+ # The `strictness` is one of `true`, `false`. This informs the coercion strategy
124
+ # when we have to decide between multiple possible conversion targets:
115
125
  #
116
126
  # - `true`: the conversion must be exact, with minimum coercion.
117
127
  # - `false`: the conversion can be approximate, with some coercion.
118
- # - `:strong`: the conversion must be exact, with no coercion, and raise an error
119
- # if not possible.
120
128
  #
121
129
  # The `exactness` is `Hash` with keys being one of `yes`, `no`, or `maybe`. For
122
130
  # any given conversion attempt, the exactness will be updated based on how closely
@@ -128,15 +136,7 @@ module Knockapi
128
136
  # - `no`: the value cannot be converted to the target type.
129
137
  #
130
138
  # See implementation below for more details.
131
- state: {
132
- strictness: true,
133
- exactness: {
134
- yes: 0,
135
- no: 0,
136
- maybe: 0
137
- },
138
- branched: 0
139
- }
139
+ state: Knockapi::Internal::Type::Converter.new_coerce_state
140
140
  )
141
141
  end
142
142
 
@@ -78,6 +78,11 @@ module Knockapi
78
78
  end
79
79
 
80
80
  # @api private
81
+ #
82
+ # Tries to efficiently coerce the given value to one of the known variants.
83
+ #
84
+ # If the value cannot match any of the known variants, the coercion is considered
85
+ # non-viable and returns the original value.
81
86
  sig do
82
87
  override
83
88
  .params(
@@ -22,6 +22,8 @@ module Knockapi
22
22
 
23
23
  class << self
24
24
  # @api private
25
+ #
26
+ # No coercion needed for Unknown type.
25
27
  sig do
26
28
  override
27
29
  .params(
@@ -98,7 +98,7 @@ module Knockapi
98
98
  )
99
99
  end
100
100
 
101
- # The ID for the user that you set when identifying them in Knock.
101
+ # The unique identifier of the user.
102
102
  sig { returns(T.nilable(String)) }
103
103
  attr_reader :id
104
104
 
@@ -108,7 +108,7 @@ module Knockapi
108
108
  # An object containing the user's ID.
109
109
  sig { params(id: String).returns(T.attached_class) }
110
110
  def self.new(
111
- # The ID for the user that you set when identifying them in Knock.
111
+ # The unique identifier of the user.
112
112
  id: nil
113
113
  )
114
114
  end
@@ -25,7 +25,7 @@ module Knockapi
25
25
  sig { params(user: Knockapi::User::OrHash).void }
26
26
  attr_writer :user
27
27
 
28
- # The ID for the user that you set when identifying them in Knock.
28
+ # The unique identifier of the user.
29
29
  sig { returns(String) }
30
30
  attr_accessor :user_id
31
31
 
@@ -52,7 +52,7 @@ module Knockapi
52
52
  # receive notifications through Knock. Users are the most common recipients of
53
53
  # notifications and are always referenced by your internal identifier.
54
54
  user:,
55
- # The ID for the user that you set when identifying them in Knock.
55
+ # The unique identifier of the user.
56
56
  user_id:,
57
57
  # The unique identifier for the tenant.
58
58
  tenant: nil
@@ -102,7 +102,7 @@ module Knockapi
102
102
  )
103
103
  end
104
104
 
105
- # The ID for the user that you set when identifying them in Knock.
105
+ # The unique identifier of the user.
106
106
  sig { returns(T.nilable(String)) }
107
107
  attr_reader :id
108
108
 
@@ -112,7 +112,7 @@ module Knockapi
112
112
  # An object containing the user's ID.
113
113
  sig { params(id: String).returns(T.attached_class) }
114
114
  def self.new(
115
- # The ID for the user that you set when identifying them in Knock.
115
+ # The unique identifier of the user.
116
116
  id: nil
117
117
  )
118
118
  end
@@ -8,7 +8,7 @@ module Knockapi
8
8
  T.any(Knockapi::IdentifyUserRequest, Knockapi::Internal::AnyHash)
9
9
  end
10
10
 
11
- # URL to the user's avatar image.
11
+ # A URL for the avatar of the user.
12
12
  sig { returns(T.nilable(String)) }
13
13
  attr_accessor :avatar
14
14
 
@@ -104,7 +104,7 @@ module Knockapi
104
104
  ).returns(T.attached_class)
105
105
  end
106
106
  def self.new(
107
- # URL to the user's avatar image.
107
+ # A URL for the avatar of the user.
108
108
  avatar: nil,
109
109
  # A request to set channel data for a type of channel inline.
110
110
  channel_data: nil,
@@ -11,11 +11,11 @@ module Knockapi
11
11
  )
12
12
  end
13
13
 
14
- # The ID for the user that you set when identifying them in Knock.
14
+ # The unique identifier of the user.
15
15
  sig { returns(String) }
16
16
  attr_accessor :id
17
17
 
18
- # URL to the user's avatar image.
18
+ # A URL for the avatar of the user.
19
19
  sig { returns(T.nilable(String)) }
20
20
  attr_accessor :avatar
21
21
 
@@ -113,9 +113,9 @@ module Knockapi
113
113
  ).returns(T.attached_class)
114
114
  end
115
115
  def self.new(
116
- # The ID for the user that you set when identifying them in Knock.
116
+ # The unique identifier of the user.
117
117
  id:,
118
- # URL to the user's avatar image.
118
+ # A URL for the avatar of the user.
119
119
  avatar: nil,
120
120
  # A request to set channel data for a type of channel inline.
121
121
  channel_data: nil,
@@ -328,13 +328,18 @@ module Knockapi
328
328
  sig { returns(String) }
329
329
  attr_accessor :version_id
330
330
 
331
+ # The step reference for the step in the workflow that generated the message
332
+ sig { returns(T.nilable(String)) }
333
+ attr_accessor :step_ref
334
+
331
335
  # The workflow that triggered the message.
332
336
  sig do
333
337
  params(
334
338
  _typename: String,
335
339
  categories: T::Array[String],
336
340
  key: String,
337
- version_id: String
341
+ version_id: String,
342
+ step_ref: T.nilable(String)
338
343
  ).returns(T.attached_class)
339
344
  end
340
345
  def self.new(
@@ -344,7 +349,9 @@ module Knockapi
344
349
  # The key of the workflow that triggered the message.
345
350
  key:,
346
351
  # The ID of the version of the workflow that triggered the message.
347
- version_id:
352
+ version_id:,
353
+ # The step reference for the step in the workflow that generated the message
354
+ step_ref: nil
348
355
  )
349
356
  end
350
357
 
@@ -354,7 +361,8 @@ module Knockapi
354
361
  _typename: String,
355
362
  categories: T::Array[String],
356
363
  key: String,
357
- version_id: String
364
+ version_id: String,
365
+ step_ref: T.nilable(String)
358
366
  }
359
367
  )
360
368
  end
@@ -258,7 +258,7 @@ module Knockapi
258
258
  sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
259
259
  attr_accessor :data
260
260
 
261
- # The content of a push notification.
261
+ # Push channel data.
262
262
  sig do
263
263
  params(
264
264
  token: String,
@@ -28,7 +28,7 @@ module Knockapi
28
28
  sig { params(before: String).void }
29
29
  attr_writer :before
30
30
 
31
- # The number of items per page.
31
+ # The number of items per page (defaults to 50).
32
32
  sig { returns(T.nilable(Integer)) }
33
33
  attr_reader :page_size
34
34
 
@@ -56,7 +56,7 @@ module Knockapi
56
56
  after: nil,
57
57
  # The cursor to fetch entries before.
58
58
  before: nil,
59
- # The number of items per page.
59
+ # The number of items per page (defaults to 50).
60
60
  page_size: nil,
61
61
  # The trigger data to filter activities by.
62
62
  trigger_data: nil,
@@ -28,7 +28,7 @@ module Knockapi
28
28
  sig { params(before: String).void }
29
29
  attr_writer :before
30
30
 
31
- # The number of items per page.
31
+ # The number of items per page (defaults to 50).
32
32
  sig { returns(T.nilable(Integer)) }
33
33
  attr_reader :page_size
34
34
 
@@ -48,7 +48,7 @@ module Knockapi
48
48
  after: nil,
49
49
  # The cursor to fetch entries before.
50
50
  before: nil,
51
- # The number of items per page.
51
+ # The number of items per page (defaults to 50).
52
52
  page_size: nil,
53
53
  request_options: {}
54
54
  )
@@ -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
 
@@ -45,7 +45,7 @@ module Knockapi
45
45
  after: nil,
46
46
  # The cursor to fetch entries before.
47
47
  before: nil,
48
- # The number of items per page.
48
+ # The number of items per page (defaults to 50).
49
49
  page_size: nil,
50
50
  request_options: {}
51
51
  )
@@ -68,7 +68,7 @@ module Knockapi
68
68
  sig { params(message_ids: T::Array[String]).void }
69
69
  attr_writer :message_ids
70
70
 
71
- # The number of items per page.
71
+ # The number of items per page (defaults to 50).
72
72
  sig { returns(T.nilable(Integer)) }
73
73
  attr_reader :page_size
74
74
 
@@ -168,7 +168,7 @@ module Knockapi
168
168
  # Limits the results to only the message IDs given (max 50). Note: when using this
169
169
  # option, the results will be subject to any other filters applied to the query.
170
170
  message_ids: nil,
171
- # The number of items per page.
171
+ # The number of items per page (defaults to 50).
172
172
  page_size: nil,
173
173
  # Limits the results to messages triggered by the given workflow key.
174
174
  source: nil,
@@ -262,7 +262,7 @@ module Knockapi
262
262
  sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
263
263
  attr_accessor :data
264
264
 
265
- # The content of a push notification.
265
+ # Push channel data.
266
266
  sig do
267
267
  params(
268
268
  token: String,
@@ -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
 
@@ -177,7 +177,7 @@ module Knockapi
177
177
  # Limits the results to only the message IDs given (max 50). Note: when using this
178
178
  # option, the results will be subject to any other filters applied to the query.
179
179
  message_ids: nil,
180
- # The number of items per page.
180
+ # The number of items per page (defaults to 50).
181
181
  page_size: nil,
182
182
  # Limits the results to messages triggered by the given workflow key.
183
183
  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
  # Includes preferences of the objects 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
  )
@@ -28,7 +28,7 @@ module Knockapi
28
28
  sig { params(before: String).void }
29
29
  attr_writer :before
30
30
 
31
- # The number of items per page.
31
+ # The number of items per page (defaults to 50).
32
32
  sig { returns(T.nilable(Integer)) }
33
33
  attr_reader :page_size
34
34
 
@@ -64,7 +64,7 @@ module Knockapi
64
64
  after: nil,
65
65
  # The cursor to fetch entries before.
66
66
  before: nil,
67
- # The number of items per page.
67
+ # The number of items per page (defaults to 50).
68
68
  page_size: nil,
69
69
  # Filter schedules by tenant id.
70
70
  tenant: nil,
@@ -79,7 +79,7 @@ module Knockapi
79
79
  end
80
80
  attr_writer :objects
81
81
 
82
- # The number of items per page.
82
+ # The number of items per page (defaults to 50).
83
83
  sig { returns(T.nilable(Integer)) }
84
84
  attr_reader :page_size
85
85
 
@@ -146,7 +146,7 @@ module Knockapi
146
146
  mode: nil,
147
147
  # Objects to filter by (only used if mode is `recipient`).
148
148
  objects: nil,
149
- # The number of items per page.
149
+ # The number of items per page (defaults to 50).
150
150
  page_size: nil,
151
151
  # Recipients to filter by (only used if mode is `object`).
152
152
  recipients: nil,