knockapi 1.35.0 → 1.36.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 (84) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +63 -0
  3. data/README.md +1 -1
  4. data/lib/knockapi/client.rb +17 -0
  5. data/lib/knockapi/internal/transport/base_client.rb +5 -0
  6. data/lib/knockapi/internal/util.rb +21 -5
  7. data/lib/knockapi/models/condition.rb +1 -0
  8. data/lib/knockapi/models/message.rb +33 -1
  9. data/lib/knockapi/models/message_event.rb +11 -11
  10. data/lib/knockapi/models/object_unset_preferences_params.rb +32 -0
  11. data/lib/knockapi/models/providers/ms_team_check_auth_response.rb +9 -1
  12. data/lib/knockapi/models/recipients/slack_channel_data.rb +21 -6
  13. data/lib/knockapi/models/tenant.rb +35 -1
  14. data/lib/knockapi/models/tenant_request.rb +35 -1
  15. data/lib/knockapi/models/user_unset_preferences_params.rb +26 -0
  16. data/lib/knockapi/models/users/bulk_set_preferences_params.rb +221 -4
  17. data/lib/knockapi/models/users/guide_get_channel_response.rb +9 -1
  18. data/lib/knockapi/models/workflow_cancel_params.rb +6 -6
  19. data/lib/knockapi/models/workflow_recipient_run.rb +193 -0
  20. data/lib/knockapi/models/workflow_recipient_run_detail.rb +19 -0
  21. data/lib/knockapi/models/workflow_recipient_run_event.rb +99 -0
  22. data/lib/knockapi/models/workflow_recipient_run_get_params.rb +20 -0
  23. data/lib/knockapi/models/workflow_recipient_run_list_params.rb +112 -0
  24. data/lib/knockapi/models/workflow_trigger_params.rb +42 -7
  25. data/lib/knockapi/models.rb +14 -0
  26. data/lib/knockapi/resources/objects.rb +24 -0
  27. data/lib/knockapi/resources/users/bulk.rb +4 -1
  28. data/lib/knockapi/resources/users.rb +22 -0
  29. data/lib/knockapi/resources/workflow_recipient_runs.rb +81 -0
  30. data/lib/knockapi/resources/workflows.rb +5 -3
  31. data/lib/knockapi/version.rb +1 -1
  32. data/lib/knockapi.rb +8 -0
  33. data/rbi/knockapi/client.rbi +5 -0
  34. data/rbi/knockapi/internal/util.rbi +8 -0
  35. data/rbi/knockapi/models/condition.rbi +2 -0
  36. data/rbi/knockapi/models/message.rbi +59 -0
  37. data/rbi/knockapi/models/message_event.rbi +26 -26
  38. data/rbi/knockapi/models/object_unset_preferences_params.rbi +51 -0
  39. data/rbi/knockapi/models/providers/ms_team_check_auth_response.rbi +18 -4
  40. data/rbi/knockapi/models/recipients/slack_channel_data.rbi +57 -7
  41. data/rbi/knockapi/models/tenant.rbi +36 -0
  42. data/rbi/knockapi/models/tenant_request.rbi +36 -0
  43. data/rbi/knockapi/models/user_unset_preferences_params.rbi +46 -0
  44. data/rbi/knockapi/models/users/bulk_set_preferences_params.rbi +527 -6
  45. data/rbi/knockapi/models/users/guide_get_channel_response.rbi +11 -0
  46. data/rbi/knockapi/models/workflow_cancel_params.rbi +10 -10
  47. data/rbi/knockapi/models/workflow_recipient_run.rbi +318 -0
  48. data/rbi/knockapi/models/workflow_recipient_run_detail.rbi +39 -0
  49. data/rbi/knockapi/models/workflow_recipient_run_event.rbi +137 -0
  50. data/rbi/knockapi/models/workflow_recipient_run_get_params.rbi +38 -0
  51. data/rbi/knockapi/models/workflow_recipient_run_list_params.rbi +229 -0
  52. data/rbi/knockapi/models/workflow_trigger_params.rbi +76 -10
  53. data/rbi/knockapi/models.rbi +16 -0
  54. data/rbi/knockapi/resources/objects.rbi +20 -0
  55. data/rbi/knockapi/resources/users/bulk.rbi +4 -2
  56. data/rbi/knockapi/resources/users.rbi +17 -0
  57. data/rbi/knockapi/resources/workflow_recipient_runs.rbi +79 -0
  58. data/rbi/knockapi/resources/workflows.rbi +14 -10
  59. data/sig/knockapi/client.rbs +2 -0
  60. data/sig/knockapi/internal/util.rbs +4 -0
  61. data/sig/knockapi/models/condition.rbs +2 -0
  62. data/sig/knockapi/models/message.rbs +19 -0
  63. data/sig/knockapi/models/message_event.rbs +22 -22
  64. data/sig/knockapi/models/object_unset_preferences_params.rbs +32 -0
  65. data/sig/knockapi/models/providers/ms_team_check_auth_response.rbs +15 -4
  66. data/sig/knockapi/models/recipients/slack_channel_data.rbs +21 -4
  67. data/sig/knockapi/models/tenant.rbs +20 -0
  68. data/sig/knockapi/models/tenant_request.rbs +20 -0
  69. data/sig/knockapi/models/user_unset_preferences_params.rbs +28 -0
  70. data/sig/knockapi/models/users/bulk_set_preferences_params.rbs +149 -4
  71. data/sig/knockapi/models/users/guide_get_channel_response.rbs +7 -0
  72. data/sig/knockapi/models/workflow_recipient_run.rbs +146 -0
  73. data/sig/knockapi/models/workflow_recipient_run_detail.rbs +20 -0
  74. data/sig/knockapi/models/workflow_recipient_run_event.rbs +73 -0
  75. data/sig/knockapi/models/workflow_recipient_run_get_params.rbs +20 -0
  76. data/sig/knockapi/models/workflow_recipient_run_list_params.rbs +109 -0
  77. data/sig/knockapi/models/workflow_trigger_params.rbs +17 -0
  78. data/sig/knockapi/models.rbs +14 -0
  79. data/sig/knockapi/resources/objects.rbs +7 -0
  80. data/sig/knockapi/resources/users/bulk.rbs +1 -1
  81. data/sig/knockapi/resources/users.rbs +6 -0
  82. data/sig/knockapi/resources/workflow_recipient_runs.rbs +26 -0
  83. data/sig/knockapi/resources/workflows.rbs +1 -0
  84. metadata +26 -2
