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
@@ -13,12 +13,12 @@ module Knockapi
13
13
  end
14
14
 
15
15
  # A list of objects.
16
- sig { returns(T::Array[Knockapi::InlineObjectRequest]) }
16
+ sig { returns(T::Array[Knockapi::Objects::BulkSetParams::Object]) }
17
17
  attr_accessor :objects
18
18
 
19
19
  sig do
20
20
  params(
21
- objects: T::Array[Knockapi::InlineObjectRequest::OrHash],
21
+ objects: T::Array[Knockapi::Objects::BulkSetParams::Object::OrHash],
22
22
  request_options: Knockapi::RequestOptions::OrHash
23
23
  ).returns(T.attached_class)
24
24
  end
@@ -32,13 +32,131 @@ module Knockapi
32
32
  sig do
33
33
  override.returns(
34
34
  {
35
- objects: T::Array[Knockapi::InlineObjectRequest],
35
+ objects: T::Array[Knockapi::Objects::BulkSetParams::Object],
36
36
  request_options: Knockapi::RequestOptions
37
37
  }
38
38
  )
39
39
  end
40
40
  def to_hash
41
41
  end
42
+
43
+ class Object < Knockapi::Internal::Type::BaseModel
44
+ OrHash =
45
+ T.type_alias do
46
+ T.any(
47
+ Knockapi::Objects::BulkSetParams::Object,
48
+ Knockapi::Internal::AnyHash
49
+ )
50
+ end
51
+
52
+ # Unique identifier for the object.
53
+ sig { returns(String) }
54
+ attr_accessor :id
55
+
56
+ # A request to set channel data for a type of channel inline.
57
+ sig do
58
+ returns(
59
+ T.nilable(
60
+ T::Hash[
61
+ Symbol,
62
+ T.any(
63
+ Knockapi::Recipients::PushChannelData,
64
+ Knockapi::Recipients::OneSignalChannelData,
65
+ Knockapi::Recipients::SlackChannelData,
66
+ Knockapi::Recipients::MsTeamsChannelData,
67
+ Knockapi::Recipients::DiscordChannelData
68
+ )
69
+ ]
70
+ )
71
+ )
72
+ end
73
+ attr_accessor :channel_data
74
+
75
+ # Timestamp when the resource was created.
76
+ sig { returns(T.nilable(Time)) }
77
+ attr_accessor :created_at
78
+
79
+ # Inline set preferences for a recipient, where the key is the preference set id.
80
+ # Preferences that are set inline will be merged into any existing preferences
81
+ # rather than replacing them.
82
+ sig do
83
+ returns(
84
+ T.nilable(
85
+ T::Hash[Symbol, Knockapi::Recipients::PreferenceSetRequest]
86
+ )
87
+ )
88
+ end
89
+ attr_accessor :preferences
90
+
91
+ # A custom [Object](/concepts/objects) entity which belongs to a collection.
92
+ sig do
93
+ params(
94
+ id: String,
95
+ channel_data:
96
+ T.nilable(
97
+ T::Hash[
98
+ Symbol,
99
+ T.any(
100
+ Knockapi::Recipients::PushChannelData::OrHash,
101
+ Knockapi::Recipients::OneSignalChannelData::OrHash,
102
+ Knockapi::Recipients::SlackChannelData::OrHash,
103
+ Knockapi::Recipients::MsTeamsChannelData::OrHash,
104
+ Knockapi::Recipients::DiscordChannelData::OrHash
105
+ )
106
+ ]
107
+ ),
108
+ created_at: T.nilable(Time),
109
+ preferences:
110
+ T.nilable(
111
+ T::Hash[
112
+ Symbol,
113
+ Knockapi::Recipients::PreferenceSetRequest::OrHash
114
+ ]
115
+ )
116
+ ).returns(T.attached_class)
117
+ end
118
+ def self.new(
119
+ # Unique identifier for the object.
120
+ id:,
121
+ # A request to set channel data for a type of channel inline.
122
+ channel_data: nil,
123
+ # Timestamp when the resource was created.
124
+ created_at: nil,
125
+ # Inline set preferences for a recipient, where the key is the preference set id.
126
+ # Preferences that are set inline will be merged into any existing preferences
127
+ # rather than replacing them.
128
+ preferences: nil
129
+ )
130
+ end
131
+
132
+ sig do
133
+ override.returns(
134
+ {
135
+ id: String,
136
+ channel_data:
137
+ T.nilable(
138
+ T::Hash[
139
+ Symbol,
140
+ T.any(
141
+ Knockapi::Recipients::PushChannelData,
142
+ Knockapi::Recipients::OneSignalChannelData,
143
+ Knockapi::Recipients::SlackChannelData,
144
+ Knockapi::Recipients::MsTeamsChannelData,
145
+ Knockapi::Recipients::DiscordChannelData
146
+ )
147
+ ]
148
+ ),
149
+ created_at: T.nilable(Time),
150
+ preferences:
151
+ T.nilable(
152
+ T::Hash[Symbol, Knockapi::Recipients::PreferenceSetRequest]
153
+ )
154
+ }
155
+ )
156
+ end
157
+ def to_hash
158
+ end
159
+ end
42
160
  end
