knockapi 1.5.0 → 1.7.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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -0
  3. data/README.md +1 -1
  4. data/lib/knockapi/internal/util.rb +8 -9
  5. data/lib/knockapi/models/identify_user_request.rb +2 -0
  6. data/lib/knockapi/models/inline_identify_user_request.rb +2 -0
  7. data/lib/knockapi/models/inline_object_request.rb +5 -0
  8. data/lib/knockapi/models/object_set_params.rb +2 -0
  9. data/lib/knockapi/models/objects/bulk_set_params.rb +51 -3
  10. data/lib/knockapi/models/schedule_list_params.rb +4 -4
  11. data/lib/knockapi/models/schedule_repeat_rule.rb +9 -9
  12. data/lib/knockapi/models/tenant_request.rb +5 -0
  13. data/lib/knockapi/models/tenant_set_params.rb +1 -11
  14. data/lib/knockapi/models/user_list_subscriptions_params.rb +4 -4
  15. data/lib/knockapi/resources/objects/bulk.rb +1 -1
  16. data/lib/knockapi/resources/schedules.rb +1 -1
  17. data/lib/knockapi/resources/tenants.rb +1 -3
  18. data/lib/knockapi/resources/users/bulk.rb +8 -7
  19. data/lib/knockapi/resources/users.rb +1 -1
  20. data/lib/knockapi/version.rb +1 -1
  21. data/rbi/knockapi/internal/util.rbi +2 -0
  22. data/rbi/knockapi/models/identify_user_request.rbi +4 -0
  23. data/rbi/knockapi/models/inline_identify_user_request.rbi +4 -0
  24. data/rbi/knockapi/models/inline_object_request.rbi +4 -0
  25. data/rbi/knockapi/models/object_set_params.rbi +4 -0
  26. data/rbi/knockapi/models/objects/bulk_set_params.rbi +121 -3
  27. data/rbi/knockapi/models/schedule_list_params.rbi +33 -6
  28. data/rbi/knockapi/models/schedule_repeat_rule.rbi +11 -8
  29. data/rbi/knockapi/models/tenant_request.rbi +4 -0
  30. data/rbi/knockapi/models/tenant_set_params.rbi +0 -21
  31. data/rbi/knockapi/models/user_list_subscriptions_params.rbi +33 -6
  32. data/rbi/knockapi/resources/objects/bulk.rbi +1 -1
  33. data/rbi/knockapi/resources/objects.rbi +2 -0
  34. data/rbi/knockapi/resources/schedules.rbi +8 -2
  35. data/rbi/knockapi/resources/tenants.rbi +0 -9
  36. data/rbi/knockapi/resources/users/bulk.rbi +8 -7
  37. data/rbi/knockapi/resources/users.rbi +10 -2
  38. data/sig/knockapi/models/objects/bulk_set_params.rbs +36 -4
  39. data/sig/knockapi/models/schedule_list_params.rbs +7 -5
  40. data/sig/knockapi/models/schedule_repeat_rule.rbs +7 -5
  41. data/sig/knockapi/models/tenant_set_params.rbs +0 -5
  42. data/sig/knockapi/models/user_list_subscriptions_params.rbs +7 -5
  43. data/sig/knockapi/resources/objects/bulk.rbs +1 -1
  44. data/sig/knockapi/resources/schedules.rbs +1 -1
  45. data/sig/knockapi/resources/tenants.rbs +0 -1
  46. data/sig/knockapi/resources/users.rbs +1 -1
  47. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d5f3a2c6174ea9d6f4a8203b2dc98ec7edfb5374cffd899a0b6b669257a7686
4
- data.tar.gz: 2b4c45abf3420222039f6caacf508a530c4c8cac4196e325c353f927f60e5b6c
3
+ metadata.gz: a8fe0e1d10c71e9d8525e72100489e37c46340b10b56774afdb51c91e42edd82
4
+ data.tar.gz: '033928a1fd5f48acc9a83424c4c9f57a63fedd47510d3f6be6be822c6b0784e1'
5
5
  SHA512:
6
- metadata.gz: '0409be38f4fe4c66806657b1821f9bd66f4191a5c631cbbd6110c4ab60a7d3b3613c6fa8909656b85dfd99723f953172a4561d7a5addb8fdc61aa00882ea71a1'
7
- data.tar.gz: 8bb6ec2864fa22a0482c4600d911fbd4e7d38c6e4b58b0c6f7f71163781d588fb8d1bd674a0bbd4c6dd1e399ed43c5f930b73c407636b5b6fae443dd5e5fbd74
6
+ metadata.gz: 1d390284ec7a8d3d6229b24536c000a93c86864fcd8280ce8c9d9c5b68ee3ca6d18cb9ec2a8cf0c69609e839941cef90e34b5e2355a0b77caf152c3db1a983b2
7
+ data.tar.gz: aa2d1c5854f1f2f747862ef533f4fa6867dc0379cfff4d7fb03b6d5197bc29ea4d634c595e26ab9c454c9da589217d4c84e037b26e019b9071df5a53ae73278e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.7.0 (2025-06-12)
4
+
5
+ Full Changelog: [v1.6.0...v1.7.0](https://github.com/knocklabs/knock-ruby/compare/v1.6.0...v1.7.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([ccc6df0](https://github.com/knocklabs/knock-ruby/commit/ccc6df0d616d93198a605ec4c986e03369a8843b))
10
+ * **api:** api update ([fddf322](https://github.com/knocklabs/knock-ruby/commit/fddf3226958f8a212c5c3fa4d0dc8f72c01dcbe5))
11
+
12
+
13
+ ### Chores
14
+
15
+ * **ci:** link to correct github repo ([acd8f88](https://github.com/knocklabs/knock-ruby/commit/acd8f8882a660c449b45113b848944327382f1a0))
16
+
17
+ ## 1.6.0 (2025-06-06)
18
+
19
+ Full Changelog: [v1.5.0...v1.6.0](https://github.com/knocklabs/knock-ruby/compare/v1.5.0...v1.6.0)
20
+
21
+ ### Features
22
+
23
+ * **api:** api update ([53aa9c9](https://github.com/knocklabs/knock-ruby/commit/53aa9c9ebd4a8e7be2fd5bdf08a4b749f6b9d116))
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * default content-type for text in multi-part formdata uploads should be text/plain ([de655f0](https://github.com/knocklabs/knock-ruby/commit/de655f0dd9194b4c30d7ad26e2da98f6cba51a0f))
29
+
3
30
  ## 1.5.0 (2025-06-04)
4
31
 
5
32
  Full Changelog: [v1.4.0...v1.5.0](https://github.com/knocklabs/knock-ruby/compare/v1.4.0...v1.5.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.5.0"
20
+ gem "knockapi", "~> 1.7.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -497,7 +497,7 @@ module Knockapi
497
497
  # @param closing [Array<Proc>]
498
498
  # @param content_type [String, nil]
499
499
  private def write_multipart_content(y, val:, closing:, content_type: nil)
500
- content_type ||= "application/octet-stream"
500
+ content_line = "Content-Type: %s\r\n\r\n"
501
501
 
502
502
  case val
503
503
  in Knockapi::FilePart
@@ -508,24 +508,21 @@ module Knockapi
508
508
  content_type: val.content_type
509
509
  )
510
510
  in Pathname
511
- y << "Content-Type: #{content_type}\r\n\r\n"
511
+ y << format(content_line, content_type || "application/octet-stream")
512
512
  io = val.open(binmode: true)
513
513
  closing << io.method(:close)
514
514
  IO.copy_stream(io, y)
515
515
  in IO
516
- y << "Content-Type: #{content_type}\r\n\r\n"
516
+ y << format(content_line, content_type || "application/octet-stream")
517
517
  IO.copy_stream(val, y)
518
518
  in StringIO
519
- y << "Content-Type: #{content_type}\r\n\r\n"
519
+ y << format(content_line, content_type || "application/octet-stream")
520
520
  y << val.string
521
- in String
522
- y << "Content-Type: #{content_type}\r\n\r\n"
523
- y << val.to_s
524
521
  in -> { primitive?(_1) }
525
- y << "Content-Type: text/plain\r\n\r\n"
522
+ y << format(content_line, content_type || "text/plain")
526
523
  y << val.to_s
527
524
  else
528
- y << "Content-Type: application/json\r\n\r\n"
525
+ y << format(content_line, content_type || "application/json")
529
526
  y << JSON.generate(val)
530
527
  end
531
528
  y << "\r\n"
@@ -563,6 +560,8 @@ module Knockapi
563
560
 
564
561
  # @api private
565
562
  #
563
+ # https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#special-considerations-for-multipart-content
564
+ #
566
565
  # @param body [Object]
567
566
  #
568
567
  # @return [Array(String, Enumerable<String>)]
@@ -52,6 +52,8 @@ module Knockapi
52
52
 
53
53
  # @!attribute preferences
54
54
  # Inline set preferences for a recipient, where the key is the preference set id.
55
+ # Preferences that are set inline will be merged into any existing preferences
56
+ # rather than replacing them.
55
57
  #
56
58
  # @return [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil]
57
59
  optional :preferences,
@@ -58,6 +58,8 @@ module Knockapi
58
58
 
59
59
  # @!attribute preferences
60
60
  # Inline set preferences for a recipient, where the key is the preference set id.
61
+ # Preferences that are set inline will be merged into any existing preferences
62
+ # rather than replacing them.
61
63
  #
62
64
  # @return [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil]
63
65
  optional :preferences,
@@ -33,6 +33,8 @@ module Knockapi
33
33
 
34
34
  # @!attribute preferences
35
35
  # Inline set preferences for a recipient, where the key is the preference set id.
36
+ # Preferences that are set inline will be merged into any existing preferences
37
+ # rather than replacing them.
36
38
  #
37
39
  # @return [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil]
38
40
  optional :preferences,
@@ -40,6 +42,9 @@ module Knockapi
40
42
  nil?: true
41
43
 
42
44
  # @!method initialize(id:, collection:, channel_data: nil, created_at: nil, preferences: nil)
45
+ # Some parameter documentations has been truncated, see
46
+ # {Knockapi::Models::InlineObjectRequest} for more details.
47
+ #
43
48
  # A custom [Object](/concepts/objects) entity which belongs to a collection.
44
49
  #
45
50
  # @param id [String] Unique identifier for the object.
@@ -25,6 +25,8 @@ module Knockapi
25
25
 
26
26
  # @!attribute preferences
27
27
  # Inline set preferences for a recipient, where the key is the preference set id.
28
+ # Preferences that are set inline will be merged into any existing preferences
29
+ # rather than replacing them.
28
30
  #
29
31
  # @return [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil]
30
32
  optional :preferences,
@@ -11,13 +11,61 @@ module Knockapi
11
11
  # @!attribute objects
12
12
  # A list of objects.
13
13
  #
14
- # @return [Array<Knockapi::Models::InlineObjectRequest>]
15
- required :objects, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::InlineObjectRequest] }
14
+ # @return [Array<Knockapi::Models::Objects::BulkSetParams::Object>]
15
+ required :objects, -> { Knockapi::Internal::Type::ArrayOf[Knockapi::Objects::BulkSetParams::Object] }
16
16
 
17
17
  # @!method initialize(objects:, request_options: {})
18
- # @param objects [Array<Knockapi::Models::InlineObjectRequest>] A list of objects.
18
+ # @param objects [Array<Knockapi::Models::Objects::BulkSetParams::Object>] A list of objects.
19
19
  #
20
20
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
21
+
22
+ class Object < Knockapi::Internal::Type::BaseModel
23
+ # @!attribute id
24
+ # Unique identifier for the object.
25
+ #
26
+ # @return [String]
27
+ required :id, String
28
+
29
+ # @!attribute channel_data
30
+ # A request to set channel data for a type of channel inline.
31
+ #
32
+ # @return [Hash{Symbol=>Knockapi::Models::Recipients::PushChannelData, Knockapi::Models::Recipients::OneSignalChannelData, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}, nil]
33
+ optional :channel_data,
34
+ -> {
35
+ Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::InlineChannelDataRequestItem]
36
+ },
37
+ nil?: true
38
+
39
+ # @!attribute created_at
40
+ # Timestamp when the resource was created.
41
+ #
42
+ # @return [Time, nil]
43
+ optional :created_at, Time, nil?: true
44
+
45
+ # @!attribute preferences
46
+ # Inline set preferences for a recipient, where the key is the preference set id.
47
+ # Preferences that are set inline will be merged into any existing preferences
48
+ # rather than replacing them.
49
+ #
50
+ # @return [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil]
51
+ optional :preferences,
52
+ -> { Knockapi::Internal::Type::HashOf[Knockapi::Recipients::PreferenceSetRequest] },
53
+ nil?: true
54
+
55
+ # @!method initialize(id:, channel_data: nil, created_at: nil, preferences: nil)
56
+ # Some parameter documentations has been truncated, see
57
+ # {Knockapi::Models::Objects::BulkSetParams::Object} for more details.
58
+ #
59
+ # A custom [Object](/concepts/objects) entity which belongs to a collection.
60
+ #
61
+ # @param id [String] Unique identifier for the object.
62
+ #
63
+ # @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.
64
+ #
65
+ # @param created_at [Time, nil] Timestamp when the resource was created.
66
+ #
67
+ # @param preferences [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil] Inline set preferences for a recipient, where the key is the preference set id.
68
+ end
21
69
  end
22
70
  end
23
71
  end
@@ -32,10 +32,10 @@ module Knockapi
32
32
  optional :page_size, Integer
33
33
 
34
34
  # @!attribute recipients
35
- # Filter by recipient IDs.
35
+ # Filter by recipient references.
36
36
  #
37
- # @return [Array<String>, nil]
38
- optional :recipients, Knockapi::Internal::Type::ArrayOf[String]
37
+ # @return [Array<String, Knockapi::Models::RecipientReference::ObjectReference>, nil]
38
+ optional :recipients, -> { Knockapi::Internal::Type::ArrayOf[union: Knockapi::RecipientReference] }
39
39
 
40
40
  # @!attribute tenant
41
41
  # Filter by tenant ID.
@@ -52,7 +52,7 @@ module Knockapi
52
52
  #
53
53
  # @param page_size [Integer] The number of items per page.
54
54
  #
55
- # @param recipients [Array<String>] Filter by recipient IDs.
55
+ # @param recipients [Array<String, Knockapi::Models::RecipientReference::ObjectReference>] Filter by recipient references.
56
56
  #
57
57
  # @param tenant [String] Filter by tenant ID.
58
58
  #
@@ -3,18 +3,18 @@
3
3
  module Knockapi
4
4
  module Models
5
5
  class ScheduleRepeatRule < Knockapi::Internal::Type::BaseModel
6
- # @!attribute _typename
7
- # The typename of the schema.
8
- #
9
- # @return [String]
10
- required :_typename, String, api_name: :__typename
11
-
12
6
  # @!attribute frequency
13
7
  # The frequency of the schedule.
14
8
  #
15
9
  # @return [Symbol, Knockapi::Models::ScheduleRepeatRule::Frequency]
16
10
  required :frequency, enum: -> { Knockapi::ScheduleRepeatRule::Frequency }
17
11
 
12
+ # @!attribute _typename
13
+ # The typename of the schema.
14
+ #
15
+ # @return [String, nil]
16
+ optional :_typename, String, api_name: :__typename
17
+
18
18
  # @!attribute day_of_month
19
19
  # The day of the month to repeat the schedule.
20
20
  #
@@ -47,13 +47,13 @@ module Knockapi
47
47
  # @return [Integer, nil]
48
48
  optional :minutes, Integer, nil?: true
49
49
 
50
- # @!method initialize(_typename:, frequency:, day_of_month: nil, days: nil, hours: nil, interval: nil, minutes: nil)
50
+ # @!method initialize(frequency:, _typename: nil, day_of_month: nil, days: nil, hours: nil, interval: nil, minutes: nil)
51
51
  # The repeat rule for the schedule.
52
52
  #
53
- # @param _typename [String] The typename of the schema.
54
- #
55
53
  # @param frequency [Symbol, Knockapi::Models::ScheduleRepeatRule::Frequency] The frequency of the schedule.
56
54
  #
55
+ # @param _typename [String] The typename of the schema.
56
+ #
57
57
  # @param day_of_month [Integer, nil] The day of the month to repeat the schedule.
58
58
  #
59
59
  # @param days [Array<Symbol, Knockapi::Models::ScheduleRepeatRule::Day>, nil] The days of the week to repeat the schedule.
@@ -21,6 +21,8 @@ module Knockapi
21
21
 
22
22
  # @!attribute preferences
23
23
  # Inline set preferences for a recipient, where the key is the preference set id.
24
+ # Preferences that are set inline will be merged into any existing preferences
25
+ # rather than replacing them.
24
26
  #
25
27
  # @return [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil]
26
28
  optional :preferences,
@@ -34,6 +36,9 @@ module Knockapi
34
36
  optional :settings, -> { Knockapi::TenantRequest::Settings }
35
37
 
36
38
  # @!method initialize(id:, channel_data: nil, preferences: nil, settings: nil)
39
+ # Some parameter documentations has been truncated, see
40
+ # {Knockapi::Models::TenantRequest} for more details.
41
+ #
37
42
  # A tenant to be set in the system. You can supply any additional properties on
38
43
  # the tenant object.
39
44
  #
@@ -17,25 +17,15 @@ module Knockapi
17
17
  },
18
18
  nil?: true
19
19
 
20
- # @!attribute preferences
21
- # Inline set preferences for a recipient, where the key is the preference set id.
22
- #
23
- # @return [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil]
24
- optional :preferences,
25
- -> { Knockapi::Internal::Type::HashOf[Knockapi::Recipients::PreferenceSetRequest] },
26
- nil?: true
27
-
28
20
  # @!attribute settings
29
21
  # The settings for the tenant. Includes branding and preference set.
30
22
  #
31
23
  # @return [Knockapi::Models::TenantSetParams::Settings, nil]
32
24
  optional :settings, -> { Knockapi::TenantSetParams::Settings }
33
25
 
34
- # @!method initialize(channel_data: nil, preferences: nil, settings: nil, request_options: {})
26
+ # @!method initialize(channel_data: nil, settings: nil, request_options: {})
35
27
  # @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.
36
28
  #
37
- # @param preferences [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil] Inline set preferences for a recipient, where the key is the preference set id.
38
- #
39
29
  # @param settings [Knockapi::Models::TenantSetParams::Settings] The settings for the tenant. Includes branding and preference set.
40
30
  #
41
31
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
@@ -27,10 +27,10 @@ module Knockapi
27
27
  -> { Knockapi::Internal::Type::ArrayOf[enum: Knockapi::UserListSubscriptionsParams::Include] }
28
28
 
29
29
  # @!attribute objects
30
- # Only returns subscriptions for the specified object GIDs.
30
+ # Only returns subscriptions for the specified object references.
31
31
  #
32
- # @return [Array<String>, nil]
33
- optional :objects, Knockapi::Internal::Type::ArrayOf[String]
32
+ # @return [Array<String, Knockapi::Models::RecipientReference::ObjectReference>, nil]
33
+ optional :objects, -> { Knockapi::Internal::Type::ArrayOf[union: Knockapi::RecipientReference] }
34
34
 
35
35
  # @!attribute page_size
36
36
  # The number of items per page.
@@ -45,7 +45,7 @@ module Knockapi
45
45
  #
46
46
  # @param include [Array<Symbol, Knockapi::Models::UserListSubscriptionsParams::Include>] Associated resources to include in the response.
47
47
  #
48
- # @param objects [Array<String>] Only returns subscriptions for the specified object GIDs.
48
+ # @param objects [Array<String, Knockapi::Models::RecipientReference::ObjectReference>] Only returns subscriptions for the specified object references.
49
49
  #
50
50
  # @param page_size [Integer] The number of items per page.
51
51
  #
@@ -62,7 +62,7 @@ module Knockapi
62
62
  #
63
63
  # @param collection [String] The collection this object belongs to.
64
64
  #
65
- # @param objects [Array<Knockapi::Models::InlineObjectRequest>] A list of objects.
65
+ # @param objects [Array<Knockapi::Models::Objects::BulkSetParams::Object>] A list of objects.
66
66
  #
67
67
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
68
68
  #
@@ -103,7 +103,7 @@ module Knockapi
103
103
  #
104
104
  # @param page_size [Integer] The number of items per page.
105
105
  #
106
- # @param recipients [Array<String>] Filter by recipient IDs.
106
+ # @param recipients [Array<String, Knockapi::Models::RecipientReference::ObjectReference>] Filter by recipient references.
107
107
  #
108
108
  # @param tenant [String] Filter by tenant ID.
109
109
  #
@@ -80,14 +80,12 @@ module Knockapi
80
80
  # Sets a tenant within an environment, performing an upsert operation. Any
81
81
  # existing properties will be merged with the incoming properties.
82
82
  #
83
- # @overload set(id, channel_data: nil, preferences: nil, settings: nil, request_options: {})
83
+ # @overload set(id, channel_data: nil, settings: nil, request_options: {})
84
84
  #
85
85
  # @param id [String] The unique identifier for the tenant.
86
86
  #
87
87
  # @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.
88
88
  #
89
- # @param preferences [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil] Inline set preferences for a recipient, where the key is the preference set id.
90
- #
91
89
  # @param settings [Knockapi::Models::TenantSetParams::Settings] The settings for the tenant. Includes branding and preference set.
92
90
  #
93
91
  # @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -4,8 +4,7 @@ module Knockapi
4
4
  module Resources
5
5
  class Users
6
6
  class Bulk
7
- # Deletes multiple users in a single operation. Accepts up to 100 user IDs to
8
- # delete and returns a bulk operation that can be queried for progress.
7
+ # Permanently deletes up to 1,000 users at a time.
9
8
  #
10
9
  # @overload delete(user_ids:, request_options: {})
11
10
  #
@@ -28,8 +27,8 @@ module Knockapi
28
27
  end
29
28
 
30
29
  # Identifies multiple users in a single operation. Allows creating or updating up
31
- # to 100 users in a single batch with various properties, preferences, and channel
32
- # data.
30
+ # to 1,000 users in a single batch with various properties, preferences, and
31
+ # channel data.
33
32
  #
34
33
  # @overload identify(users:, request_options: {})
35
34
  #
@@ -51,9 +50,11 @@ module Knockapi
51
50
  )
52
51
  end
53
52
 
54
- # Sets preferences for multiple users in a single operation. Supports either
55
- # setting the same preferences for multiple users or specific preferences for each
56
- # user.
53
+ # Bulk sets the preferences for up to 1,000 users at a time. The preference
54
+ # set `:id` can be either `default` or a `tenant.id`. Learn more
55
+ # about [per-tenant preferences](/preferences/tenant-preferences). Note that this
56
+ # is a destructive operation and will replace any existing users' preferences with
57
+ # the preferences sent.
57
58
  #
58
59
  # @overload set_preferences(preferences:, user_ids:, request_options: {})
59
60
  #
@@ -298,7 +298,7 @@ module Knockapi
298
298
  #
299
299
  # @param include [Array<Symbol, Knockapi::Models::UserListSubscriptionsParams::Include>] Associated resources to include in the response.
300
300
  #
301
- # @param objects [Array<String>] Only returns subscriptions for the specified object GIDs.
301
+ # @param objects [Array<String, Knockapi::Models::RecipientReference::ObjectReference>] Only returns subscriptions for the specified object references.
302
302
  #
303
303
  # @param page_size [Integer] The number of items per page.
304
304
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Knockapi
4
- VERSION = "1.5.0"
4
+ VERSION = "1.7.0"
5
5
  end
@@ -332,6 +332,8 @@ module Knockapi
332
332
  end
333
333
 
334
334
  # @api private
335
+ #
336
+ # https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#special-considerations-for-multipart-content
335
337
  sig do
336
338
  params(body: T.anything).returns([String, T::Enumerable[String]])
337
339
  end
@@ -53,6 +53,8 @@ module Knockapi
53
53
  attr_accessor :phone_number
54
54
 
55
55
  # Inline set preferences for a recipient, where the key is the preference set id.
56
+ # Preferences that are set inline will be merged into any existing preferences
57
+ # rather than replacing them.
56
58
  sig do
57
59
  returns(
58
60
  T.nilable(T::Hash[Symbol, Knockapi::Recipients::PreferenceSetRequest])
@@ -118,6 +120,8 @@ module Knockapi
118
120
  # user (required for SMS channels).
119
121
  phone_number: nil,
120
122
  # Inline set preferences for a recipient, where the key is the preference set id.
123
+ # Preferences that are set inline will be merged into any existing preferences
124
+ # rather than replacing them.
121
125
  preferences: nil,
122
126
  # The timezone of the user. Must be a
123
127
  # valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
@@ -60,6 +60,8 @@ module Knockapi
60
60
  attr_accessor :phone_number
61
61
 
62
62
  # Inline set preferences for a recipient, where the key is the preference set id.
63
+ # Preferences that are set inline will be merged into any existing preferences
64
+ # rather than replacing them.
63
65
  sig do
64
66
  returns(
65
67
  T.nilable(T::Hash[Symbol, Knockapi::Recipients::PreferenceSetRequest])
@@ -129,6 +131,8 @@ module Knockapi
129
131
  # user (required for SMS channels).
130
132
  phone_number: nil,
131
133
  # Inline set preferences for a recipient, where the key is the preference set id.
134
+ # Preferences that are set inline will be merged into any existing preferences
135
+ # rather than replacing them.
132
136
  preferences: nil,
133
137
  # The timezone of the user. Must be a
134
138
  # valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
@@ -40,6 +40,8 @@ module Knockapi
40
40
  attr_accessor :created_at
41
41
 
42
42
  # Inline set preferences for a recipient, where the key is the preference set id.
43
+ # Preferences that are set inline will be merged into any existing preferences
44
+ # rather than replacing them.
43
45
  sig do
44
46
  returns(
45
47
  T.nilable(T::Hash[Symbol, Knockapi::Recipients::PreferenceSetRequest])
@@ -85,6 +87,8 @@ module Knockapi
85
87
  # Timestamp when the resource was created.
86
88
  created_at: nil,
87
89
  # Inline set preferences for a recipient, where the key is the preference set id.
90
+ # Preferences that are set inline will be merged into any existing preferences
91
+ # rather than replacing them.
88
92
  preferences: nil
89
93
  )
90
94
  end
@@ -53,6 +53,8 @@ module Knockapi
53
53
  attr_accessor :locale
54
54
 
55
55
  # Inline set preferences for a recipient, where the key is the preference set id.
56
+ # Preferences that are set inline will be merged into any existing preferences
57
+ # rather than replacing them.
56
58
  sig do
57
59
  returns(
58
60
  T.nilable(T::Hash[Symbol, Knockapi::Recipients::PreferenceSetRequest])
@@ -102,6 +104,8 @@ module Knockapi
102
104
  # [message localization](/concepts/translations).
103
105
  locale: nil,
104
106
  # Inline set preferences for a recipient, where the key is the preference set id.
107
+ # Preferences that are set inline will be merged into any existing preferences
108
+ # rather than replacing them.
105
109
  preferences: nil,
106
110
  # The timezone of the object. Must be a
107
111
  # valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).