@@ -42,42 +42,42 @@ module Knockapi
42
42
  }
43
43
 
44
44
  type type_ =
45
- :"message.archived"
46
- | :"message.bounced"
45
+ :"message.read"
46
+ | :"message.sent"
47
+ | :"message.seen"
47
48
  | :"message.created"
49
+ | :"message.queued"
48
50
  | :"message.delivered"
51
+ | :"message.bounced"
52
+ | :"message.undelivered"
53
+ | :"message.not_sent"
49
54
  | :"message.delivery_attempted"
50
- | :"message.interacted"
55
+ | :"message.archived"
51
56
  | :"message.link_clicked"
52
- | :"message.not_sent"
53
- | :"message.queued"
54
- | :"message.read"
55
- | :"message.seen"
56
- | :"message.sent"
57
- | :"message.unarchived"
58
- | :"message.undelivered"
59
- | :"message.unread"
57
+ | :"message.interacted"
60
58
  | :"message.unseen"
59
+ | :"message.unread"
60
+ | :"message.unarchived"
61
61
 
62
62
  module Type
63
63
  extend Knockapi::Internal::Type::Enum
64
64
 
65
- MESSAGE_ARCHIVED: :"message.archived"
66
- MESSAGE_BOUNCED: :"message.bounced"
65
+ MESSAGE_READ: :"message.read"
66
+ MESSAGE_SENT: :"message.sent"
67
+ MESSAGE_SEEN: :"message.seen"
67
68
  MESSAGE_CREATED: :"message.created"
69
+ MESSAGE_QUEUED: :"message.queued"
68
70
  MESSAGE_DELIVERED: :"message.delivered"
71
+ MESSAGE_BOUNCED: :"message.bounced"
72
+ MESSAGE_UNDELIVERED: :"message.undelivered"
73
+ MESSAGE_NOT_SENT: :"message.not_sent"
69
74
  MESSAGE_DELIVERY_ATTEMPTED: :"message.delivery_attempted"
70
- MESSAGE_INTERACTED: :"message.interacted"
75
+ MESSAGE_ARCHIVED: :"message.archived"
71
76
  MESSAGE_LINK_CLICKED: :"message.link_clicked"
72
- MESSAGE_NOT_SENT: :"message.not_sent"
73
- MESSAGE_QUEUED: :"message.queued"
74
- MESSAGE_READ: :"message.read"
75
- MESSAGE_SEEN: :"message.seen"
76
- MESSAGE_SENT: :"message.sent"
77
- MESSAGE_UNARCHIVED: :"message.unarchived"
78
- MESSAGE_UNDELIVERED: :"message.undelivered"
79
- MESSAGE_UNREAD: :"message.unread"
77
+ MESSAGE_INTERACTED: :"message.interacted"
80
78
  MESSAGE_UNSEEN: :"message.unseen"
79
+ MESSAGE_UNREAD: :"message.unread"
80
+ MESSAGE_UNARCHIVED: :"message.unarchived"
81
81
 
82
82
  def self?.values: -> ::Array[Knockapi::Models::MessageEvent::type_]
83
83
  end
@@ -0,0 +1,32 @@
1
+ module Knockapi
2
+ module Models
3
+ type object_unset_preferences_params =
4
+ { collection: String, object_id_: String, id: String }
5
+ & Knockapi::Internal::Type::request_parameters
6
+
7
+ class ObjectUnsetPreferencesParams < Knockapi::Internal::Type::BaseModel
8
+ extend Knockapi::Internal::Type::RequestParameters::Converter
9
+ include Knockapi::Internal::Type::RequestParameters
10
+
11
+ attr_accessor collection: String
12
+
13
+ attr_accessor object_id_: String
14
+
15
+ attr_accessor id: String
16
+
17
+ def initialize: (
18
+ collection: String,
19
+ object_id_: String,
20
+ id: String,
21
+ ?request_options: Knockapi::request_opts
22
+ ) -> void
23
+
24
+ def to_hash: -> {
25
+ collection: String,
26
+ object_id_: String,
27
+ id: String,
28
+ request_options: Knockapi::RequestOptions
29
+ }
30
+ end
31
+ end
32
+ end
@@ -17,16 +17,27 @@ module Knockapi
17
17
  connection: Knockapi::Models::Providers::MsTeamCheckAuthResponse::Connection
18
18
  }
19
19
 
20
- type connection = { ok: bool, reason: String? }
20
+ type connection =
21
+ { ok: bool, ms_teams_tenant_id: String?, reason: String? }
21
22
 
22
23
  class Connection < Knockapi::Internal::Type::BaseModel
23
24
  attr_accessor ok: bool
24
25
 
25
- attr_accessor reason: String?
26
+ attr_accessor ms_teams_tenant_id: String?
26
27
 
27
- def initialize: (ok: bool, ?reason: String?) -> void
28
+ attr_accessor reason: String?
28
29
 
29
- def to_hash: -> { ok: bool, reason: String? }
30
+ def initialize: (
31
+ ok: bool,
32
+ ?ms_teams_tenant_id: String?,
33
+ ?reason: String?
34
+ ) -> void
35
+
36
+ def to_hash: -> {
37
+ ok: bool,
38
+ ms_teams_tenant_id: String?,
39
+ reason: String?
40
+ }
30
41
  end
31
42
  end
32
43
  end
@@ -52,14 +52,31 @@ module Knockapi
52
52
  }
53
53
  end
54
54
 
55
- type slack_incoming_webhook_connection = { url: String }
55
+ type slack_incoming_webhook_connection =
56
+ {
57
+ incoming_webhook: Knockapi::Recipients::SlackChannelData::Connection::SlackIncomingWebhookConnection::IncomingWebhook
58
+ }
56
59
 
57
60
  class SlackIncomingWebhookConnection < Knockapi::Internal::Type::BaseModel
58
- attr_accessor url: String
61
+ attr_accessor incoming_webhook: Knockapi::Recipients::SlackChannelData::Connection::SlackIncomingWebhookConnection::IncomingWebhook
62
+
63
+ def initialize: (
64
+ incoming_webhook: Knockapi::Recipients::SlackChannelData::Connection::SlackIncomingWebhookConnection::IncomingWebhook
65
+ ) -> void
66
+
67
+ def to_hash: -> {
68
+ incoming_webhook: Knockapi::Recipients::SlackChannelData::Connection::SlackIncomingWebhookConnection::IncomingWebhook
69
+ }
70
+
71
+ type incoming_webhook = { url: String }
72
+
73
+ class IncomingWebhook < Knockapi::Internal::Type::BaseModel
74
+ attr_accessor url: String
59
75
 
60
- def initialize: (url: String) -> void
76
+ def initialize: (url: String) -> void
61
77
 
62
- def to_hash: -> { url: String }
78
+ def to_hash: -> { url: String }
79
+ end
63
80
  end
64
81
 
65
82
  def self?.variants: -> ::Array[Knockapi::Models::Recipients::SlackChannelData::connection]
@@ -54,6 +54,10 @@ module Knockapi
54
54
 
55
55
  type branding =
56
56
  {
57
+ dark_icon_url: String?,
58
+ dark_logo_url: String?,
59
+ dark_primary_color: String?,
60
+ dark_primary_color_contrast: String?,
57
61
  icon_url: String?,
58
62
  logo_url: String?,
59
63
  primary_color: String?,
@@ -61,6 +65,14 @@ module Knockapi
61
65
  }
62
66
 
63
67
  class Branding < Knockapi::Internal::Type::BaseModel
68
+ attr_accessor dark_icon_url: String?
69
+
70
+ attr_accessor dark_logo_url: String?
71
+
72
+ attr_accessor dark_primary_color: String?
73
+
74
+ attr_accessor dark_primary_color_contrast: String?
75
+
64
76
  attr_accessor icon_url: String?
65
77
 
66
78
  attr_accessor logo_url: String?
@@ -70,6 +82,10 @@ module Knockapi
70
82
  attr_accessor primary_color_contrast: String?
71
83
 
72
84
  def initialize: (
85
+ ?dark_icon_url: String?,
86
+ ?dark_logo_url: String?,
87
+ ?dark_primary_color: String?,
88
+ ?dark_primary_color_contrast: String?,
73
89
  ?icon_url: String?,
74
90
  ?logo_url: String?,
75
91
  ?primary_color: String?,
@@ -77,6 +93,10 @@ module Knockapi
77
93
  ) -> void
78
94
 
79
95
  def to_hash: -> {
96
+ dark_icon_url: String?,
97
+ dark_logo_url: String?,
98
+ dark_primary_color: String?,
99
+ dark_primary_color_contrast: String?,
80
100
  icon_url: String?,
81
101
  logo_url: String?,
82
102
  primary_color: String?,
@@ -67,6 +67,10 @@ module Knockapi
67
67
 
68
68
  type branding =
69
69
  {
70
+ dark_icon_url: String?,
71
+ dark_logo_url: String?,
72
+ dark_primary_color: String?,
73
+ dark_primary_color_contrast: String?,
70
74
  icon_url: String?,
71
75
  logo_url: String?,
72
76
  primary_color: String?,
@@ -74,6 +78,14 @@ module Knockapi
74
78
  }
75
79
 
76
80
  class Branding < Knockapi::Internal::Type::BaseModel
81
+ attr_accessor dark_icon_url: String?
82
+
83
+ attr_accessor dark_logo_url: String?
84
+
85
+ attr_accessor dark_primary_color: String?
86
+
87
+ attr_accessor dark_primary_color_contrast: String?
88
+
77
89
  attr_accessor icon_url: String?
78
90
 
79
91
  attr_accessor logo_url: String?
@@ -83,6 +95,10 @@ module Knockapi
83
95
  attr_accessor primary_color_contrast: String?
84
96
 
85
97
  def initialize: (
98
+ ?dark_icon_url: String?,
99
+ ?dark_logo_url: String?,
100
+ ?dark_primary_color: String?,
101
+ ?dark_primary_color_contrast: String?,
86
102
  ?icon_url: String?,
87
103
  ?logo_url: String?,
88
104
  ?primary_color: String?,
@@ -90,6 +106,10 @@ module Knockapi
90
106
  ) -> void
91
107
 
92
108
  def to_hash: -> {
109
+ dark_icon_url: String?,
110
+ dark_logo_url: String?,
111
+ dark_primary_color: String?,
112
+ dark_primary_color_contrast: String?,
93
113
  icon_url: String?,
94
114
  logo_url: String?,
95
115
  primary_color: String?,
@@ -0,0 +1,28 @@
1
+ module Knockapi
2
+ module Models
3
+ type user_unset_preferences_params =
4
+ { user_id: String, id: String }
5
+ & Knockapi::Internal::Type::request_parameters
6
+
7
+ class UserUnsetPreferencesParams < Knockapi::Internal::Type::BaseModel
8
+ extend Knockapi::Internal::Type::RequestParameters::Converter
9
+ include Knockapi::Internal::Type::RequestParameters
10
+
11
+ attr_accessor user_id: String
12
+
13
+ attr_accessor id: String
14
+
15
+ def initialize: (
16
+ user_id: String,
17
+ id: String,
18
+ ?request_options: Knockapi::request_opts
19
+ ) -> void
20
+
21
+ def to_hash: -> {
22
+ user_id: String,
23
+ id: String,
24
+ request_options: Knockapi::RequestOptions
25
+ }
26
+ end
27
+ end
28
+ end
@@ -3,7 +3,7 @@ module Knockapi
3
3
  module Users
4
4
  type bulk_set_preferences_params =
5
5
  {
6
- preferences: Knockapi::Recipients::PreferenceSetRequest,
6
+ preferences: Knockapi::Users::BulkSetPreferencesParams::Preferences,
7
7
  user_ids: ::Array[String]
8
8
  }
9
9
  & Knockapi::Internal::Type::request_parameters
@@ -12,21 +12,166 @@ module Knockapi
12
12
  extend Knockapi::Internal::Type::RequestParameters::Converter
13
13
  include Knockapi::Internal::Type::RequestParameters
14
14
 
15
- attr_accessor preferences: Knockapi::Recipients::PreferenceSetRequest
15
+ attr_accessor preferences: Knockapi::Users::BulkSetPreferencesParams::Preferences
16
16
 
17
17
  attr_accessor user_ids: ::Array[String]
18
18
 
19
19
  def initialize: (
20
- preferences: Knockapi::Recipients::PreferenceSetRequest,
20
+ preferences: Knockapi::Users::BulkSetPreferencesParams::Preferences,
21
21
  user_ids: ::Array[String],
22
22
  ?request_options: Knockapi::request_opts
23
23
  ) -> void
24
24
 
25
25
  def to_hash: -> {
26
- preferences: Knockapi::Recipients::PreferenceSetRequest,
26
+ preferences: Knockapi::Users::BulkSetPreferencesParams::Preferences,
27
27
  user_ids: ::Array[String],
28
28
  request_options: Knockapi::RequestOptions
29
29
  }
30
+
31
+ type preferences =
32
+ {
33
+ id: String,
34
+ categories: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::category]?,
35
+ channel_types: Knockapi::Recipients::PreferenceSetChannelTypes?,
36
+ channels: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::channel]?,
37
+ commercial_subscribed: bool?,
38
+ workflows: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::workflow]?
39
+ }
40
+
41
+ class Preferences < Knockapi::Internal::Type::BaseModel
42
+ attr_reader id: String?
43
+
44
+ def id=: (String) -> String
45
+
46
+ attr_accessor categories: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::category]?
47
+
48
+ attr_accessor channel_types: Knockapi::Recipients::PreferenceSetChannelTypes?
49
+
50
+ attr_accessor channels: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::channel]?
51
+
52
+ attr_accessor commercial_subscribed: bool?
53
+
54
+ attr_accessor workflows: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::workflow]?
55
+
56
+ def initialize: (
57
+ ?id: String,
58
+ ?categories: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::category]?,
59
+ ?channel_types: Knockapi::Recipients::PreferenceSetChannelTypes?,
60
+ ?channels: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::channel]?,
61
+ ?commercial_subscribed: bool?,
62
+ ?workflows: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::workflow]?
63
+ ) -> void
64
+
65
+ def to_hash: -> {
66
+ id: String,
67
+ categories: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::category]?,
68
+ channel_types: Knockapi::Recipients::PreferenceSetChannelTypes?,
69
+ channels: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::channel]?,
70
+ commercial_subscribed: bool?,
71
+ workflows: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::workflow]?
72
+ }
73
+
74
+ type category =
75
+ bool
76
+ | Knockapi::Users::BulkSetPreferencesParams::Preferences::Category::PreferenceSetWorkflowCategorySettingObject
77
+
78
+ module Category
79
+ extend Knockapi::Internal::Type::Union
80
+
81
+ type preference_set_workflow_category_setting_object =
82
+ {
83
+ channel_types: Knockapi::Recipients::PreferenceSetChannelTypes?,
84
+ channels: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Category::PreferenceSetWorkflowCategorySettingObject::channel]?,
85
+ conditions: ::Array[Knockapi::Condition]?
86
+ }
87
+
88
+ class PreferenceSetWorkflowCategorySettingObject < Knockapi::Internal::Type::BaseModel
89
+ attr_accessor channel_types: Knockapi::Recipients::PreferenceSetChannelTypes?
90
+
91
+ attr_accessor channels: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Category::PreferenceSetWorkflowCategorySettingObject::channel]?
92
+
93
+ attr_accessor conditions: ::Array[Knockapi::Condition]?
94
+
95
+ def initialize: (
96
+ ?channel_types: Knockapi::Recipients::PreferenceSetChannelTypes?,
97
+ ?channels: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Category::PreferenceSetWorkflowCategorySettingObject::channel]?,
98
+ ?conditions: ::Array[Knockapi::Condition]?
99
+ ) -> void
100
+
101
+ def to_hash: -> {
102
+ channel_types: Knockapi::Recipients::PreferenceSetChannelTypes?,
103
+ channels: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Category::PreferenceSetWorkflowCategorySettingObject::channel]?,
104
+ conditions: ::Array[Knockapi::Condition]?
105
+ }
106
+
107
+ type channel =
108
+ bool | Knockapi::Recipients::PreferenceSetChannelSetting
109
+
110
+ module Channel
111
+ extend Knockapi::Internal::Type::Union
112
+
113
+ def self?.variants: -> ::Array[Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Category::PreferenceSetWorkflowCategorySettingObject::channel]
114
+ end
115
+ end
116
+
117
+ def self?.variants: -> ::Array[Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::category]
118
+ end
119
+
120
+ type channel =
121
+ bool | Knockapi::Recipients::PreferenceSetChannelSetting
122
+
123
+ module Channel
124
+ extend Knockapi::Internal::Type::Union
125
+
126
+ def self?.variants: -> ::Array[Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::channel]
127
+ end
128
+
129
+ type workflow =
130
+ bool
131
+ | Knockapi::Users::BulkSetPreferencesParams::Preferences::Workflow::PreferenceSetWorkflowCategorySettingObject
132
+
133
+ module Workflow
134
+ extend Knockapi::Internal::Type::Union
135
+
136
+ type preference_set_workflow_category_setting_object =
137
+ {
138
+ channel_types: Knockapi::Recipients::PreferenceSetChannelTypes?,
139
+ channels: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Workflow::PreferenceSetWorkflowCategorySettingObject::channel]?,
140
+ conditions: ::Array[Knockapi::Condition]?
141
+ }
142
+
143
+ class PreferenceSetWorkflowCategorySettingObject < Knockapi::Internal::Type::BaseModel
144
+ attr_accessor channel_types: Knockapi::Recipients::PreferenceSetChannelTypes?
145
+
146
+ attr_accessor channels: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Workflow::PreferenceSetWorkflowCategorySettingObject::channel]?
147
+
148
+ attr_accessor conditions: ::Array[Knockapi::Condition]?
149
+
150
+ def initialize: (
151
+ ?channel_types: Knockapi::Recipients::PreferenceSetChannelTypes?,
152
+ ?channels: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Workflow::PreferenceSetWorkflowCategorySettingObject::channel]?,
153
+ ?conditions: ::Array[Knockapi::Condition]?
154
+ ) -> void
155
+
156
+ def to_hash: -> {
157
+ channel_types: Knockapi::Recipients::PreferenceSetChannelTypes?,
158
+ channels: ::Hash[Symbol, Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Workflow::PreferenceSetWorkflowCategorySettingObject::channel]?,
159
+ conditions: ::Array[Knockapi::Condition]?
160
+ }
161
+
162
+ type channel =
163
+ bool | Knockapi::Recipients::PreferenceSetChannelSetting
164
+
165
+ module Channel
166
+ extend Knockapi::Internal::Type::Union
167
+
168
+ def self?.variants: -> ::Array[Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::Workflow::PreferenceSetWorkflowCategorySettingObject::channel]
169
+ end
170
+ end
171
+
172
+ def self?.variants: -> ::Array[Knockapi::Models::Users::BulkSetPreferencesParams::Preferences::workflow]
173
+ end
174
+ end
30
175
  end
31
176
  end
32
177
  end
@@ -41,6 +41,7 @@ module Knockapi
41
41
  active: bool,
42
42
  bypass_global_group_limit: bool,
43
43
  channel_id: String,
44
+ dashboard_url: String,
44
45
  inserted_at: Time,
45
46
  key: String,
46
47
  semver: String,
@@ -82,6 +83,10 @@ module Knockapi
82
83
 
83
84
  def channel_id=: (String) -> String
84
85
 
86
+ attr_reader dashboard_url: String?
87
+
88
+ def dashboard_url=: (String) -> String
89
+
85
90
  attr_reader inserted_at: Time?
86
91
 
87
92
  def inserted_at=: (Time) -> Time
@@ -116,6 +121,7 @@ module Knockapi
116
121
  ?active: bool,
117
122
  ?bypass_global_group_limit: bool,
118
123
  ?channel_id: String,
124
+ ?dashboard_url: String,
119
125
  ?inserted_at: Time,
120
126
  ?key: String,
121
127
  ?semver: String,
@@ -132,6 +138,7 @@ module Knockapi
132
138
  active: bool,
133
139
  bypass_global_group_limit: bool,
134
140
  channel_id: String,
141
+ dashboard_url: String,
135
142
  inserted_at: Time,
136
143
  key: String,
137
144
  semver: String,
@@ -0,0 +1,146 @@
1
+ module Knockapi
2
+ module Models
3
+ type workflow_recipient_run =
4
+ {
5
+ id: String,
6
+ _typename: String,
7
+ inserted_at: Time,
8
+ recipient: Knockapi::Models::recipient_reference,
9
+ status: Knockapi::Models::WorkflowRecipientRun::status,
10
+ trigger_source: Knockapi::WorkflowRecipientRun::TriggerSource,
11
+ updated_at: Time,
12
+ workflow: String,
13
+ workflow_run_id: String,
14
+ actor: Knockapi::Models::recipient_reference?,
15
+ error_count: Integer,
16
+ tenant: String?
17
+ }
18
+
19
+ class WorkflowRecipientRun < Knockapi::Internal::Type::BaseModel
20
+ attr_accessor id: String
21
+
22
+ attr_accessor _typename: String
23
+
24
+ attr_accessor inserted_at: Time
25
+
26
+ attr_accessor recipient: Knockapi::Models::recipient_reference
27
+
28
+ attr_accessor status: Knockapi::Models::WorkflowRecipientRun::status
29
+
30
+ attr_accessor trigger_source: Knockapi::WorkflowRecipientRun::TriggerSource
31
+
32
+ attr_accessor updated_at: Time
33
+
34
+ attr_accessor workflow: String
35
+
36
+ attr_accessor workflow_run_id: String
37
+
38
+ attr_accessor actor: Knockapi::Models::recipient_reference?
39
+
40
+ attr_reader error_count: Integer?
41
+
42
+ def error_count=: (Integer) -> Integer
43
+
44
+ attr_accessor tenant: String?
45
+
46
+ def initialize: (
47
+ id: String,
48
+ _typename: String,
49
+ inserted_at: Time,
50
+ recipient: Knockapi::Models::recipient_reference,
51
+ status: Knockapi::Models::WorkflowRecipientRun::status,
52
+ trigger_source: Knockapi::WorkflowRecipientRun::TriggerSource,
53
+ updated_at: Time,
54
+ workflow: String,
55
+ workflow_run_id: String,
56
+ ?actor: Knockapi::Models::recipient_reference?,
57
+ ?error_count: Integer,
58
+ ?tenant: String?
59
+ ) -> void
60
+
61
+ def to_hash: -> {
62
+ id: String,
63
+ _typename: String,
64
+ inserted_at: Time,
65
+ recipient: Knockapi::Models::recipient_reference,
66
+ status: Knockapi::Models::WorkflowRecipientRun::status,
67
+ trigger_source: Knockapi::WorkflowRecipientRun::TriggerSource,
68
+ updated_at: Time,
69
+ workflow: String,
70
+ workflow_run_id: String,
71
+ actor: Knockapi::Models::recipient_reference?,
72
+ error_count: Integer,
73
+ tenant: String?
74
+ }
75
+
76
+ type status = :queued | :processing | :paused | :completed | :cancelled
77
+
78
+ module Status
79
+ extend Knockapi::Internal::Type::Enum
80
+
81
+ QUEUED: :queued
82
+ PROCESSING: :processing
83
+ PAUSED: :paused
84
+ COMPLETED: :completed
85
+ CANCELLED: :cancelled
86
+
87
+ def self?.values: -> ::Array[Knockapi::Models::WorkflowRecipientRun::status]
88
+ end
89
+
90
+ type trigger_source =
91
+ {
92
+ type: Knockapi::Models::WorkflowRecipientRun::TriggerSource::type_,
93
+ audience_key: String?,
94
+ cancellation_key: String?,
95
+ schedule_id: String?
96
+ }
97
+
98
+ class TriggerSource < Knockapi::Internal::Type::BaseModel
99
+ attr_accessor type: Knockapi::Models::WorkflowRecipientRun::TriggerSource::type_
100
+
101
+ attr_accessor audience_key: String?
102
+
103
+ attr_accessor cancellation_key: String?
104
+
105
+ attr_accessor schedule_id: String?
106
+
107
+ def initialize: (
108
+ type: Knockapi::Models::WorkflowRecipientRun::TriggerSource::type_,
109
+ ?audience_key: String?,
110
+ ?cancellation_key: String?,
111
+ ?schedule_id: String?
112
+ ) -> void
113
+
114
+ def to_hash: -> {
115
+ type: Knockapi::Models::WorkflowRecipientRun::TriggerSource::type_,
116
+ audience_key: String?,
117
+ cancellation_key: String?,
118
+ schedule_id: String?
119
+ }
120
+
121
+ type type_ =
122
+ :api
123
+ | :audience
124
+ | :schedule
125
+ | :broadcast
126
+ | :workflow_step
127
+ | :integration
128
+ | :rehearsal
129
+
130
+ module Type
131
+ extend Knockapi::Internal::Type::Enum
132
+
133
+ API: :api
134
+ AUDIENCE: :audience
135
+ SCHEDULE: :schedule
136
+ BROADCAST: :broadcast
137
+ WORKFLOW_STEP: :workflow_step
138
+ INTEGRATION: :integration
139
+ REHEARSAL: :rehearsal
140
+
141
+ def self?.values: -> ::Array[Knockapi::Models::WorkflowRecipientRun::TriggerSource::type_]
142
+ end
143
+ end
144
+ end
145
+ end
146
+ end
@@ -0,0 +1,20 @@
1
+ module Knockapi
2
+ module Models
3
+ type workflow_recipient_run_detail =
4
+ { events: ::Array[Knockapi::WorkflowRecipientRunEvent] }
5
+
6
+ class WorkflowRecipientRunDetail < Knockapi::Models::WorkflowRecipientRun
7
+ def events: -> ::Array[Knockapi::WorkflowRecipientRunEvent]
8
+
9
+ def events=: (
10
+ ::Array[Knockapi::WorkflowRecipientRunEvent] _
11
+ ) -> ::Array[Knockapi::WorkflowRecipientRunEvent]
12
+
13
+ def initialize: (
14
+ events: ::Array[Knockapi::WorkflowRecipientRunEvent]
15
+ ) -> void
16
+
17
+ def to_hash: -> { events: ::Array[Knockapi::WorkflowRecipientRunEvent] }
18
+ end
19
+ end
20
+ end