43
161
  end
44
162
  end
@@ -36,11 +36,29 @@ module Knockapi
36
36
  sig { params(page_size: Integer).void }
37
37
  attr_writer :page_size
38
38
 
39
- # Filter by recipient IDs.
40
- sig { returns(T.nilable(T::Array[String])) }
39
+ # Filter by recipient references.
40
+ sig do
41
+ returns(
42
+ T.nilable(
43
+ T::Array[
44
+ T.any(String, Knockapi::RecipientReference::ObjectReference)
45
+ ]
46
+ )
47
+ )
48
+ end
41
49
  attr_reader :recipients
42
50
 
43
- sig { params(recipients: T::Array[String]).void }
51
+ sig do
52
+ params(
53
+ recipients:
54
+ T::Array[
55
+ T.any(
56
+ String,
57
+ Knockapi::RecipientReference::ObjectReference::OrHash
58
+ )
59
+ ]
60
+ ).void
61
+ end
44
62
  attr_writer :recipients
45
63
 
46
64
  # Filter by tenant ID.
@@ -56,7 +74,13 @@ module Knockapi
56
74
  after: String,
57
75
  before: String,
58
76
  page_size: Integer,
59
- recipients: T::Array[String],
77
+ recipients:
78
+ T::Array[
79
+ T.any(
80
+ String,
81
+ Knockapi::RecipientReference::ObjectReference::OrHash
82
+ )
83
+ ],
60
84
  tenant: String,
61
85
  request_options: Knockapi::RequestOptions::OrHash
62
86
  ).returns(T.attached_class)
@@ -70,7 +94,7 @@ module Knockapi
70
94
  before: nil,
71
95
  # The number of items per page.
72
96
  page_size: nil,
73
- # Filter by recipient IDs.
97
+ # Filter by recipient references.
74
98
  recipients: nil,
75
99
  # Filter by tenant ID.
76
100
  tenant: nil,
@@ -85,7 +109,10 @@ module Knockapi
85
109
  after: String,
86
110
  before: String,
87
111
  page_size: Integer,
88
- recipients: T::Array[String],
112
+ recipients:
113
+ T::Array[
114
+ T.any(String, Knockapi::RecipientReference::ObjectReference)
115
+ ],
89
116
  tenant: String,
90
117
  request_options: Knockapi::RequestOptions
91
118
  }
@@ -8,14 +8,17 @@ module Knockapi
8
8
  T.any(Knockapi::ScheduleRepeatRule, Knockapi::Internal::AnyHash)
9
9
  end
10
10
 
11
- # The typename of the schema.
12
- sig { returns(String) }
13
- attr_accessor :_typename
14
-
15
11
  # The frequency of the schedule.
16
12
  sig { returns(Knockapi::ScheduleRepeatRule::Frequency::OrSymbol) }
17
13
  attr_accessor :frequency
18
14
 
15
+ # The typename of the schema.
16
+ sig { returns(T.nilable(String)) }
17
+ attr_reader :_typename
18
+
19
+ sig { params(_typename: String).void }
20
+ attr_writer :_typename
21
+
19
22
  # The day of the month to repeat the schedule.
20
23
  sig { returns(T.nilable(Integer)) }
21
24
  attr_accessor :day_of_month
@@ -46,8 +49,8 @@ module Knockapi
46
49
  # The repeat rule for the schedule.
47
50
  sig do
48
51
  params(
49
- _typename: String,
50
52
  frequency: Knockapi::ScheduleRepeatRule::Frequency::OrSymbol,
53
+ _typename: String,
51
54
  day_of_month: T.nilable(Integer),
52
55
  days:
53
56
  T.nilable(T::Array[Knockapi::ScheduleRepeatRule::Day::OrSymbol]),
@@ -57,10 +60,10 @@ module Knockapi
57
60
  ).returns(T.attached_class)
