knockapi 1.30.0 → 1.31.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 968b7c6cd1bcba26164014728aac65bd2adbd9ece73f8b98f2646cded91ebe4d
4
- data.tar.gz: c0d80064448643c1041421596c5467f80d33f1e94e3b0876f5ecd39bad794023
3
+ metadata.gz: 0e8273749767458d8e53e1e29f488e9430ebcd3b598b764b1e64079e3ca2b9c8
4
+ data.tar.gz: 661542117145e4360155fdea359be342b0d9e8ba294534ecc0a4dc05373399a5
5
5
  SHA512:
6
- metadata.gz: 1ffa2a84f9650b45de08419cc9976a1679fca4cc0864785a40f5a3a98c73350178820282b755e3537e5e3f146e81e81dc442738bac78c9f69bb2b8296e06ac2d
7
- data.tar.gz: 65cb415912b9e29467ea9c31f2f1f50bd946838b99353a73f8f33b9b4de5f5be6dbd6a6556843e516b71bff4b5c7320b364d5983853563e1750a440905c3aa40
6
+ metadata.gz: b49d3818135a81fe3ffdb19f7aba99201600c459ccafd057df84d38e9998eab5a9801fbdbf3ee7e72a88d0a339591817ad8eee4db8450402d1275d8e132d3521
7
+ data.tar.gz: 90a026b11a74ed720c9ad74965f0a631f0d816079d173db93a2c9ec06ef102fa3f6e56d0a9d4b041e444352e0792812aae6ec05ad07b5fee0af631121c612abb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.31.0 (2026-02-19)
4
+
5
+ Full Changelog: [v1.30.0...v1.31.0](https://github.com/knocklabs/knock-ruby/compare/v1.30.0...v1.31.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([dcc8c6c](https://github.com/knocklabs/knock-ruby/commit/dcc8c6c3e141eb231a053dc35325c8bc639068e8))
10
+ * **api:** api update ([2d7ec95](https://github.com/knocklabs/knock-ruby/commit/2d7ec957ddd6b1069ac8aaaa3d7b1c70b456a452))
11
+ * **api:** api update ([f78aef3](https://github.com/knocklabs/knock-ruby/commit/f78aef3b059e14786543f033c8a603da8961e7dc))
12
+ * **api:** api update ([1cd0625](https://github.com/knocklabs/knock-ruby/commit/1cd0625d5420735e1851b16a7af23fe19b41a394))
13
+ * **api:** api update ([3ef0f26](https://github.com/knocklabs/knock-ruby/commit/3ef0f264c2bb77151eca4cd3474c46d318c36749))
14
+ * **api:** api update ([1562c35](https://github.com/knocklabs/knock-ruby/commit/1562c35982e64c0870123987b022cb46490be6f8))
15
+ * **api:** api update ([1381ed5](https://github.com/knocklabs/knock-ruby/commit/1381ed582a7df881d56425ceb8785664ca6130e9))
16
+ * **api:** api update ([0be92ad](https://github.com/knocklabs/knock-ruby/commit/0be92ad96b5f1e973f36fc89fabc2cfdb873cc82))
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **client:** always add content-length to post body, even when empty ([4cd7959](https://github.com/knocklabs/knock-ruby/commit/4cd79592e97e3fafa21d247ab81a72e4bded4f72))
22
+ * **client:** loosen json header parsing ([6ab2346](https://github.com/knocklabs/knock-ruby/commit/6ab23468b66b8fdf7de9ebe96d49f1400300c00c))
23
+
24
+
25
+ ### Chores
26
+
27
+ * **docs:** remove www prefix ([5719ce2](https://github.com/knocklabs/knock-ruby/commit/5719ce273d7996e16385184f536facd6fc59c096))
28
+ * update mock server docs ([bc0b313](https://github.com/knocklabs/knock-ruby/commit/bc0b313569f751b55f1d3c2ca69a6942c0b012b8))
29
+
3
30
  ## 1.30.0 (2026-01-29)
4
31
 
5
32
  Full Changelog: [v1.29.0...v1.30.0](https://github.com/knocklabs/knock-ruby/compare/v1.29.0...v1.30.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "knockapi", "~> 1.30.0"
20
+ gem "knockapi", "~> 1.31.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -75,7 +75,7 @@ module Knockapi
75
75
 
76
76
  case body
77
77
  in nil
78
- nil
78
+ req["content-length"] ||= 0 unless req["transfer-encoding"]
79
79
  in String
80
80
  req["content-length"] ||= body.bytesize.to_s unless req["transfer-encoding"]
81
81
  req.body_stream = Knockapi::Internal::Util::ReadIOAdapter.new(body, &blk)
@@ -485,7 +485,7 @@ module Knockapi
485
485
  end
486
486
 
487
487
  # @type [Regexp]
488
- JSON_CONTENT = %r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}
488
+ JSON_CONTENT = %r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}
489
489
  # @type [Regexp]
490
490
  JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}
491
491
 
@@ -8,13 +8,13 @@ module Knockapi
8
8
  include Knockapi::Internal::Type::RequestParameters
9
9
 
10
10
  # @!attribute members
11
- # A list of audience members to add. Limited to 1,000 members per request.
11
+ # A list of audience members to add. You can add up to 1,000 members per request.
12
12
  #
13
13
  # @return [Array<Knockapi::Models::AudienceAddMembersParams::Member>]
14
14
  required :members, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::AudienceAddMembersParams::Member] }
15
15
 
16
16
  # @!method initialize(members:, request_options: {})
17
- # @param members [Array<Knockapi::Models::AudienceAddMembersParams::Member>] A list of audience members to add. Limited to 1,000 members per request.
17
+ # @param members [Array<Knockapi::Models::AudienceAddMembersParams::Member>] A list of audience members to add. You can add up to 1,000 members per request.
18
18
  #
19
19
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
20
20
 
@@ -8,13 +8,17 @@ module Knockapi
8
8
  include Knockapi::Internal::Type::RequestParameters
9
9
 
10
10
  # @!attribute members
11
- # A list of audience members to remove.
11
+ # A list of audience members to remove. You can remove up to 1,000 members per
12
+ # request.
12
13
  #
13
14
  # @return [Array<Knockapi::Models::AudienceRemoveMembersParams::Member>]
14
15
  required :members, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::AudienceRemoveMembersParams::Member] }
15
16
 
16
17
  # @!method initialize(members:, request_options: {})
17
- # @param members [Array<Knockapi::Models::AudienceRemoveMembersParams::Member>] A list of audience members to remove.
18
+ # Some parameter documentations has been truncated, see
19
+ # {Knockapi::Models::AudienceRemoveMembersParams} for more details.
20
+ #
21
+ # @param members [Array<Knockapi::Models::AudienceRemoveMembersParams::Member>] A list of audience members to remove. You can remove up to 1,000 members per req
18
22
  #
19
23
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
20
24
 
@@ -147,37 +147,37 @@ module Knockapi
147
147
 
148
148
  class InsertedAt < Knockapi::Internal::Type::BaseModel
149
149
  # @!attribute gt
150
- # Limits the results to messages inserted after the given date.
150
+ # Limits the results to items inserted after the given date.
151
151
  #
152
152
  # @return [String, nil]
153
153
  optional :gt, String
154
154
 
155
155
  # @!attribute gte
156
- # Limits the results to messages inserted after or on the given date.
156
+ # Limits the results to items inserted after or on the given date.
157
157
  #
158
158
  # @return [String, nil]
159
159
  optional :gte, String
160
160
 
161
161
  # @!attribute lt
162
- # Limits the results to messages inserted before the given date.
162
+ # Limits the results to items inserted before the given date.
163
163
  #
164
164
  # @return [String, nil]
165
165
  optional :lt, String
166
166
 
167
167
  # @!attribute lte
168
- # Limits the results to messages inserted before or on the given date.
168
+ # Limits the results to items inserted before or on the given date.
169
169
  #
170
170
  # @return [String, nil]
171
171
  optional :lte, String
172
172
 
173
173
  # @!method initialize(gt: nil, gte: nil, lt: nil, lte: nil)
174
- # @param gt [String] Limits the results to messages inserted after the given date.
174
+ # @param gt [String] Limits the results to items inserted after the given date.
175
175
  #
176
- # @param gte [String] Limits the results to messages inserted after or on the given date.
176
+ # @param gte [String] Limits the results to items inserted after or on the given date.
177
177
  #
178
- # @param lt [String] Limits the results to messages inserted before the given date.
178
+ # @param lt [String] Limits the results to items inserted before the given date.
179
179
  #
180
- # @param lte [String] Limits the results to messages inserted before or on the given date.
180
+ # @param lte [String] Limits the results to items inserted before or on the given date.
181
181
  end
182
182
 
183
183
  module Status
@@ -148,37 +148,37 @@ module Knockapi
148
148
 
149
149
  class InsertedAt < Knockapi::Internal::Type::BaseModel
150
150
  # @!attribute gt
151
- # Limits the results to messages inserted after the given date.
151
+ # Limits the results to items inserted after the given date.
152
152
  #
153
153
  # @return [String, nil]
154
154
  optional :gt, String
155
155
 
156
156
  # @!attribute gte
157
- # Limits the results to messages inserted after or on the given date.
157
+ # Limits the results to items inserted after or on the given date.
158
158
  #
159
159
  # @return [String, nil]
160
160
  optional :gte, String
161
161
 
162
162
  # @!attribute lt
163
- # Limits the results to messages inserted before the given date.
163
+ # Limits the results to items inserted before the given date.
164
164
  #
165
165
  # @return [String, nil]
166
166
  optional :lt, String
167
167
 
168
168
  # @!attribute lte
169
- # Limits the results to messages inserted before or on the given date.
169
+ # Limits the results to items inserted before or on the given date.
170
170
  #
171
171
  # @return [String, nil]
172
172
  optional :lte, String
173
173
 
174
174
  # @!method initialize(gt: nil, gte: nil, lt: nil, lte: nil)
175
- # @param gt [String] Limits the results to messages inserted after the given date.
175
+ # @param gt [String] Limits the results to items inserted after the given date.
176
176
  #
177
- # @param gte [String] Limits the results to messages inserted after or on the given date.
177
+ # @param gte [String] Limits the results to items inserted after or on the given date.
178
178
  #
179
- # @param lt [String] Limits the results to messages inserted before the given date.
179
+ # @param lt [String] Limits the results to items inserted before the given date.
180
180
  #
181
- # @param lte [String] Limits the results to messages inserted before or on the given date.
181
+ # @param lte [String] Limits the results to items inserted before or on the given date.
182
182
  end
183
183
 
184
184
  module Status
@@ -147,37 +147,37 @@ module Knockapi
147
147
 
148
148
  class InsertedAt < Knockapi::Internal::Type::BaseModel
149
149
  # @!attribute gt
150
- # Limits the results to messages inserted after the given date.
150
+ # Limits the results to items inserted after the given date.
151
151
  #
152
152
  # @return [String, nil]
153
153
  optional :gt, String
154
154
 
155
155
  # @!attribute gte
156
- # Limits the results to messages inserted after or on the given date.
156
+ # Limits the results to items inserted after or on the given date.
157
157
  #
158
158
  # @return [String, nil]
159
159
  optional :gte, String
160
160
 
161
161
  # @!attribute lt
162
- # Limits the results to messages inserted before the given date.
162
+ # Limits the results to items inserted before the given date.
163
163
  #
164
164
  # @return [String, nil]
165
165
  optional :lt, String
166
166
 
167
167
  # @!attribute lte
168
- # Limits the results to messages inserted before or on the given date.
168
+ # Limits the results to items inserted before or on the given date.
169
169
  #
170
170
  # @return [String, nil]
171
171
  optional :lte, String
172
172
 
173
173
  # @!method initialize(gt: nil, gte: nil, lt: nil, lte: nil)
174
- # @param gt [String] Limits the results to messages inserted after the given date.
174
+ # @param gt [String] Limits the results to items inserted after the given date.
175
175
  #
176
- # @param gte [String] Limits the results to messages inserted after or on the given date.
176
+ # @param gte [String] Limits the results to items inserted after or on the given date.
177
177
  #
178
- # @param lt [String] Limits the results to messages inserted before the given date.
178
+ # @param lt [String] Limits the results to items inserted before the given date.
179
179
  #
180
- # @param lte [String] Limits the results to messages inserted before or on the given date.
180
+ # @param lte [String] Limits the results to items inserted before or on the given date.
181
181
  end
182
182
 
183
183
  module Status
@@ -26,12 +26,25 @@ module Knockapi
26
26
  # @return [String, nil]
27
27
  optional :before, String
28
28
 
29
+ # @!attribute exclude
30
+ # Comma-separated list of field paths to exclude from the response. Use dot
31
+ # notation for nested fields (e.g., `entries.archived_at`). Limited to 3 levels
32
+ # deep.
33
+ #
34
+ # @return [String, nil]
35
+ optional :exclude, String
36
+
29
37
  # @!attribute has_tenant
30
38
  # Whether the feed items have a tenant.
31
39
  #
32
40
  # @return [Boolean, nil]
33
41
  optional :has_tenant, Knockapi::Internal::Type::Boolean
34
42
 
43
+ # @!attribute inserted_at
44
+ #
45
+ # @return [Knockapi::Models::Users::FeedListItemsParams::InsertedAt, nil]
46
+ optional :inserted_at, -> { Knockapi::Users::FeedListItemsParams::InsertedAt }
47
+
35
48
  # @!attribute locale
36
49
  # The locale to render the feed items in. Must be in the IETF 5646 format (e.g.
37
50
  # `en-US`). When not provided, will default to the locale that the feed items were
@@ -41,6 +54,15 @@ module Knockapi
41
54
  # @return [String, nil]
42
55
  optional :locale, String
43
56
 
57
+ # @!attribute mode
58
+ # The mode to render the feed items in. Can be `compact` or `rich`. Defaults to
59
+ # `rich`. When `mode` is `compact`, feed items will not have `activities` and
60
+ # `total_activities` fields; the `data` field will not include nested arrays and
61
+ # objects; and the `actors` field will only have up to one actor.
62
+ #
63
+ # @return [Symbol, Knockapi::Models::Users::FeedListItemsParams::Mode, nil]
64
+ optional :mode, enum: -> { Knockapi::Users::FeedListItemsParams::Mode }
65
+
44
66
  # @!attribute page_size
45
67
  # The number of items per page (defaults to 50).
46
68
  #
@@ -77,7 +99,7 @@ module Knockapi
77
99
  # @return [Array<String>, nil]
78
100
  optional :workflow_categories, Knockapi::Internal::Type::ArrayOf[String]
79
101
 
80
- # @!method initialize(after: nil, archived: nil, before: nil, has_tenant: nil, locale: nil, page_size: nil, source: nil, status: nil, tenant: nil, trigger_data: nil, workflow_categories: nil, request_options: {})
102
+ # @!method initialize(after: nil, archived: nil, before: nil, exclude: nil, has_tenant: nil, inserted_at: nil, locale: nil, mode: nil, page_size: nil, source: nil, status: nil, tenant: nil, trigger_data: nil, workflow_categories: nil, request_options: {})
81
103
  # Some parameter documentations has been truncated, see
82
104
  # {Knockapi::Models::Users::FeedListItemsParams} for more details.
83
105
  #
@@ -87,10 +109,16 @@ module Knockapi
87
109
  #
88
110
  # @param before [String] The cursor to fetch entries before.
89
111
  #
112
+ # @param exclude [String] Comma-separated list of field paths to exclude from the response. Use dot notati
113
+ #
90
114
  # @param has_tenant [Boolean] Whether the feed items have a tenant.
91
115
  #
116
+ # @param inserted_at [Knockapi::Models::Users::FeedListItemsParams::InsertedAt]
117
+ #
92
118
  # @param locale [String] The locale to render the feed items in. Must be in the IETF 5646 format (e.g. `e
93
119
  #
120
+ # @param mode [Symbol, Knockapi::Models::Users::FeedListItemsParams::Mode] The mode to render the feed items in. Can be `compact` or `rich`. Defaults to `r
121
+ #
94
122
  # @param page_size [Integer] The number of items per page (defaults to 50).
95
123
  #
96
124
  # @param source [String] The workflow key associated with the message in the feed.
@@ -117,6 +145,55 @@ module Knockapi
117
145
  # @return [Array<Symbol>]
118
146
  end
119
147
 
148
+ class InsertedAt < Knockapi::Internal::Type::BaseModel
149
+ # @!attribute gt
150
+ # Limits the results to items inserted after the given date.
151
+ #
152
+ # @return [String, nil]
153
+ optional :gt, String
154
+
155
+ # @!attribute gte
156
+ # Limits the results to items inserted after or on the given date.
157
+ #
158
+ # @return [String, nil]
159
+ optional :gte, String
160
+
161
+ # @!attribute lt
162
+ # Limits the results to items inserted before the given date.
163
+ #
164
+ # @return [String, nil]
165
+ optional :lt, String
166
+
167
+ # @!attribute lte
168
+ # Limits the results to items inserted before or on the given date.
169
+ #
170
+ # @return [String, nil]
171
+ optional :lte, String
172
+
173
+ # @!method initialize(gt: nil, gte: nil, lt: nil, lte: nil)
174
+ # @param gt [String] Limits the results to items inserted after the given date.
175
+ #
176
+ # @param gte [String] Limits the results to items inserted after or on the given date.
177
+ #
178
+ # @param lt [String] Limits the results to items inserted before the given date.
179
+ #
180
+ # @param lte [String] Limits the results to items inserted before or on the given date.
181
+ end
182
+
183
+ # The mode to render the feed items in. Can be `compact` or `rich`. Defaults to
184
+ # `rich`. When `mode` is `compact`, feed items will not have `activities` and
185
+ # `total_activities` fields; the `data` field will not include nested arrays and
186
+ # objects; and the `actors` field will only have up to one actor.
187
+ module Mode
188
+ extend Knockapi::Internal::Type::Enum
189
+
190
+ COMPACT = :compact
191
+ RICH = :rich
192
+
193
+ # @!method self.values
194
+ # @return [Array<Symbol>]
195
+ end
196
+
120
197
  # The status of the feed items.
121
198
  module Status
122
199
  extend Knockapi::Internal::Type::Enum
@@ -9,7 +9,7 @@ module Knockapi
9
9
  #
10
10
  # @param key [String] The key of the audience.
11
11
  #
12
- # @param members [Array<Knockapi::Models::AudienceAddMembersParams::Member>] A list of audience members to add. Limited to 1,000 members per request.
12
+ # @param members [Array<Knockapi::Models::AudienceAddMembersParams::Member>] A list of audience members to add. You can add up to 1,000 members per request.
13
13
  #
14
14
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
15
15
  #
@@ -47,13 +47,16 @@ module Knockapi
47
47
  )
48
48
  end
49
49
 
50
+ # Some parameter documentations has been truncated, see
51
+ # {Knockapi::Models::AudienceRemoveMembersParams} for more details.
52
+ #
50
53
  # Removes one or more members from the specified audience.
51
54
  #
52
55
  # @overload remove_members(key, members:, request_options: {})
53
56
  #
54
57
  # @param key [String] The key of the audience.
55
58
  #
56
- # @param members [Array<Knockapi::Models::AudienceRemoveMembersParams::Member>] A list of audience members to remove.
59
+ # @param members [Array<Knockapi::Models::AudienceRemoveMembersParams::Member>] A list of audience members to remove. You can remove up to 1,000 members per req
57
60
  #
58
61
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
59
62
  #
@@ -47,7 +47,7 @@ module Knockapi
47
47
  # automatically excluded from both the `data` and `activities` fields of
48
48
  # `UserInAppFeedResponse`.
49
49
  #
50
- # @overload list_items(user_id, id, after: nil, archived: nil, before: nil, has_tenant: nil, locale: nil, page_size: nil, source: nil, status: nil, tenant: nil, trigger_data: nil, workflow_categories: nil, request_options: {})
50
+ # @overload list_items(user_id, id, after: nil, archived: nil, before: nil, exclude: nil, has_tenant: nil, inserted_at: nil, locale: nil, mode: nil, page_size: nil, source: nil, status: nil, tenant: nil, trigger_data: nil, workflow_categories: nil, request_options: {})
51
51
  #
52
52
  # @param user_id [String] The unique identifier of the user.
53
53
  #
@@ -59,10 +59,16 @@ module Knockapi
59
59
  #
60
60
  # @param before [String] The cursor to fetch entries before.
61
61
  #
62
+ # @param exclude [String] Comma-separated list of field paths to exclude from the response. Use dot notati
63
+ #
62
64
  # @param has_tenant [Boolean] Whether the feed items have a tenant.
63
65
  #
66
+ # @param inserted_at [Knockapi::Models::Users::FeedListItemsParams::InsertedAt]
67
+ #
64
68
  # @param locale [String] The locale to render the feed items in. Must be in the IETF 5646 format (e.g. `e
65
69
  #
70
+ # @param mode [Symbol, Knockapi::Models::Users::FeedListItemsParams::Mode] The mode to render the feed items in. Can be `compact` or `rich`. Defaults to `r
71
+ #
66
72
  # @param page_size [Integer] The number of items per page (defaults to 50).
67
73
  #
68
74
  # @param source [String] The workflow key associated with the message in the feed.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Knockapi
4
- VERSION = "1.30.0"
4
+ VERSION = "1.31.0"
5
5
  end
@@ -296,7 +296,7 @@ module Knockapi
296
296
  end
297
297
 
298
298
  JSON_CONTENT =
299
- T.let(%r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}, Regexp)
299
+ T.let(%r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}, Regexp)
300
300
  JSONL_CONTENT =
301
301
  T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp)
302
302
 
@@ -11,7 +11,7 @@ module Knockapi
11
11
  T.any(Knockapi::AudienceAddMembersParams, Knockapi::Internal::AnyHash)
12
12
  end
13
13
 
14
- # A list of audience members to add. Limited to 1,000 members per request.
14
+ # A list of audience members to add. You can add up to 1,000 members per request.
15
15
  sig { returns(T::Array[Knockapi::AudienceAddMembersParams::Member]) }
16
16
  attr_accessor :members
17
17
 
@@ -22,7 +22,7 @@ module Knockapi
22
22
  ).returns(T.attached_class)
23
23
  end
24
24
  def self.new(
25
- # A list of audience members to add. Limited to 1,000 members per request.
25
+ # A list of audience members to add. You can add up to 1,000 members per request.
26
26
  members:,
27
27
  request_options: {}
28
28
  )
@@ -14,7 +14,8 @@ module Knockapi
14
14
  )
15
15
  end
16
16
 
17
- # A list of audience members to remove.
17
+ # A list of audience members to remove. You can remove up to 1,000 members per
18
+ # request.
18
19
  sig { returns(T::Array[Knockapi::AudienceRemoveMembersParams::Member]) }
19
20
  attr_accessor :members
20
21
 
@@ -26,7 +27,8 @@ module Knockapi
26
27
  ).returns(T.attached_class)
27
28
  end
28
29
  def self.new(
29
- # A list of audience members to remove.
30
+ # A list of audience members to remove. You can remove up to 1,000 members per
31
+ # request.
30
32
  members:,
31
33
  request_options: {}
32
34
  )
@@ -286,28 +286,28 @@ module Knockapi
286
286
  )
287
287
  end
288
288
 
289
- # Limits the results to messages inserted after the given date.
289
+ # Limits the results to items inserted after the given date.
290
290
  sig { returns(T.nilable(String)) }
291
291
  attr_reader :gt
292
292
 
293
293
  sig { params(gt: String).void }
294
294
  attr_writer :gt
295
295
 
296
- # Limits the results to messages inserted after or on the given date.
296
+ # Limits the results to items inserted after or on the given date.
297
297
  sig { returns(T.nilable(String)) }
298
298
  attr_reader :gte
299
299
 
300
300
  sig { params(gte: String).void }
301
301
  attr_writer :gte
302
302
 
303
- # Limits the results to messages inserted before the given date.
303
+ # Limits the results to items inserted before the given date.
304
304
  sig { returns(T.nilable(String)) }
305
305
  attr_reader :lt
306
306
 
307
307
  sig { params(lt: String).void }
308
308
  attr_writer :lt
309
309
 
310
- # Limits the results to messages inserted before or on the given date.
310
+ # Limits the results to items inserted before or on the given date.
311
311
  sig { returns(T.nilable(String)) }
312
312
  attr_reader :lte
313
313
 
@@ -320,13 +320,13 @@ module Knockapi
320
320
  )
321
321
  end
322
322
  def self.new(
323
- # Limits the results to messages inserted after the given date.
323
+ # Limits the results to items inserted after the given date.
324
324
  gt: nil,
325
- # Limits the results to messages inserted after or on the given date.
325
+ # Limits the results to items inserted after or on the given date.
326
326
  gte: nil,
327
- # Limits the results to messages inserted before the given date.
327
+ # Limits the results to items inserted before the given date.
328
328
  lt: nil,
329
- # Limits the results to messages inserted before or on the given date.
329
+ # Limits the results to items inserted before or on the given date.
330
330
  lte: nil
331
331
  )
332
332
  end
@@ -298,28 +298,28 @@ module Knockapi
298
298
  )
299
299
  end
300
300
 
301
- # Limits the results to messages inserted after the given date.
301
+ # Limits the results to items inserted after the given date.
302
302
  sig { returns(T.nilable(String)) }
303
303
  attr_reader :gt
304
304
 
305
305
  sig { params(gt: String).void }
306
306
  attr_writer :gt
307
307
 
308
- # Limits the results to messages inserted after or on the given date.
308
+ # Limits the results to items inserted after or on the given date.
309
309
  sig { returns(T.nilable(String)) }
310
310
  attr_reader :gte
311
311
 
312
312
  sig { params(gte: String).void }
313
313
  attr_writer :gte
314
314
 
315
- # Limits the results to messages inserted before the given date.
315
+ # Limits the results to items inserted before the given date.
316
316
  sig { returns(T.nilable(String)) }
317
317
  attr_reader :lt
318
318
 
319
319
  sig { params(lt: String).void }
320
320
  attr_writer :lt
321
321
 
322
- # Limits the results to messages inserted before or on the given date.
322
+ # Limits the results to items inserted before or on the given date.
323
323
  sig { returns(T.nilable(String)) }
324
324
  attr_reader :lte
325
325
 
@@ -332,13 +332,13 @@ module Knockapi
332
332
  )
333
333
  end
334
334
  def self.new(
335
- # Limits the results to messages inserted after the given date.
335
+ # Limits the results to items inserted after the given date.
336
336
  gt: nil,
337
- # Limits the results to messages inserted after or on the given date.
337
+ # Limits the results to items inserted after or on the given date.
338
338
  gte: nil,
339
- # Limits the results to messages inserted before the given date.
339
+ # Limits the results to items inserted before the given date.
340
340
  lt: nil,
341
- # Limits the results to messages inserted before or on the given date.
341
+ # Limits the results to items inserted before or on the given date.
342
342
  lte: nil
343
343
  )
344
344
  end
@@ -297,28 +297,28 @@ module Knockapi
297
297
  )
298
298
  end
299
299
 
300
- # Limits the results to messages inserted after the given date.
300
+ # Limits the results to items inserted after the given date.
301
301
  sig { returns(T.nilable(String)) }
302
302
  attr_reader :gt
303
303
 
304
304
  sig { params(gt: String).void }
305
305
  attr_writer :gt
306
306
 
307
- # Limits the results to messages inserted after or on the given date.
307
+ # Limits the results to items inserted after or on the given date.
308
308
  sig { returns(T.nilable(String)) }
309
309
  attr_reader :gte
310
310
 
311
311
  sig { params(gte: String).void }
312
312
  attr_writer :gte
313
313
 
314
- # Limits the results to messages inserted before the given date.
314
+ # Limits the results to items inserted before the given date.
315
315
  sig { returns(T.nilable(String)) }
316
316
  attr_reader :lt
317
317
 
318
318
  sig { params(lt: String).void }
319
319
  attr_writer :lt
320
320
 
321
- # Limits the results to messages inserted before or on the given date.
321
+ # Limits the results to items inserted before or on the given date.
322
322
  sig { returns(T.nilable(String)) }
323
323
  attr_reader :lte
324
324
 
@@ -331,13 +331,13 @@ module Knockapi
331
331
  )
332
332
  end
333
333
  def self.new(
334
- # Limits the results to messages inserted after the given date.
334
+ # Limits the results to items inserted after the given date.
335
335
  gt: nil,
336
- # Limits the results to messages inserted after or on the given date.
336
+ # Limits the results to items inserted after or on the given date.
337
337
  gte: nil,
338
- # Limits the results to messages inserted before the given date.
338
+ # Limits the results to items inserted before the given date.
339
339
  lt: nil,
340
- # Limits the results to messages inserted before or on the given date.
340
+ # Limits the results to items inserted before or on the given date.
341
341
  lte: nil
342
342
  )
343
343
  end
@@ -44,6 +44,15 @@ module Knockapi
44
44
  sig { params(before: String).void }
45
45
  attr_writer :before
46
46
 
47
+ # Comma-separated list of field paths to exclude from the response. Use dot
48
+ # notation for nested fields (e.g., `entries.archived_at`). Limited to 3 levels
49
+ # deep.
50
+ sig { returns(T.nilable(String)) }
51
+ attr_reader :exclude
52
+
53
+ sig { params(exclude: String).void }
54
+ attr_writer :exclude
55
+
47
56
  # Whether the feed items have a tenant.
48
57
  sig { returns(T.nilable(T::Boolean)) }
49
58
  attr_reader :has_tenant
@@ -51,6 +60,19 @@ module Knockapi
51
60
  sig { params(has_tenant: T::Boolean).void }
52
61
  attr_writer :has_tenant
53
62
 
63
+ sig do
64
+ returns(T.nilable(Knockapi::Users::FeedListItemsParams::InsertedAt))
65
+ end
66
+ attr_reader :inserted_at
67
+
68
+ sig do
69
+ params(
70
+ inserted_at:
71
+ Knockapi::Users::FeedListItemsParams::InsertedAt::OrHash
72
+ ).void
73
+ end
74
+ attr_writer :inserted_at
75
+
54
76
  # The locale to render the feed items in. Must be in the IETF 5646 format (e.g.
55
77
  # `en-US`). When not provided, will default to the locale that the feed items were
56
78
  # rendered in. Only available for enterprise plan customers using custom
@@ -61,6 +83,24 @@ module Knockapi
61
83
  sig { params(locale: String).void }
62
84
  attr_writer :locale
63
85
 
86
+ # The mode to render the feed items in. Can be `compact` or `rich`. Defaults to
87
+ # `rich`. When `mode` is `compact`, feed items will not have `activities` and
88
+ # `total_activities` fields; the `data` field will not include nested arrays and
89
+ # objects; and the `actors` field will only have up to one actor.
90
+ sig do
91
+ returns(
92
+ T.nilable(Knockapi::Users::FeedListItemsParams::Mode::OrSymbol)
93
+ )
94
+ end
95
+ attr_reader :mode
96
+
97
+ sig do
98
+ params(
99
+ mode: Knockapi::Users::FeedListItemsParams::Mode::OrSymbol
100
+ ).void
101
+ end
102
+ attr_writer :mode
103
+
64
104
  # The number of items per page (defaults to 50).
65
105
  sig { returns(T.nilable(Integer)) }
66
106
  attr_reader :page_size
@@ -116,8 +156,12 @@ module Knockapi
116
156
  after: String,
117
157
  archived: Knockapi::Users::FeedListItemsParams::Archived::OrSymbol,
118
158
  before: String,
159
+ exclude: String,
119
160
  has_tenant: T::Boolean,
161
+ inserted_at:
162
+ Knockapi::Users::FeedListItemsParams::InsertedAt::OrHash,
120
163
  locale: String,
164
+ mode: Knockapi::Users::FeedListItemsParams::Mode::OrSymbol,
121
165
  page_size: Integer,
122
166
  source: String,
123
167
  status: Knockapi::Users::FeedListItemsParams::Status::OrSymbol,
@@ -134,13 +178,23 @@ module Knockapi
134
178
  archived: nil,
135
179
  # The cursor to fetch entries before.
136
180
  before: nil,
181
+ # Comma-separated list of field paths to exclude from the response. Use dot
182
+ # notation for nested fields (e.g., `entries.archived_at`). Limited to 3 levels
183
+ # deep.
184
+ exclude: nil,
137
185
  # Whether the feed items have a tenant.
138
186
  has_tenant: nil,
187
+ inserted_at: nil,
139
188
  # The locale to render the feed items in. Must be in the IETF 5646 format (e.g.
140
189
  # `en-US`). When not provided, will default to the locale that the feed items were
141
190
  # rendered in. Only available for enterprise plan customers using custom
142
191
  # translations.
143
192
  locale: nil,
193
+ # The mode to render the feed items in. Can be `compact` or `rich`. Defaults to
194
+ # `rich`. When `mode` is `compact`, feed items will not have `activities` and
195
+ # `total_activities` fields; the `data` field will not include nested arrays and
196
+ # objects; and the `actors` field will only have up to one actor.
197
+ mode: nil,
144
198
  # The number of items per page (defaults to 50).
145
199
  page_size: nil,
146
200
  # The workflow key associated with the message in the feed.
@@ -164,8 +218,11 @@ module Knockapi
164
218
  archived:
165
219
  Knockapi::Users::FeedListItemsParams::Archived::OrSymbol,
166
220
  before: String,
221
+ exclude: String,
167
222
  has_tenant: T::Boolean,
223
+ inserted_at: Knockapi::Users::FeedListItemsParams::InsertedAt,
168
224
  locale: String,
225
+ mode: Knockapi::Users::FeedListItemsParams::Mode::OrSymbol,
169
226
  page_size: Integer,
170
227
  source: String,
171
228
  status: Knockapi::Users::FeedListItemsParams::Status::OrSymbol,
@@ -216,6 +273,102 @@ module Knockapi
216
273
  end
217
274
  end
218
275
 
276
+ class InsertedAt < Knockapi::Internal::Type::BaseModel
277
+ OrHash =
278
+ T.type_alias do
279
+ T.any(
280
+ Knockapi::Users::FeedListItemsParams::InsertedAt,
281
+ Knockapi::Internal::AnyHash
282
+ )
283
+ end
284
+
285
+ # Limits the results to items inserted after the given date.
286
+ sig { returns(T.nilable(String)) }
287
+ attr_reader :gt
288
+
289
+ sig { params(gt: String).void }
290
+ attr_writer :gt
291
+
292
+ # Limits the results to items inserted after or on the given date.
293
+ sig { returns(T.nilable(String)) }
294
+ attr_reader :gte
295
+
296
+ sig { params(gte: String).void }
297
+ attr_writer :gte
298
+
299
+ # Limits the results to items inserted before the given date.
300
+ sig { returns(T.nilable(String)) }
301
+ attr_reader :lt
302
+
303
+ sig { params(lt: String).void }
304
+ attr_writer :lt
305
+
306
+ # Limits the results to items inserted before or on the given date.
307
+ sig { returns(T.nilable(String)) }
308
+ attr_reader :lte
309
+
310
+ sig { params(lte: String).void }
311
+ attr_writer :lte
312
+
313
+ sig do
314
+ params(gt: String, gte: String, lt: String, lte: String).returns(
315
+ T.attached_class
316
+ )
317
+ end
318
+ def self.new(
319
+ # Limits the results to items inserted after the given date.
320
+ gt: nil,
321
+ # Limits the results to items inserted after or on the given date.
322
+ gte: nil,
323
+ # Limits the results to items inserted before the given date.
324
+ lt: nil,
325
+ # Limits the results to items inserted before or on the given date.
326
+ lte: nil
327
+ )
328
+ end
329
+
330
+ sig do
331
+ override.returns(
332
+ { gt: String, gte: String, lt: String, lte: String }
333
+ )
334
+ end
335
+ def to_hash
336
+ end
337
+ end
338
+
339
+ # The mode to render the feed items in. Can be `compact` or `rich`. Defaults to
340
+ # `rich`. When `mode` is `compact`, feed items will not have `activities` and
341
+ # `total_activities` fields; the `data` field will not include nested arrays and
342
+ # objects; and the `actors` field will only have up to one actor.
343
+ module Mode
344
+ extend Knockapi::Internal::Type::Enum
345
+
346
+ TaggedSymbol =
347
+ T.type_alias do
348
+ T.all(Symbol, Knockapi::Users::FeedListItemsParams::Mode)
349
+ end
350
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
351
+
352
+ COMPACT =
353
+ T.let(
354
+ :compact,
355
+ Knockapi::Users::FeedListItemsParams::Mode::TaggedSymbol
356
+ )
357
+ RICH =
358
+ T.let(
359
+ :rich,
360
+ Knockapi::Users::FeedListItemsParams::Mode::TaggedSymbol
361
+ )
362
+
363
+ sig do
364
+ override.returns(
365
+ T::Array[Knockapi::Users::FeedListItemsParams::Mode::TaggedSymbol]
366
+ )
367
+ end
368
+ def self.values
369
+ end
370
+ end
371
+
219
372
  # The status of the feed items.
220
373
  module Status
221
374
  extend Knockapi::Internal::Type::Enum
@@ -14,7 +14,7 @@ module Knockapi
14
14
  def add_members(
15
15
  # The key of the audience.
16
16
  key,
17
- # A list of audience members to add. Limited to 1,000 members per request.
17
+ # A list of audience members to add. You can add up to 1,000 members per request.
18
18
  members:,
19
19
  request_options: {}
20
20
  )
@@ -46,7 +46,8 @@ module Knockapi
46
46
  def remove_members(
47
47
  # The key of the audience.
48
48
  key,
49
- # A list of audience members to remove.
49
+ # A list of audience members to remove. You can remove up to 1,000 members per
50
+ # request.
50
51
  members:,
51
52
  request_options: {}
52
53
  )
@@ -45,8 +45,12 @@ module Knockapi
45
45
  after: String,
46
46
  archived: Knockapi::Users::FeedListItemsParams::Archived::OrSymbol,
47
47
  before: String,
48
+ exclude: String,
48
49
  has_tenant: T::Boolean,
50
+ inserted_at:
51
+ Knockapi::Users::FeedListItemsParams::InsertedAt::OrHash,
49
52
  locale: String,
53
+ mode: Knockapi::Users::FeedListItemsParams::Mode::OrSymbol,
50
54
  page_size: Integer,
51
55
  source: String,
52
56
  status: Knockapi::Users::FeedListItemsParams::Status::OrSymbol,
@@ -71,13 +75,23 @@ module Knockapi
71
75
  archived: nil,
72
76
  # The cursor to fetch entries before.
73
77
  before: nil,
78
+ # Comma-separated list of field paths to exclude from the response. Use dot
79
+ # notation for nested fields (e.g., `entries.archived_at`). Limited to 3 levels
80
+ # deep.
81
+ exclude: nil,
74
82
  # Whether the feed items have a tenant.
75
83
  has_tenant: nil,
84
+ inserted_at: nil,
76
85
  # The locale to render the feed items in. Must be in the IETF 5646 format (e.g.
77
86
  # `en-US`). When not provided, will default to the locale that the feed items were
78
87
  # rendered in. Only available for enterprise plan customers using custom
79
88
  # translations.
80
89
  locale: nil,
90
+ # The mode to render the feed items in. Can be `compact` or `rich`. Defaults to
91
+ # `rich`. When `mode` is `compact`, feed items will not have `activities` and
92
+ # `total_activities` fields; the `data` field will not include nested arrays and
93
+ # objects; and the `actors` field will only have up to one actor.
94
+ mode: nil,
81
95
  # The number of items per page (defaults to 50).
82
96
  page_size: nil,
83
97
  # The workflow key associated with the message in the feed.
@@ -6,8 +6,11 @@ module Knockapi
6
6
  after: String,
7
7
  archived: Knockapi::Models::Users::FeedListItemsParams::archived,
8
8
  before: String,
9
+ exclude: String,
9
10
  has_tenant: bool,
11
+ inserted_at: Knockapi::Users::FeedListItemsParams::InsertedAt,
10
12
  locale: String,
13
+ mode: Knockapi::Models::Users::FeedListItemsParams::mode,
11
14
  page_size: Integer,
12
15
  source: String,
13
16
  status: Knockapi::Models::Users::FeedListItemsParams::status,
@@ -35,14 +38,30 @@ module Knockapi
35
38
 
36
39
  def before=: (String) -> String
37
40
 
41
+ attr_reader exclude: String?
42
+
43
+ def exclude=: (String) -> String
44
+
38
45
  attr_reader has_tenant: bool?
39
46
 
40
47
  def has_tenant=: (bool) -> bool
41
48
 
49
+ attr_reader inserted_at: Knockapi::Users::FeedListItemsParams::InsertedAt?
50
+
51
+ def inserted_at=: (
52
+ Knockapi::Users::FeedListItemsParams::InsertedAt
53
+ ) -> Knockapi::Users::FeedListItemsParams::InsertedAt
54
+
42
55
  attr_reader locale: String?
43
56
 
44
57
  def locale=: (String) -> String
45
58
 
59
+ attr_reader mode: Knockapi::Models::Users::FeedListItemsParams::mode?
60
+
61
+ def mode=: (
62
+ Knockapi::Models::Users::FeedListItemsParams::mode
63
+ ) -> Knockapi::Models::Users::FeedListItemsParams::mode
64
+
46
65
  attr_reader page_size: Integer?
47
66
 
48
67
  def page_size=: (Integer) -> Integer
@@ -73,8 +92,11 @@ module Knockapi
73
92
  ?after: String,
74
93
  ?archived: Knockapi::Models::Users::FeedListItemsParams::archived,
75
94
  ?before: String,
95
+ ?exclude: String,
76
96
  ?has_tenant: bool,
97
+ ?inserted_at: Knockapi::Users::FeedListItemsParams::InsertedAt,
77
98
  ?locale: String,
99
+ ?mode: Knockapi::Models::Users::FeedListItemsParams::mode,
78
100
  ?page_size: Integer,
79
101
  ?source: String,
80
102
  ?status: Knockapi::Models::Users::FeedListItemsParams::status,
@@ -88,8 +110,11 @@ module Knockapi
88
110
  after: String,
89
111
  archived: Knockapi::Models::Users::FeedListItemsParams::archived,
90
112
  before: String,
113
+ exclude: String,
91
114
  has_tenant: bool,
115
+ inserted_at: Knockapi::Users::FeedListItemsParams::InsertedAt,
92
116
  locale: String,
117
+ mode: Knockapi::Models::Users::FeedListItemsParams::mode,
93
118
  page_size: Integer,
94
119
  source: String,
95
120
  status: Knockapi::Models::Users::FeedListItemsParams::status,
@@ -111,6 +136,46 @@ module Knockapi
111
136
  def self?.values: -> ::Array[Knockapi::Models::Users::FeedListItemsParams::archived]
112
137
  end
113
138
 
139
+ type inserted_at = { gt: String, gte: String, lt: String, lte: String }
140
+
141
+ class InsertedAt < Knockapi::Internal::Type::BaseModel
142
+ attr_reader gt: String?
143
+
144
+ def gt=: (String) -> String
145
+
146
+ attr_reader gte: String?
147
+
148
+ def gte=: (String) -> String
149
+
150
+ attr_reader lt: String?
151
+
152
+ def lt=: (String) -> String
153
+
154
+ attr_reader lte: String?
155
+
156
+ def lte=: (String) -> String
157
+
158
+ def initialize: (
159
+ ?gt: String,
160
+ ?gte: String,
161
+ ?lt: String,
162
+ ?lte: String
163
+ ) -> void
164
+
165
+ def to_hash: -> { gt: String, gte: String, lt: String, lte: String }
166
+ end
167
+
168
+ type mode = :compact | :rich
169
+
170
+ module Mode
171
+ extend Knockapi::Internal::Type::Enum
172
+
173
+ COMPACT: :compact
174
+ RICH: :rich
175
+
176
+ def self?.values: -> ::Array[Knockapi::Models::Users::FeedListItemsParams::mode]
177
+ end
178
+
114
179
  type status = :unread | :read | :unseen | :seen | :all
115
180
 
116
181
  module Status
@@ -14,8 +14,11 @@ module Knockapi
14
14
  ?after: String,
15
15
  ?archived: Knockapi::Models::Users::FeedListItemsParams::archived,
16
16
  ?before: String,
17
+ ?exclude: String,
17
18
  ?has_tenant: bool,
19
+ ?inserted_at: Knockapi::Users::FeedListItemsParams::InsertedAt,
18
20
  ?locale: String,
21
+ ?mode: Knockapi::Models::Users::FeedListItemsParams::mode,
19
22
  ?page_size: Integer,
20
23
  ?source: String,
21
24
  ?status: Knockapi::Models::Users::FeedListItemsParams::status,
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.30.0
4
+ version: 1.31.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Knock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-29 00:00:00.000000000 Z
11
+ date: 2026-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi