knockapi 1.15.0 → 1.16.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: 8d72e806e4aa7f07a86c10e93b8e6060c1da2860ab3d8af247e6c20e83bedacf
4
- data.tar.gz: 49d2bd4bfe5cc74233d8549938819497bf410f7b2d5686cb8c2096c6f86d40db
3
+ metadata.gz: 1630ae8acf4360fc75f33510c2fcb8423468a3d833430f516275c3c7a6730546
4
+ data.tar.gz: 2eafc59334b1af87ca901007d2f2c8f2d917eebaa7ba47a9bb3513d4e8af870d
5
5
  SHA512:
6
- metadata.gz: 18b9a4fcab27e4ed869e66b8f189f3ddd780dbe6636eba4a29b143d1cc5362a4069812f55a65041b92b5a1820fe8be29b0b08dd16bfb791504b9e1b163d9cb00
7
- data.tar.gz: 2c8f5226db4d52750c0905dfc38de19ba144cc771e4b4d9316972f7395641f22a09eebae4e0f63315d4d1450172d490502eed29a13e4959888a932529bfefa35
6
+ metadata.gz: a9e0edc59e0d14876def76d371494014a4b4353947938247f011ffd853aaf05c5c05a214309ecb092e4783c03a5235d3b12c744f9ec20b27ae9c81bc4103ff50
7
+ data.tar.gz: 49c8be1db5c6ce3e680c5768c1b9579148dc44151d68b49a28c0a162cd0261ae9c0f206388fc2d0fb1e884970a170a1b0f94ce03e0f4f7504afa86dff0b33f6a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.16.0 (2025-10-07)
4
+
5
+ Full Changelog: [v1.15.0...v1.16.0](https://github.com/knocklabs/knock-ruby/compare/v1.15.0...v1.16.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([f006836](https://github.com/knocklabs/knock-ruby/commit/f0068369fd1ad7dfa9843753966d6bfb3758e1ea))
10
+ * **api:** api update ([8f74167](https://github.com/knocklabs/knock-ruby/commit/8f74167231ab9aba28065beb23922d7c4cba9cea))
11
+ * **api:** api update ([27835b7](https://github.com/knocklabs/knock-ruby/commit/27835b7a76ec99e59511e5f92e0ddb88a48ed608))
12
+ * **api:** manual updates ([22850d8](https://github.com/knocklabs/knock-ruby/commit/22850d8c0b0605e045cc7d19020ac9f9c97ae163))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * always send `filename=...` for multipart requests where a file is expected ([1a6d4ac](https://github.com/knocklabs/knock-ruby/commit/1a6d4acdcf66e42ddc5b813a61dc7c535e5f90ee))
18
+ * coroutine leaks from connection pool ([3bc1ff2](https://github.com/knocklabs/knock-ruby/commit/3bc1ff25c7b0cda3f712779d67a8c5f6f5b28969))
19
+ * **internal:** use null byte as file separator in the fast formatting script ([d8c723e](https://github.com/knocklabs/knock-ruby/commit/d8c723ed107313e3cc641ea8b68eb5ee8543bfcc))
20
+ * shorten multipart boundary sep to less than RFC specificed max length ([66403e8](https://github.com/knocklabs/knock-ruby/commit/66403e82039587fbf154aff05c2cbfc1e56066a0))
21
+
22
+
23
+ ### Performance Improvements
24
+
25
+ * faster code formatting ([b578cd0](https://github.com/knocklabs/knock-ruby/commit/b578cd025eefbe8b3ba863403c8a59f9b0acc6bf))
26
+
27
+
28
+ ### Chores
29
+
30
+ * allow fast-format to use bsd sed as well ([c57f00b](https://github.com/knocklabs/knock-ruby/commit/c57f00b885b596ea799f8929986228240fa3aab4))
31
+
3
32
  ## 1.15.0 (2025-09-23)
4
33
 
5
34
  Full Changelog: [v1.14.0...v1.15.0](https://github.com/knocklabs/knock-ruby/compare/v1.14.0...v1.15.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.15.0"
20
+ gem "knockapi", "~> 1.16.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -18,9 +18,6 @@ module Knockapi
18
18
  # @return [String]
19
19
  attr_reader :api_key
20
20
 
21
- # @return [Knockapi::Resources::Shared]
22
- attr_reader :shared
23
-
24
21
  # @return [Knockapi::Resources::Recipients]
25
22
  attr_reader :recipients
26
23
 
@@ -108,7 +105,6 @@ module Knockapi
108
105
  idempotency_header: idempotency_header
109
106
  )
110
107
 
111
- @shared = Knockapi::Resources::Shared.new(client: self)
112
108
  @recipients = Knockapi::Resources::Recipients.new(client: self)
113
109
  @users = Knockapi::Resources::Users.new(client: self)
114
110
  @objects = Knockapi::Resources::Objects.new(client: self)
@@ -38,18 +38,21 @@ module Knockapi
38
38
  def to_yaml(*a) = read.to_yaml(*a)
39
39
 
40
40
  # @param content [Pathname, StringIO, IO, String]
41
- # @param filename [String, nil]
41
+ # @param filename [Pathname, String, nil]
42
42
  # @param content_type [String, nil]
43
43
  def initialize(content, filename: nil, content_type: nil)
44
- @content = content
44
+ @content_type = content_type
45
45
  @filename =
46
- case content
47
- in Pathname
48
- filename.nil? ? content.basename.to_path : ::File.basename(filename)
46
+ case [filename, (@content = content)]
47
+ in [String | Pathname, _]
48
+ ::File.basename(filename)
49
+ in [nil, Pathname]
50
+ content.basename.to_path
51
+ in [nil, IO]
52
+ content.to_path
49
53
  else
50
- filename.nil? ? nil : ::File.basename(filename)
54
+ filename
51
55
  end
52
- @content_type = content_type
53
56
  end
54
57
  end
55
58
  end
@@ -134,9 +134,9 @@ module Knockapi
134
134
 
135
135
  # rubocop:disable Metrics/BlockLength
136
136
  enum = Enumerator.new do |y|
137
- with_pool(url, deadline: deadline) do |conn|
138
- next if finished
137
+ next if finished
139
138
 
139
+ with_pool(url, deadline: deadline) do |conn|
140
140
  req, closing = self.class.build_request(request) do
141
141
  self.class.calibrate_socket_timeout(conn, deadline)
142
142
  end
@@ -149,7 +149,7 @@ module Knockapi
149
149
 
150
150
  self.class.calibrate_socket_timeout(conn, deadline)
151
151
  conn.request(req) do |rsp|
152
- y << [conn, req, rsp]
152
+ y << [req, rsp]
153
153
  break if finished
154
154
 
155
155
  rsp.read_body do |bytes|
@@ -160,6 +160,8 @@ module Knockapi
160
160
  end
161
161
  eof = true
162
162
  end
163
+ ensure
164
+ conn.finish if !eof && conn&.started?
163
165
  end
164
166
  rescue Timeout::Error
165
167
  raise Knockapi::Errors::APITimeoutError.new(url: url, request: req)
@@ -168,16 +170,11 @@ module Knockapi
168
170
  end
169
171
  # rubocop:enable Metrics/BlockLength
170
172
 
171
- conn, _, response = enum.next
173
+ _, response = enum.next
172
174
  body = Knockapi::Internal::Util.fused_enum(enum, external: true) do
173
175
  finished = true
174
- tap do
175
- enum.next
176
- rescue StopIteration
177
- nil
178
- end
176
+ loop { enum.next }
179
177
  ensure
180
- conn.finish if !eof && conn&.started?
181
178
  closing&.call
182
179
  end
183
180
  [Integer(response.code), response, body]
@@ -82,17 +82,20 @@ module Knockapi
82
82
  #
83
83
  # @return [Pathname, StringIO, IO, String, Object]
84
84
  def dump(value, state:)
85
- # rubocop:disable Lint/DuplicateBranch
86
85
  case value
86
+ in StringIO | String
87
+ # https://datatracker.ietf.org/doc/html/rfc7578#section-4.2
88
+ # while not required, a filename is recommended, and in practice many servers do expect this
89
+ Knockapi::FilePart.new(value, filename: "upload")
87
90
  in IO
88
91
  state[:can_retry] = false
92
+ value.to_path.nil? ? Knockapi::FilePart.new(value, filename: "upload") : value
89
93
  in Knockapi::FilePart if value.content.is_a?(IO)
90
94
  state[:can_retry] = false
95
+ value
91
96
  else
97
+ value
92
98
  end
93
- # rubocop:enable Lint/DuplicateBranch
94
-
95
- value
96
99
  end
97
100
 
98
101
  # @api private
@@ -566,7 +566,8 @@ module Knockapi
566
566
  #
567
567
  # @return [Array(String, Enumerable<String>)]
568
568
  private def encode_multipart_streaming(body)
569
- boundary = SecureRandom.urlsafe_base64(60)
569
+ # RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
570
+ boundary = SecureRandom.urlsafe_base64(46)
570
571
 
571
572
  closing = []
572
573
  strio = writable_enum do |y|
@@ -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.
11
+ # A list of audience members to add. Limited 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.
17
+ # @param members [Array<Knockapi::Models::AudienceAddMembersParams::Member>] A list of audience members to add. Limited to 1,000 members per request.
18
18
  #
19
19
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
20
20
 
@@ -43,7 +43,7 @@ module Knockapi
43
43
  required :recipient, union: -> { Knockapi::RecipientReference }
44
44
 
45
45
  # @!attribute source
46
- # The workflow that triggered the message.
46
+ # The workflow or guide that triggered the message.
47
47
  #
48
48
  # @return [Knockapi::Models::Message::Source]
49
49
  required :source, -> { Knockapi::Message::Source }
@@ -160,7 +160,7 @@ module Knockapi
160
160
  #
161
161
  # @param recipient [String, Knockapi::Models::RecipientReference::ObjectReference] A reference to a recipient, either a user identifier (string) or an object refer
162
162
  #
163
- # @param source [Knockapi::Models::Message::Source] The workflow that triggered the message.
163
+ # @param source [Knockapi::Models::Message::Source] The workflow or guide that triggered the message.
164
164
  #
165
165
  # @param status [Symbol, Knockapi::Models::Message::Status] The message delivery status.
166
166
  #
@@ -219,13 +219,13 @@ module Knockapi
219
219
  required :categories, Knockapi::Internal::Type::ArrayOf[String]
220
220
 
221
221
  # @!attribute key
222
- # The key of the workflow that triggered the message.
222
+ # The key of the workflow or guide that triggered the message.
223
223
  #
224
224
  # @return [String]
225
225
  required :key, String
226
226
 
227
227
  # @!attribute version_id
228
- # The ID of the version of the workflow that triggered the message.
228
+ # The ID of the version of the workflow or guide that triggered the message.
229
229
  #
230
230
  # @return [String]
231
231
  required :version_id, String
@@ -236,18 +236,40 @@ module Knockapi
236
236
  # @return [String, nil]
237
237
  optional :step_ref, String, nil?: true
238
238
 
239
- # @!method initialize(_typename:, categories:, key:, version_id:, step_ref: nil)
240
- # The workflow that triggered the message.
239
+ # @!attribute type
240
+ # Whether this message was generated from a workflow, broadcast, or guide.
241
+ #
242
+ # @return [Symbol, Knockapi::Models::Message::Source::Type, nil]
243
+ optional :type, enum: -> { Knockapi::Message::Source::Type }
244
+
245
+ # @!method initialize(_typename:, categories:, key:, version_id:, step_ref: nil, type: nil)
246
+ # The workflow or guide that triggered the message.
241
247
  #
242
248
  # @param _typename [String]
243
249
  #
244
250
  # @param categories [Array<String>] The categories associated with the message.
245
251
  #
246
- # @param key [String] The key of the workflow that triggered the message.
252
+ # @param key [String] The key of the workflow or guide that triggered the message.
247
253
  #
248
- # @param version_id [String] The ID of the version of the workflow that triggered the message.
254
+ # @param version_id [String] The ID of the version of the workflow or guide that triggered the message.
249
255
  #
250
256
  # @param step_ref [String, nil] The step reference for the step in the workflow that generated the message.
257
+ #
258
+ # @param type [Symbol, Knockapi::Models::Message::Source::Type] Whether this message was generated from a workflow, broadcast, or guide.
259
+
260
+ # Whether this message was generated from a workflow, broadcast, or guide.
261
+ #
262
+ # @see Knockapi::Models::Message::Source#type
263
+ module Type
264
+ extend Knockapi::Internal::Type::Enum
265
+
266
+ BROADCAST = :broadcast
267
+ WORKFLOW = :workflow
268
+ GUIDE = :guide
269
+
270
+ # @!method self.values
271
+ # @return [Array<Symbol>]
272
+ end
251
273
  end
252
274
 
253
275
  # The message delivery status.
@@ -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.
12
+ # @param members [Array<Knockapi::Models::AudienceAddMembersParams::Member>] A list of audience members to add. Limited to 1,000 members per request.
13
13
  #
14
14
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
15
15
  #
@@ -4,7 +4,8 @@ module Knockapi
4
4
  module Resources
5
5
  class Tenants
6
6
  class Bulk
7
- # Delete multiple tenants in a single operation. This operation cannot be undone.
7
+ # Delete up to 100 tenants at a time in a single operation. This operation cannot
8
+ # be undone.
8
9
  #
9
10
  # @overload delete(tenant_ids:, request_options: {})
10
11
  #
@@ -26,7 +27,7 @@ module Knockapi
26
27
  )
27
28
  end
28
29
 
29
- # Set or update up to 1,000 tenants in a single operation.
30
+ # Set or update up to 100 tenants in a single operation.
30
31
  #
31
32
  # @overload set(tenants:, request_options: {})
32
33
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Knockapi
4
- VERSION = "1.15.0"
4
+ VERSION = "1.16.0"
5
5
  end
data/lib/knockapi.rb CHANGED
@@ -232,7 +232,6 @@ require_relative "knockapi/resources/recipients/preferences"
232
232
  require_relative "knockapi/resources/recipients/subscriptions"
233
233
  require_relative "knockapi/resources/schedules"
234
234
  require_relative "knockapi/resources/schedules/bulk"
235
- require_relative "knockapi/resources/shared"
236
235
  require_relative "knockapi/resources/tenants"
237
236
  require_relative "knockapi/resources/tenants/bulk"
238
237
  require_relative "knockapi/resources/users"
@@ -13,9 +13,6 @@ module Knockapi
13
13
  sig { returns(String) }
14
14
  attr_reader :api_key
15
15
 
16
- sig { returns(Knockapi::Resources::Shared) }
17
- attr_reader :shared
18
-
19
16
  sig { returns(Knockapi::Resources::Recipients) }
20
17
  attr_reader :recipients
21
18
 
@@ -27,7 +27,7 @@ module Knockapi
27
27
  sig do
28
28
  params(
29
29
  content: T.any(Pathname, StringIO, IO, String),
30
- filename: T.nilable(String),
30
+ filename: T.nilable(T.any(Pathname, String)),
31
31
  content_type: T.nilable(String)
32
32
  ).returns(T.attached_class)
33
33
  end
@@ -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.
14
+ # A list of audience members to add. Limited 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.
25
+ # A list of audience members to add. Limited to 1,000 members per request.
26
26
  members:,
27
27
  request_options: {}
28
28
  )
@@ -33,7 +33,7 @@ module Knockapi
33
33
  sig { returns(Knockapi::RecipientReference::Variants) }
34
34
  attr_accessor :recipient
35
35
 
36
- # The workflow that triggered the message.
36
+ # The workflow or guide that triggered the message.
37
37
  sig { returns(Knockapi::Message::Source) }
38
38
  attr_reader :source
39
39
 
@@ -170,7 +170,7 @@ module Knockapi
170
170
  # A reference to a recipient, either a user identifier (string) or an object
171
171
  # reference (ID, collection).
172
172
  recipient:,
173
- # The workflow that triggered the message.
173
+ # The workflow or guide that triggered the message.
174
174
  source:,
175
175
  # The message delivery status.
176
176
  status:,
@@ -284,11 +284,11 @@ module Knockapi
284
284
  sig { returns(T::Array[String]) }
285
285
  attr_accessor :categories
286
286
 
287
- # The key of the workflow that triggered the message.
287
+ # The key of the workflow or guide that triggered the message.
288
288
  sig { returns(String) }
289
289
  attr_accessor :key
290
290
 
291
- # The ID of the version of the workflow that triggered the message.
291
+ # The ID of the version of the workflow or guide that triggered the message.
292
292
  sig { returns(String) }
293
293
  attr_accessor :version_id
294
294
 
@@ -296,26 +296,38 @@ module Knockapi
296
296
  sig { returns(T.nilable(String)) }
297
297
  attr_accessor :step_ref
298
298
 
299
- # The workflow that triggered the message.
299
+ # Whether this message was generated from a workflow, broadcast, or guide.
300
+ sig do
301
+ returns(T.nilable(Knockapi::Message::Source::Type::TaggedSymbol))
302
+ end
303
+ attr_reader :type
304
+
305
+ sig { params(type: Knockapi::Message::Source::Type::OrSymbol).void }
306
+ attr_writer :type
307
+
308
+ # The workflow or guide that triggered the message.
300
309
  sig do
301
310
  params(
302
311
  _typename: String,
303
312
  categories: T::Array[String],
304
313
  key: String,
305
314
  version_id: String,
306
- step_ref: T.nilable(String)
315
+ step_ref: T.nilable(String),
316
+ type: Knockapi::Message::Source::Type::OrSymbol
307
317
  ).returns(T.attached_class)
308
318
  end
309
319
  def self.new(
310
320
  _typename:,
311
321
  # The categories associated with the message.
312
322
  categories:,
313
- # The key of the workflow that triggered the message.
323
+ # The key of the workflow or guide that triggered the message.
314
324
  key:,
315
- # The ID of the version of the workflow that triggered the message.
325
+ # The ID of the version of the workflow or guide that triggered the message.
316
326
  version_id:,
317
327
  # The step reference for the step in the workflow that generated the message.
318
- step_ref: nil
328
+ step_ref: nil,
329
+ # Whether this message was generated from a workflow, broadcast, or guide.
330
+ type: nil
319
331
  )
320
332
  end
321
333
 
@@ -326,12 +338,36 @@ module Knockapi
326
338
  categories: T::Array[String],
327
339
  key: String,
328
340
  version_id: String,
329
- step_ref: T.nilable(String)
341
+ step_ref: T.nilable(String),
342
+ type: Knockapi::Message::Source::Type::TaggedSymbol
330
343
  }
331
344
  )
332
345
  end
333
346
  def to_hash
334
347
  end
348
+
349
+ # Whether this message was generated from a workflow, broadcast, or guide.
350
+ module Type
351
+ extend Knockapi::Internal::Type::Enum
352
+
353
+ TaggedSymbol =
354
+ T.type_alias { T.all(Symbol, Knockapi::Message::Source::Type) }
355
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
356
+
357
+ BROADCAST =
358
+ T.let(:broadcast, Knockapi::Message::Source::Type::TaggedSymbol)
359
+ WORKFLOW =
360
+ T.let(:workflow, Knockapi::Message::Source::Type::TaggedSymbol)
361
+ GUIDE = T.let(:guide, Knockapi::Message::Source::Type::TaggedSymbol)
362
+
363
+ sig do
364
+ override.returns(
365
+ T::Array[Knockapi::Message::Source::Type::TaggedSymbol]
366
+ )
367
+ end
368
+ def self.values
369
+ end
370
+ end
335
371
  end
336
372
 
337
373
  # The message delivery status.
@@ -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.
17
+ # A list of audience members to add. Limited to 1,000 members per request.
18
18
  members:,
19
19
  request_options: {}
20
20
  )
@@ -4,7 +4,8 @@ module Knockapi
4
4
  module Resources
5
5
  class Tenants
6
6
  class Bulk
7
- # Delete multiple tenants in a single operation. This operation cannot be undone.
7
+ # Delete up to 100 tenants at a time in a single operation. This operation cannot
8
+ # be undone.
8
9
  sig do
9
10
  params(
10
11
  tenant_ids: T::Array[String],
@@ -18,7 +19,7 @@ module Knockapi
18
19
  )
19
20
  end
20
21
 
21
- # Set or update up to 1,000 tenants in a single operation.
22
+ # Set or update up to 100 tenants in a single operation.
22
23
  sig do
23
24
  params(
24
25
  tenants: T::Array[T.any(String, Knockapi::TenantRequest::OrHash)],
@@ -10,8 +10,6 @@ module Knockapi
10
10
 
11
11
  attr_reader api_key: String
12
12
 
13
- attr_reader shared: Knockapi::Resources::Shared
14
-
15
13
  attr_reader recipients: Knockapi::Resources::Recipients
16
14
 
17
15
  attr_reader users: Knockapi::Resources::Users
@@ -14,7 +14,7 @@ module Knockapi
14
14
 
15
15
  def initialize: (
16
16
  Pathname | StringIO | IO | String content,
17
- ?filename: String?,
17
+ ?filename: (Pathname | String)?,
18
18
  ?content_type: String?
19
19
  ) -> void
20
20
  end
@@ -141,7 +141,8 @@ module Knockapi
141
141
  categories: ::Array[String],
142
142
  key: String,
143
143
  version_id: String,
144
- step_ref: String?
144
+ step_ref: String?,
145
+ type: Knockapi::Models::Message::Source::type_
145
146
  }
146
147
 
147
148
  class Source < Knockapi::Internal::Type::BaseModel
@@ -155,12 +156,19 @@ module Knockapi
155
156
 
156
157
  attr_accessor step_ref: String?
157
158
 
159
+ attr_reader type: Knockapi::Models::Message::Source::type_?
160
+
161
+ def type=: (
162
+ Knockapi::Models::Message::Source::type_
163
+ ) -> Knockapi::Models::Message::Source::type_
164
+
158
165
  def initialize: (
159
166
  _typename: String,
160
167
  categories: ::Array[String],
161
168
  key: String,
162
169
  version_id: String,
163
- ?step_ref: String?
170
+ ?step_ref: String?,
171
+ ?type: Knockapi::Models::Message::Source::type_
164
172
  ) -> void
165
173
 
166
174
  def to_hash: -> {
@@ -168,8 +176,21 @@ module Knockapi
168
176
  categories: ::Array[String],
169
177
  key: String,
170
178
  version_id: String,
171
- step_ref: String?
179
+ step_ref: String?,
180
+ type: Knockapi::Models::Message::Source::type_
172
181
  }
182
+
183
+ type type_ = :broadcast | :workflow | :guide
184
+
185
+ module Type
186
+ extend Knockapi::Internal::Type::Enum
187
+
188
+ BROADCAST: :broadcast
189
+ WORKFLOW: :workflow
190
+ GUIDE: :guide
191
+
192
+ def self?.values: -> ::Array[Knockapi::Models::Message::Source::type_]
193
+ end
173
194
  end
174
195
 
175
196
  type 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.15.0
4
+ version: 1.16.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-09-25 00:00:00.000000000 Z
11
+ date: 2025-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool
@@ -237,7 +237,6 @@ files:
237
237
  - lib/knockapi/resources/recipients/subscriptions.rb
238
238
  - lib/knockapi/resources/schedules.rb
239
239
  - lib/knockapi/resources/schedules/bulk.rb
240
- - lib/knockapi/resources/shared.rb
241
240
  - lib/knockapi/resources/tenants.rb
242
241
  - lib/knockapi/resources/tenants/bulk.rb
243
242
  - lib/knockapi/resources/users.rb
@@ -448,7 +447,6 @@ files:
448
447
  - rbi/knockapi/resources/recipients/subscriptions.rbi
449
448
  - rbi/knockapi/resources/schedules.rbi
450
449
  - rbi/knockapi/resources/schedules/bulk.rbi
451
- - rbi/knockapi/resources/shared.rbi
452
450
  - rbi/knockapi/resources/tenants.rbi
453
451
  - rbi/knockapi/resources/tenants/bulk.rbi
454
452
  - rbi/knockapi/resources/users.rbi
@@ -658,7 +656,6 @@ files:
658
656
  - sig/knockapi/resources/recipients/subscriptions.rbs
659
657
  - sig/knockapi/resources/schedules.rbs
660
658
  - sig/knockapi/resources/schedules/bulk.rbs
661
- - sig/knockapi/resources/shared.rbs
662
659
  - sig/knockapi/resources/tenants.rbs
663
660
  - sig/knockapi/resources/tenants/bulk.rbs
664
661
  - sig/knockapi/resources/users.rbs
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Knockapi
4
- module Resources
5
- class Shared
6
- # @api private
7
- #
8
- # @param client [Knockapi::Client]
9
- def initialize(client:)
10
- @client = client
11
- end
12
- end
13
- end
14
- end
@@ -1,12 +0,0 @@
1
- # typed: strong
2
-
3
- module Knockapi
4
- module Resources
5
- class Shared
6
- # @api private
7
- sig { params(client: Knockapi::Client).returns(T.attached_class) }
8
- def self.new(client:)
9
- end
10
- end
11
- end
12
- end
@@ -1,7 +0,0 @@
1
- module Knockapi
2
- module Resources
3
- class Shared
4
- def initialize: (client: Knockapi::Client) -> void
5
- end
6
- end
7
- end