58
61
  end
59
62
  def self.new(
60
- # The typename of the schema.
61
- _typename:,
62
63
  # The frequency of the schedule.
63
64
  frequency:,
65
+ # The typename of the schema.
66
+ _typename: nil,
64
67
  # The day of the month to repeat the schedule.
65
68
  day_of_month: nil,
66
69
  # The days of the week to repeat the schedule.
@@ -77,8 +80,8 @@ module Knockapi
77
80
  sig do
78
81
  override.returns(
79
82
  {
80
- _typename: String,
81
83
  frequency: Knockapi::ScheduleRepeatRule::Frequency::OrSymbol,
84
+ _typename: String,
82
85
  day_of_month: T.nilable(Integer),
83
86
  days:
84
87
  T.nilable(T::Array[Knockapi::ScheduleRepeatRule::Day::OrSymbol]),
@@ -32,6 +32,8 @@ module Knockapi
32
32
  attr_accessor :channel_data
33
33
 
34
34
  # Inline set preferences for a recipient, where the key is the preference set id.
35
+ # Preferences that are set inline will be merged into any existing preferences
36
+ # rather than replacing them.
35
37
  sig do
36
38
  returns(
37
39
  T.nilable(T::Hash[Symbol, Knockapi::Recipients::PreferenceSetRequest])
@@ -80,6 +82,8 @@ module Knockapi
80
82
  # A request to set channel data for a type of channel inline.
81
83
  channel_data: nil,
82
84
  # Inline set preferences for a recipient, where the key is the preference set id.
85
+ # Preferences that are set inline will be merged into any existing preferences
86
+ # rather than replacing them.
83
87
  preferences: nil,
84
88
  # The settings for the tenant. Includes branding and preference set.
85
89
  settings: nil
@@ -30,14 +30,6 @@ module Knockapi
30
30
  end
31
31
  attr_accessor :channel_data
32
32
 
33
- # Inline set preferences for a recipient, where the key is the preference set id.
34
- sig do
35
- returns(
36
- T.nilable(T::Hash[Symbol, Knockapi::Recipients::PreferenceSetRequest])
37
- )
38
- end
39
- attr_accessor :preferences
40
-
41
33
  # The settings for the tenant. Includes branding and preference set.
42
34
  sig { returns(T.nilable(Knockapi::TenantSetParams::Settings)) }
43
35
  attr_reader :settings
@@ -60,13 +52,6 @@ module Knockapi
60
52
  )
61
53
  ]
62
54
  ),
63
- preferences:
64
- T.nilable(
65
- T::Hash[
66
- Symbol,
67
- Knockapi::Recipients::PreferenceSetRequest::OrHash
68
- ]
69
- ),
70
55
  settings: Knockapi::TenantSetParams::Settings::OrHash,
71
56
  request_options: Knockapi::RequestOptions::OrHash
72
57
  ).returns(T.attached_class)
@@ -74,8 +59,6 @@ module Knockapi
74
59
  def self.new(
75
60
  # A request to set channel data for a type of channel inline.
76
61
  channel_data: nil,
77
- # Inline set preferences for a recipient, where the key is the preference set id.
78
- preferences: nil,
79
62
  # The settings for the tenant. Includes branding and preference set.
80
63
  settings: nil,
81
64
  request_options: {}
@@ -98,10 +81,6 @@ module Knockapi
98
81
  )
99
82
  ]
100
83
  ),
101
- preferences:
102
- T.nilable(
103
- T::Hash[Symbol, Knockapi::Recipients::PreferenceSetRequest]
104
- ),
105
84
  settings: Knockapi::TenantSetParams::Settings,
106
85
  request_options: Knockapi::RequestOptions
107
86
  }
@@ -46,11 +46,29 @@ module Knockapi
46
46
  end
47
47
  attr_writer :include
48
48
 
49
- # Only returns subscriptions for the specified object GIDs.
50
- sig { returns(T.nilable(T::Array[String])) }
49
+ # Only returns subscriptions for the specified object references.
50
+ sig do
51
+ returns(
52
+ T.nilable(
53
+ T::Array[
54
+ T.any(String, Knockapi::RecipientReference::ObjectReference)
55
+ ]
56
+ )
57
+ )
58
+ end
51
59
  attr_reader :objects
52
60
 
53
- sig { params(objects: T::Array[String]).void }
61
+ sig do
62
+ params(
63
+ objects:
64
+ T::Array[
65
+ T.any(
66
+ String,
67
+ Knockapi::RecipientReference::ObjectReference::OrHash
68
+ )
69
+ ]
70
+ ).void
71
+ end
54
72
  attr_writer :objects
55
73
 
56
74
  # The number of items per page.
@@ -66,7 +84,13 @@ module Knockapi
66
84
  before: String,
67
85
  include:
68
86
  T::Array[Knockapi::UserListSubscriptionsParams::Include::OrSymbol],
69
- objects: T::Array[String],
87
+ objects:
88
+ T::Array[
89
+ T.any(
90
+ String,
91
+ Knockapi::RecipientReference::ObjectReference::OrHash
92
+ )
93
+ ],
70
94
  page_size: Integer,
71
95
  request_options: Knockapi::RequestOptions::OrHash
72
96
  ).returns(T.attached_class)
@@ -78,7 +102,7 @@ module Knockapi
78
102
  before: nil,
79
103
  # Associated resources to include in the response.
80
104
  include: nil,
81
- # Only returns subscriptions for the specified object GIDs.
105
+ # Only returns subscriptions for the specified object references.
82
106
  objects: nil,
83
107
  # The number of items per page.
84
108
  page_size: nil,
@@ -95,7 +119,10 @@ module Knockapi
95
119
  T::Array[
96
120
  Knockapi::UserListSubscriptionsParams::Include::OrSymbol
97
121
  ],
98
- objects: T::Array[String],
122
+ objects:
123
+ T::Array[
124
+ T.any(String, Knockapi::RecipientReference::ObjectReference)
125
+ ],
99
126
  page_size: Integer,
100
127
  request_options: Knockapi::RequestOptions
101
128
  }
@@ -49,7 +49,7 @@ module Knockapi
49
49
  sig do
50
50
  params(
51
51
  collection: String,
52
- objects: T::Array[Knockapi::InlineObjectRequest::OrHash],
52
+ objects: T::Array[Knockapi::Objects::BulkSetParams::Object::OrHash],
53
53
  request_options: Knockapi::RequestOptions::OrHash
54
54
  ).returns(Knockapi::BulkOperation)
55
55
  end
@@ -378,6 +378,8 @@ module Knockapi
378
378
  # [message localization](/concepts/translations).
379
379
  locale: nil,
380
380
  # Inline set preferences for a recipient, where the key is the preference set id.
381
+ # Preferences that are set inline will be merged into any existing preferences
382
+ # rather than replacing them.
381
383
  preferences: nil,
382
384
  # The timezone of the object. Must be a
383
385
  # valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
@@ -118,7 +118,13 @@ module Knockapi
118
118
  after: String,
119
119
  before: String,
120
120
  page_size: Integer,
121
- recipients: T::Array[String],
121
+ recipients:
122
+ T::Array[
123
+ T.any(
124
+ String,
125
+ Knockapi::RecipientReference::ObjectReference::OrHash
126
+ )
127
+ ],
122
128
  tenant: String,
123
129
  request_options: Knockapi::RequestOptions::OrHash
124
130
  ).returns(Knockapi::Internal::EntriesCursor[Knockapi::Schedule])
@@ -132,7 +138,7 @@ module Knockapi
132
138
  before: nil,
133
139
  # The number of items per page.
134
140
  page_size: nil,
135
- # Filter by recipient IDs.
141
+ # Filter by recipient references.
136
142
  recipients: nil,
137
143
  # Filter by tenant ID.
138
144
  tenant: nil,
@@ -78,13 +78,6 @@ module Knockapi
78
78
  )
79
79
  ]
80
80
  ),
81
- preferences:
82
- T.nilable(
83
- T::Hash[
84
- Symbol,
85
- Knockapi::Recipients::PreferenceSetRequest::OrHash
86
- ]
87
- ),
88
81
  settings: Knockapi::TenantSetParams::Settings::OrHash,
89
82
  request_options: Knockapi::RequestOptions::OrHash
90
83
  ).returns(Knockapi::Tenant)
@@ -94,8 +87,6 @@ module Knockapi
94
87
  id,
95
88
  # A request to set channel data for a type of channel inline.
96
89
  channel_data: nil,
97
- # Inline set preferences for a recipient, where the key is the preference set id.
98
- preferences: nil,
99
90
  # The settings for the tenant. Includes branding and preference set.
100
91
  settings: nil,
101
92
  request_options: {}
@@ -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
  sig do
10
9
  params(
11
10
  user_ids: T::Array[String],
@@ -20,8 +19,8 @@ module Knockapi
20
19
  end
21
20
 
22
21
  # Identifies multiple users in a single operation. Allows creating or updating up
23
- # to 100 users in a single batch with various properties, preferences, and channel
24
- # data.
22
+ # to 1,000 users in a single batch with various properties, preferences, and
23
+ # channel data.
25
24
  sig do
26
25
  params(
27
26
  users: T::Array[Knockapi::InlineIdentifyUserRequest::OrHash],
@@ -35,9 +34,11 @@ module Knockapi
35
34
  )
36
35
  end
37
36
 
38
- # Sets preferences for multiple users in a single operation. Supports either
39
- # setting the same preferences for multiple users or specific preferences for each
40
- # user.
37
+ # Bulk sets the preferences for up to 1,000 users at a time. The preference
38
+ # set `:id` can be either `default` or a `tenant.id`. Learn more
39
+ # about [per-tenant preferences](/preferences/tenant-preferences). Note that this
40
+ # is a destructive operation and will replace any existing users' preferences with
41
+ # the preferences sent.
41
42
  sig do
42
43
  params(
43
44
  preferences: Knockapi::Recipients::PreferenceSetRequest::OrHash,
@@ -67,6 +67,8 @@ module Knockapi
67
67
  # user (required for SMS channels).
68
68
  phone_number: nil,
69
69
  # Inline set preferences for a recipient, where the key is the preference set id.
70
+ # Preferences that are set inline will be merged into any existing preferences
71
+ # rather than replacing them.
70
72
  preferences: nil,
71
73
  # The timezone of the user. Must be a
72
74
  # valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
@@ -283,7 +285,13 @@ module Knockapi
283
285
  before: String,
284
286
  include:
285
287
  T::Array[Knockapi::UserListSubscriptionsParams::Include::OrSymbol],
286
- objects: T::Array[String],
288
+ objects:
289
+ T::Array[
290
+ T.any(
291
+ String,
292
+ Knockapi::RecipientReference::ObjectReference::OrHash
293
+ )
294
+ ],
287
295
  page_size: Integer,
288
296
  request_options: Knockapi::RequestOptions::OrHash
289
297
  ).returns(
@@ -299,7 +307,7 @@ module Knockapi
299
307
  before: nil,
300
308
  # Associated resources to include in the response.
301
309
  include: nil,
302
- # Only returns subscriptions for the specified object GIDs.
310
+ # Only returns subscriptions for the specified object references.
303
311
  objects: nil,
304
312
  # The number of items per page.
305
313
  page_size: nil,
@@ -2,24 +2,56 @@ module Knockapi
2
2
  module Models
3
3
  module Objects
4
4
  type bulk_set_params =
5
- { objects: ::Array[Knockapi::InlineObjectRequest] }
5
+ { objects: ::Array[Knockapi::Objects::BulkSetParams::Object] }
6
6
  & Knockapi::Internal::Type::request_parameters
7
7
 
8
8
  class BulkSetParams < Knockapi::Internal::Type::BaseModel
9
9
  extend Knockapi::Internal::Type::RequestParameters::Converter
10
10
  include Knockapi::Internal::Type::RequestParameters
11
11
 
12
- attr_accessor objects: ::Array[Knockapi::InlineObjectRequest]
12
+ attr_accessor objects: ::Array[Knockapi::Objects::BulkSetParams::Object]
13
13
 
14
14
  def initialize: (
15
- objects: ::Array[Knockapi::InlineObjectRequest],
15
+ objects: ::Array[Knockapi::Objects::BulkSetParams::Object],
16
16
  ?request_options: Knockapi::request_opts
17
17
  ) -> void
18
18
 
19
19
  def to_hash: -> {
20
- objects: ::Array[Knockapi::InlineObjectRequest],
20
+ objects: ::Array[Knockapi::Objects::BulkSetParams::Object],
21
21
  request_options: Knockapi::RequestOptions
22
22
  }
23
+
24
+ type object =
25
+ {
26
+ id: String,
27
+ channel_data: Knockapi::Models::Recipients::inline_channel_data_request?,
28
+ created_at: Time?,
29
+ preferences: Knockapi::Models::Recipients::inline_preference_set_request?
30
+ }
31
+
32
+ class Object < Knockapi::Internal::Type::BaseModel
33
+ attr_accessor id: String
34
+
35
+ attr_accessor channel_data: Knockapi::Models::Recipients::inline_channel_data_request?
36
+
37
+ attr_accessor created_at: Time?
38
+
39
+ attr_accessor preferences: Knockapi::Models::Recipients::inline_preference_set_request?
40
+
41
+ def initialize: (
42
+ id: String,
43
+ ?channel_data: Knockapi::Models::Recipients::inline_channel_data_request?,
44
+ ?created_at: Time?,
45
+ ?preferences: Knockapi::Models::Recipients::inline_preference_set_request?
46
+ ) -> void
47
+
48
+ def to_hash: -> {
49
+ id: String,
50
+ channel_data: Knockapi::Models::Recipients::inline_channel_data_request?,
51
+ created_at: Time?,
52
+ preferences: Knockapi::Models::Recipients::inline_preference_set_request?
53
+ }
54
+ end
23
55
  end
24
56
  end
25
57
  end
@@ -6,7 +6,7 @@ module Knockapi
6
6
  after: String,
7
7
  before: String,
8
8
  page_size: Integer,
9
- recipients: ::Array[String],
9
+ recipients: ::Array[Knockapi::Models::recipient_reference],
10
10
  tenant: String
11
11
  }
12
12
  & Knockapi::Internal::Type::request_parameters
@@ -29,9 +29,11 @@ module Knockapi
29
29
 
30
30
  def page_size=: (Integer) -> Integer
31
31
 
32
- attr_reader recipients: ::Array[String]?
32
+ attr_reader recipients: ::Array[Knockapi::Models::recipient_reference]?
33
33
 
34
- def recipients=: (::Array[String]) -> ::Array[String]
34
+ def recipients=: (
35
+ ::Array[Knockapi::Models::recipient_reference]
36
+ ) -> ::Array[Knockapi::Models::recipient_reference]
35
37
 
36
38
  attr_reader tenant: String?
37
39
 
@@ -42,7 +44,7 @@ module Knockapi
42
44
  ?after: String,
43
45
  ?before: String,
44
46
  ?page_size: Integer,
45
- ?recipients: ::Array[String],
47
+ ?recipients: ::Array[Knockapi::Models::recipient_reference],
46
48
  ?tenant: String,
47
49
  ?request_options: Knockapi::request_opts
48
50
  ) -> void
@@ -52,7 +54,7 @@ module Knockapi
52
54
  after: String,
53
55
  before: String,
54
56
  page_size: Integer,
55
- recipients: ::Array[String],
57
+ recipients: ::Array[Knockapi::Models::recipient_reference],
56
58
  tenant: String,
57
59
  request_options: Knockapi::RequestOptions
58
60
  }
@@ -2,8 +2,8 @@ module Knockapi
2
2
  module Models
3
3
  type schedule_repeat_rule =
4
4
  {
5
- _typename: String,
6
5
  frequency: Knockapi::Models::ScheduleRepeatRule::frequency,
6
+ _typename: String,
7
7
  day_of_month: Integer?,
8
8
  days: ::Array[Knockapi::Models::ScheduleRepeatRule::day]?,
9
9
  hours: Integer?,
@@ -12,10 +12,12 @@ module Knockapi
12
12
  }
13
13
 
14
14
  class ScheduleRepeatRule < Knockapi::Internal::Type::BaseModel
15
- attr_accessor _typename: String
16
-
17
15
  attr_accessor frequency: Knockapi::Models::ScheduleRepeatRule::frequency
18
16
 
17
+ attr_reader _typename: String?
18
+
19
+ def _typename=: (String) -> String
20
+
19
21
  attr_accessor day_of_month: Integer?
20
22
 
21
23
  attr_accessor days: ::Array[Knockapi::Models::ScheduleRepeatRule::day]?
@@ -29,8 +31,8 @@ module Knockapi
29
31
  attr_accessor minutes: Integer?
30
32
 
31
33
  def initialize: (
32
- _typename: String,
33
34
  frequency: Knockapi::Models::ScheduleRepeatRule::frequency,
35
+ ?_typename: String,
34
36
  ?day_of_month: Integer?,
35
37
  ?days: ::Array[Knockapi::Models::ScheduleRepeatRule::day]?,
36
38
  ?hours: Integer?,
@@ -39,8 +41,8 @@ module Knockapi
39
41
  ) -> void
40
42
 
41
43
  def to_hash: -> {
42
- _typename: String,
43
44
  frequency: Knockapi::Models::ScheduleRepeatRule::frequency,
45
+ _typename: String,
44
46
  day_of_month: Integer?,
45
47
  days: ::Array[Knockapi::Models::ScheduleRepeatRule::day]?,
46
48
  hours: Integer?,