notiflows 0.0.1

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 (231) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +305 -0
  3. data/SECURITY.md +27 -0
  4. data/lib/notiflows/client.rb +117 -0
  5. data/lib/notiflows/errors.rb +228 -0
  6. data/lib/notiflows/file_part.rb +58 -0
  7. data/lib/notiflows/internal/cursor_page.rb +100 -0
  8. data/lib/notiflows/internal/transport/base_client.rb +573 -0
  9. data/lib/notiflows/internal/transport/pooled_net_requester.rb +210 -0
  10. data/lib/notiflows/internal/type/array_of.rb +168 -0
  11. data/lib/notiflows/internal/type/base_model.rb +531 -0
  12. data/lib/notiflows/internal/type/base_page.rb +55 -0
  13. data/lib/notiflows/internal/type/boolean.rb +77 -0
  14. data/lib/notiflows/internal/type/converter.rb +327 -0
  15. data/lib/notiflows/internal/type/enum.rb +131 -0
  16. data/lib/notiflows/internal/type/file_input.rb +111 -0
  17. data/lib/notiflows/internal/type/hash_of.rb +188 -0
  18. data/lib/notiflows/internal/type/request_parameters.rb +42 -0
  19. data/lib/notiflows/internal/type/union.rb +237 -0
  20. data/lib/notiflows/internal/type/unknown.rb +81 -0
  21. data/lib/notiflows/internal/util.rb +920 -0
  22. data/lib/notiflows/internal.rb +20 -0
  23. data/lib/notiflows/models/delivery.rb +189 -0
  24. data/lib/notiflows/models/delivery_list_params.rb +78 -0
  25. data/lib/notiflows/models/delivery_retrieve_params.rb +14 -0
  26. data/lib/notiflows/models/notification.rb +151 -0
  27. data/lib/notiflows/models/notification_list_deliveries_params.rb +78 -0
  28. data/lib/notiflows/models/notification_list_params.rb +70 -0
  29. data/lib/notiflows/models/notification_retrieve_params.rb +14 -0
  30. data/lib/notiflows/models/notiflow_run_params.rb +197 -0
  31. data/lib/notiflows/models/notiflow_run_response.rb +19 -0
  32. data/lib/notiflows/models/topic.rb +27 -0
  33. data/lib/notiflows/models/topic_delete_params.rb +14 -0
  34. data/lib/notiflows/models/topic_list_params.rb +38 -0
  35. data/lib/notiflows/models/topic_retrieve_params.rb +14 -0
  36. data/lib/notiflows/models/topics/bulk_operation_response.rb +51 -0
  37. data/lib/notiflows/models/topics/bulk_subscribe_request.rb +20 -0
  38. data/lib/notiflows/models/topics/subscription_list_params.rb +56 -0
  39. data/lib/notiflows/models/topics/subscription_subscribe_bulk_params.rb +16 -0
  40. data/lib/notiflows/models/topics/subscription_unsubscribe_bulk_params.rb +16 -0
  41. data/lib/notiflows/models/user.rb +111 -0
  42. data/lib/notiflows/models/user_delete_params.rb +14 -0
  43. data/lib/notiflows/models/user_list_params.rb +54 -0
  44. data/lib/notiflows/models/user_retrieve_params.rb +14 -0
  45. data/lib/notiflows/models/user_upsert_params.rb +122 -0
  46. data/lib/notiflows/models/users/channel_setting_delete_params.rb +22 -0
  47. data/lib/notiflows/models/users/channel_setting_retrieve_params.rb +22 -0
  48. data/lib/notiflows/models/users/channel_setting_update_params.rb +45 -0
  49. data/lib/notiflows/models/users/channel_settings.rb +91 -0
  50. data/lib/notiflows/models/users/delivery_list_params.rb +80 -0
  51. data/lib/notiflows/models/users/delivery_retrieve_params.rb +22 -0
  52. data/lib/notiflows/models/users/mobile_push_settings.rb +20 -0
  53. data/lib/notiflows/models/users/notification_list_params.rb +72 -0
  54. data/lib/notiflows/models/users/notification_retrieve_params.rb +22 -0
  55. data/lib/notiflows/models/users/preference_retrieve_params.rb +16 -0
  56. data/lib/notiflows/models/users/preference_update_params.rb +16 -0
  57. data/lib/notiflows/models/users/preferences.rb +116 -0
  58. data/lib/notiflows/models/users/slack_settings.rb +29 -0
  59. data/lib/notiflows/models/users/subscription.rb +45 -0
  60. data/lib/notiflows/models/users/subscription_list_params.rb +56 -0
  61. data/lib/notiflows/models/users/subscription_retrieve_params.rb +22 -0
  62. data/lib/notiflows/models/users/subscription_subscribe_params.rb +28 -0
  63. data/lib/notiflows/models/users/subscription_unsubscribe_params.rb +22 -0
  64. data/lib/notiflows/models/users/update_preferences_request.rb +45 -0
  65. data/lib/notiflows/models.rb +79 -0
  66. data/lib/notiflows/request_options.rb +77 -0
  67. data/lib/notiflows/resources/deliveries.rb +77 -0
  68. data/lib/notiflows/resources/notifications.rb +112 -0
  69. data/lib/notiflows/resources/notiflows.rb +60 -0
  70. data/lib/notiflows/resources/topics/subscriptions.rb +106 -0
  71. data/lib/notiflows/resources/topics.rb +91 -0
  72. data/lib/notiflows/resources/users/channel_settings.rb +132 -0
  73. data/lib/notiflows/resources/users/deliveries.rb +82 -0
  74. data/lib/notiflows/resources/users/notifications.rb +80 -0
  75. data/lib/notiflows/resources/users/preferences.rb +86 -0
  76. data/lib/notiflows/resources/users/subscriptions.rb +135 -0
  77. data/lib/notiflows/resources/users.rb +167 -0
  78. data/lib/notiflows/version.rb +5 -0
  79. data/lib/notiflows.rb +109 -0
  80. data/manifest.yaml +17 -0
  81. data/rbi/notiflows/client.rbi +82 -0
  82. data/rbi/notiflows/errors.rbi +205 -0
  83. data/rbi/notiflows/file_part.rbi +37 -0
  84. data/rbi/notiflows/internal/cursor_page.rbi +37 -0
  85. data/rbi/notiflows/internal/transport/base_client.rbi +298 -0
  86. data/rbi/notiflows/internal/transport/pooled_net_requester.rbi +83 -0
  87. data/rbi/notiflows/internal/type/array_of.rbi +104 -0
  88. data/rbi/notiflows/internal/type/base_model.rbi +308 -0
  89. data/rbi/notiflows/internal/type/base_page.rbi +42 -0
  90. data/rbi/notiflows/internal/type/boolean.rbi +58 -0
  91. data/rbi/notiflows/internal/type/converter.rbi +216 -0
  92. data/rbi/notiflows/internal/type/enum.rbi +82 -0
  93. data/rbi/notiflows/internal/type/file_input.rbi +59 -0
  94. data/rbi/notiflows/internal/type/hash_of.rbi +104 -0
  95. data/rbi/notiflows/internal/type/request_parameters.rbi +29 -0
  96. data/rbi/notiflows/internal/type/union.rbi +128 -0
  97. data/rbi/notiflows/internal/type/unknown.rbi +58 -0
  98. data/rbi/notiflows/internal/util.rbi +487 -0
  99. data/rbi/notiflows/internal.rbi +18 -0
  100. data/rbi/notiflows/models/delivery.rbi +226 -0
  101. data/rbi/notiflows/models/delivery_list_params.rbi +123 -0
  102. data/rbi/notiflows/models/delivery_retrieve_params.rbi +27 -0
  103. data/rbi/notiflows/models/notification.rbi +190 -0
  104. data/rbi/notiflows/models/notification_list_deliveries_params.rbi +126 -0
  105. data/rbi/notiflows/models/notification_list_params.rbi +112 -0
  106. data/rbi/notiflows/models/notification_retrieve_params.rbi +30 -0
  107. data/rbi/notiflows/models/notiflow_run_params.rbi +320 -0
  108. data/rbi/notiflows/models/notiflow_run_response.rbi +31 -0
  109. data/rbi/notiflows/models/topic.rbi +32 -0
  110. data/rbi/notiflows/models/topic_delete_params.rbi +27 -0
  111. data/rbi/notiflows/models/topic_list_params.rbi +68 -0
  112. data/rbi/notiflows/models/topic_retrieve_params.rbi +27 -0
  113. data/rbi/notiflows/models/topics/bulk_operation_response.rbi +93 -0
  114. data/rbi/notiflows/models/topics/bulk_subscribe_request.rbi +35 -0
  115. data/rbi/notiflows/models/topics/subscription_list_params.rbi +95 -0
  116. data/rbi/notiflows/models/topics/subscription_subscribe_bulk_params.rbi +32 -0
  117. data/rbi/notiflows/models/topics/subscription_unsubscribe_bulk_params.rbi +32 -0
  118. data/rbi/notiflows/models/user.rbi +126 -0
  119. data/rbi/notiflows/models/user_delete_params.rbi +27 -0
  120. data/rbi/notiflows/models/user_list_params.rbi +90 -0
  121. data/rbi/notiflows/models/user_retrieve_params.rbi +27 -0
  122. data/rbi/notiflows/models/user_upsert_params.rbi +203 -0
  123. data/rbi/notiflows/models/users/channel_setting_delete_params.rbi +43 -0
  124. data/rbi/notiflows/models/users/channel_setting_retrieve_params.rbi +43 -0
  125. data/rbi/notiflows/models/users/channel_setting_update_params.rbi +92 -0
  126. data/rbi/notiflows/models/users/channel_settings.rbi +156 -0
  127. data/rbi/notiflows/models/users/delivery_list_params.rbi +128 -0
  128. data/rbi/notiflows/models/users/delivery_retrieve_params.rbi +43 -0
  129. data/rbi/notiflows/models/users/mobile_push_settings.rbi +35 -0
  130. data/rbi/notiflows/models/users/notification_list_params.rbi +117 -0
  131. data/rbi/notiflows/models/users/notification_retrieve_params.rbi +43 -0
  132. data/rbi/notiflows/models/users/preference_retrieve_params.rbi +32 -0
  133. data/rbi/notiflows/models/users/preference_update_params.rbi +34 -0
  134. data/rbi/notiflows/models/users/preferences.rbi +241 -0
  135. data/rbi/notiflows/models/users/slack_settings.rbi +49 -0
  136. data/rbi/notiflows/models/users/subscription.rbi +64 -0
  137. data/rbi/notiflows/models/users/subscription_list_params.rbi +95 -0
  138. data/rbi/notiflows/models/users/subscription_retrieve_params.rbi +43 -0
  139. data/rbi/notiflows/models/users/subscription_subscribe_params.rbi +47 -0
  140. data/rbi/notiflows/models/users/subscription_unsubscribe_params.rbi +43 -0
  141. data/rbi/notiflows/models/users/update_preferences_request.rbi +124 -0
  142. data/rbi/notiflows/models.rbi +42 -0
  143. data/rbi/notiflows/request_options.rbi +59 -0
  144. data/rbi/notiflows/resources/deliveries.rbi +67 -0
  145. data/rbi/notiflows/resources/notifications.rbi +100 -0
  146. data/rbi/notiflows/resources/notiflows.rbi +52 -0
  147. data/rbi/notiflows/resources/topics/subscriptions.rbi +88 -0
  148. data/rbi/notiflows/resources/topics.rbi +69 -0
  149. data/rbi/notiflows/resources/users/channel_settings.rbi +104 -0
  150. data/rbi/notiflows/resources/users/deliveries.rbi +69 -0
  151. data/rbi/notiflows/resources/users/notifications.rbi +66 -0
  152. data/rbi/notiflows/resources/users/preferences.rbi +76 -0
  153. data/rbi/notiflows/resources/users/subscriptions.rbi +102 -0
  154. data/rbi/notiflows/resources/users.rbi +147 -0
  155. data/rbi/notiflows/version.rbi +5 -0
  156. data/sig/notiflows/client.rbs +41 -0
  157. data/sig/notiflows/errors.rbs +117 -0
  158. data/sig/notiflows/file_part.rbs +21 -0
  159. data/sig/notiflows/internal/cursor_page.rbs +22 -0
  160. data/sig/notiflows/internal/transport/base_client.rbs +133 -0
  161. data/sig/notiflows/internal/transport/pooled_net_requester.rbs +48 -0
  162. data/sig/notiflows/internal/type/array_of.rbs +48 -0
  163. data/sig/notiflows/internal/type/base_model.rbs +102 -0
  164. data/sig/notiflows/internal/type/base_page.rbs +24 -0
  165. data/sig/notiflows/internal/type/boolean.rbs +26 -0
  166. data/sig/notiflows/internal/type/converter.rbs +79 -0
  167. data/sig/notiflows/internal/type/enum.rbs +32 -0
  168. data/sig/notiflows/internal/type/file_input.rbs +25 -0
  169. data/sig/notiflows/internal/type/hash_of.rbs +48 -0
  170. data/sig/notiflows/internal/type/request_parameters.rbs +19 -0
  171. data/sig/notiflows/internal/type/union.rbs +52 -0
  172. data/sig/notiflows/internal/type/unknown.rbs +26 -0
  173. data/sig/notiflows/internal/util.rbs +185 -0
  174. data/sig/notiflows/internal.rbs +9 -0
  175. data/sig/notiflows/models/delivery.rbs +130 -0
  176. data/sig/notiflows/models/delivery_list_params.rbs +77 -0
  177. data/sig/notiflows/models/delivery_retrieve_params.rbs +15 -0
  178. data/sig/notiflows/models/notification.rbs +104 -0
  179. data/sig/notiflows/models/notification_list_deliveries_params.rbs +77 -0
  180. data/sig/notiflows/models/notification_list_params.rbs +70 -0
  181. data/sig/notiflows/models/notification_retrieve_params.rbs +15 -0
  182. data/sig/notiflows/models/notiflow_run_params.rbs +199 -0
  183. data/sig/notiflows/models/notiflow_run_response.rbs +13 -0
  184. data/sig/notiflows/models/topic.rbs +15 -0
  185. data/sig/notiflows/models/topic_delete_params.rbs +15 -0
  186. data/sig/notiflows/models/topic_list_params.rbs +38 -0
  187. data/sig/notiflows/models/topic_retrieve_params.rbs +15 -0
  188. data/sig/notiflows/models/topics/bulk_operation_response.rbs +39 -0
  189. data/sig/notiflows/models/topics/bulk_subscribe_request.rbs +15 -0
  190. data/sig/notiflows/models/topics/subscription_list_params.rbs +58 -0
  191. data/sig/notiflows/models/topics/subscription_subscribe_bulk_params.rbs +17 -0
  192. data/sig/notiflows/models/topics/subscription_unsubscribe_bulk_params.rbs +17 -0
  193. data/sig/notiflows/models/user.rbs +75 -0
  194. data/sig/notiflows/models/user_delete_params.rbs +15 -0
  195. data/sig/notiflows/models/user_list_params.rbs +56 -0
  196. data/sig/notiflows/models/user_retrieve_params.rbs +15 -0
  197. data/sig/notiflows/models/user_upsert_params.rbs +112 -0
  198. data/sig/notiflows/models/users/channel_setting_delete_params.rbs +26 -0
  199. data/sig/notiflows/models/users/channel_setting_retrieve_params.rbs +26 -0
  200. data/sig/notiflows/models/users/channel_setting_update_params.rbs +42 -0
  201. data/sig/notiflows/models/users/channel_settings.rbs +68 -0
  202. data/sig/notiflows/models/users/delivery_list_params.rbs +79 -0
  203. data/sig/notiflows/models/users/delivery_retrieve_params.rbs +26 -0
  204. data/sig/notiflows/models/users/mobile_push_settings.rbs +15 -0
  205. data/sig/notiflows/models/users/notification_list_params.rbs +72 -0
  206. data/sig/notiflows/models/users/notification_retrieve_params.rbs +26 -0
  207. data/sig/notiflows/models/users/preference_retrieve_params.rbs +17 -0
  208. data/sig/notiflows/models/users/preference_update_params.rbs +17 -0
  209. data/sig/notiflows/models/users/preferences.rbs +118 -0
  210. data/sig/notiflows/models/users/slack_settings.rbs +24 -0
  211. data/sig/notiflows/models/users/subscription.rbs +32 -0
  212. data/sig/notiflows/models/users/subscription_list_params.rbs +58 -0
  213. data/sig/notiflows/models/users/subscription_retrieve_params.rbs +26 -0
  214. data/sig/notiflows/models/users/subscription_subscribe_params.rbs +25 -0
  215. data/sig/notiflows/models/users/subscription_unsubscribe_params.rbs +26 -0
  216. data/sig/notiflows/models/users/update_preferences_request.rbs +52 -0
  217. data/sig/notiflows/models.rbs +39 -0
  218. data/sig/notiflows/request_options.rbs +34 -0
  219. data/sig/notiflows/resources/deliveries.rbs +24 -0
  220. data/sig/notiflows/resources/notifications.rbs +36 -0
  221. data/sig/notiflows/resources/notiflows.rbs +16 -0
  222. data/sig/notiflows/resources/topics/subscriptions.rbs +31 -0
  223. data/sig/notiflows/resources/topics.rbs +23 -0
  224. data/sig/notiflows/resources/users/channel_settings.rbs +28 -0
  225. data/sig/notiflows/resources/users/deliveries.rbs +28 -0
  226. data/sig/notiflows/resources/users/notifications.rbs +27 -0
  227. data/sig/notiflows/resources/users/preferences.rbs +21 -0
  228. data/sig/notiflows/resources/users/subscriptions.rbs +37 -0
  229. data/sig/notiflows/resources/users.rbs +52 -0
  230. data/sig/notiflows/version.rbs +3 -0
  231. metadata +302 -0
@@ -0,0 +1,203 @@
1
+ # typed: strong
2
+
3
+ module Notiflows
4
+ module Models
5
+ class UserUpsertParams < Notiflows::Internal::Type::BaseModel
6
+ extend Notiflows::Internal::Type::RequestParameters::Converter
7
+ include Notiflows::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Notiflows::UserUpsertParams, Notiflows::Internal::AnyHash)
12
+ end
13
+
14
+ # Your system's unique identifier for this user. Required for creating new users.
15
+ sig { returns(String) }
16
+ attr_accessor :external_id
17
+
18
+ # URL to user's avatar image (must start with http:// or https://)
19
+ sig { returns(T.nilable(String)) }
20
+ attr_reader :avatar
21
+
22
+ sig { params(avatar: String).void }
23
+ attr_writer :avatar
24
+
25
+ # Initial channel settings (e.g., device tokens for push)
26
+ sig do
27
+ returns(
28
+ T.nilable(T::Array[Notiflows::UserUpsertParams::ChannelSetting])
29
+ )
30
+ end
31
+ attr_reader :channel_settings
32
+
33
+ sig do
34
+ params(
35
+ channel_settings:
36
+ T::Array[Notiflows::UserUpsertParams::ChannelSetting::OrHash]
37
+ ).void
38
+ end
39
+ attr_writer :channel_settings
40
+
41
+ # Custom attributes. Deep-merged with existing values on update.
42
+ sig { returns(T.nilable(T.anything)) }
43
+ attr_reader :custom_fields
44
+
45
+ sig { params(custom_fields: T.anything).void }
46
+ attr_writer :custom_fields
47
+
48
+ # User's email address
49
+ sig { returns(T.nilable(String)) }
50
+ attr_reader :email
51
+
52
+ sig { params(email: String).void }
53
+ attr_writer :email
54
+
55
+ # User's first name
56
+ sig { returns(T.nilable(String)) }
57
+ attr_reader :first_name
58
+
59
+ sig { params(first_name: String).void }
60
+ attr_writer :first_name
61
+
62
+ # User's last name
63
+ sig { returns(T.nilable(String)) }
64
+ attr_reader :last_name
65
+
66
+ sig { params(last_name: String).void }
67
+ attr_writer :last_name
68
+
69
+ # BCP 47 locale code (e.g., en-US, es-ES, fr-FR)
70
+ sig { returns(T.nilable(String)) }
71
+ attr_reader :locale
72
+
73
+ sig { params(locale: String).void }
74
+ attr_writer :locale
75
+
76
+ # User's phone number in E.164 format
77
+ sig { returns(T.nilable(String)) }
78
+ attr_reader :phone
79
+
80
+ sig { params(phone: String).void }
81
+ attr_writer :phone
82
+
83
+ # Request body for updating user preferences. Only provided fields are updated.
84
+ sig { returns(T.nilable(::Notiflows::Users::UpdatePreferencesRequest)) }
85
+ attr_reader :preferences
86
+
87
+ sig do
88
+ params(
89
+ preferences: ::Notiflows::Users::UpdatePreferencesRequest::OrHash
90
+ ).void
91
+ end
92
+ attr_writer :preferences
93
+
94
+ # IANA timezone (e.g., America/New_York, Europe/London)
95
+ sig { returns(T.nilable(String)) }
96
+ attr_reader :timezone
97
+
98
+ sig { params(timezone: String).void }
99
+ attr_writer :timezone
100
+
101
+ sig do
102
+ params(
103
+ external_id: String,
104
+ avatar: String,
105
+ channel_settings:
106
+ T::Array[Notiflows::UserUpsertParams::ChannelSetting::OrHash],
107
+ custom_fields: T.anything,
108
+ email: String,
109
+ first_name: String,
110
+ last_name: String,
111
+ locale: String,
112
+ phone: String,
113
+ preferences: ::Notiflows::Users::UpdatePreferencesRequest::OrHash,
114
+ timezone: String,
115
+ request_options: Notiflows::RequestOptions::OrHash
116
+ ).returns(T.attached_class)
117
+ end
118
+ def self.new(
119
+ # Your system's unique identifier for this user. Required for creating new users.
120
+ external_id:,
121
+ # URL to user's avatar image (must start with http:// or https://)
122
+ avatar: nil,
123
+ # Initial channel settings (e.g., device tokens for push)
124
+ channel_settings: nil,
125
+ # Custom attributes. Deep-merged with existing values on update.
126
+ custom_fields: nil,
127
+ # User's email address
128
+ email: nil,
129
+ # User's first name
130
+ first_name: nil,
131
+ # User's last name
132
+ last_name: nil,
133
+ # BCP 47 locale code (e.g., en-US, es-ES, fr-FR)
134
+ locale: nil,
135
+ # User's phone number in E.164 format
136
+ phone: nil,
137
+ # Request body for updating user preferences. Only provided fields are updated.
138
+ preferences: nil,
139
+ # IANA timezone (e.g., America/New_York, Europe/London)
140
+ timezone: nil,
141
+ request_options: {}
142
+ )
143
+ end
144
+
145
+ sig do
146
+ override.returns(
147
+ {
148
+ external_id: String,
149
+ avatar: String,
150
+ channel_settings:
151
+ T::Array[Notiflows::UserUpsertParams::ChannelSetting],
152
+ custom_fields: T.anything,
153
+ email: String,
154
+ first_name: String,
155
+ last_name: String,
156
+ locale: String,
157
+ phone: String,
158
+ preferences: ::Notiflows::Users::UpdatePreferencesRequest,
159
+ timezone: String,
160
+ request_options: Notiflows::RequestOptions
161
+ }
162
+ )
163
+ end
164
+ def to_hash
165
+ end
166
+
167
+ class ChannelSetting < Notiflows::Internal::Type::BaseModel
168
+ OrHash =
169
+ T.type_alias do
170
+ T.any(
171
+ Notiflows::UserUpsertParams::ChannelSetting,
172
+ Notiflows::Internal::AnyHash
173
+ )
174
+ end
175
+
176
+ # Channel ID
177
+ sig { returns(String) }
178
+ attr_accessor :channel_id
179
+
180
+ # Provider-specific settings
181
+ sig { returns(T.anything) }
182
+ attr_accessor :settings
183
+
184
+ sig do
185
+ params(channel_id: String, settings: T.anything).returns(
186
+ T.attached_class
187
+ )
188
+ end
189
+ def self.new(
190
+ # Channel ID
191
+ channel_id:,
192
+ # Provider-specific settings
193
+ settings:
194
+ )
195
+ end
196
+
197
+ sig { override.returns({ channel_id: String, settings: T.anything }) }
198
+ def to_hash
199
+ end
200
+ end
201
+ end
202
+ end
203
+ end
@@ -0,0 +1,43 @@
1
+ # typed: strong
2
+
3
+ module Notiflows
4
+ module Models
5
+ module Users
6
+ class ChannelSettingDeleteParams < Notiflows::Internal::Type::BaseModel
7
+ extend Notiflows::Internal::Type::RequestParameters::Converter
8
+ include Notiflows::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Notiflows::Users::ChannelSettingDeleteParams,
14
+ Notiflows::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :user_external_id
20
+
21
+ sig do
22
+ params(
23
+ user_external_id: String,
24
+ request_options: Notiflows::RequestOptions::OrHash
25
+ ).returns(T.attached_class)
26
+ end
27
+ def self.new(user_external_id:, request_options: {})
28
+ end
29
+
30
+ sig do
31
+ override.returns(
32
+ {
33
+ user_external_id: String,
34
+ request_options: Notiflows::RequestOptions
35
+ }
36
+ )
37
+ end
38
+ def to_hash
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,43 @@
1
+ # typed: strong
2
+
3
+ module Notiflows
4
+ module Models
5
+ module Users
6
+ class ChannelSettingRetrieveParams < Notiflows::Internal::Type::BaseModel
7
+ extend Notiflows::Internal::Type::RequestParameters::Converter
8
+ include Notiflows::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Notiflows::Users::ChannelSettingRetrieveParams,
14
+ Notiflows::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :user_external_id
20
+
21
+ sig do
22
+ params(
23
+ user_external_id: String,
24
+ request_options: Notiflows::RequestOptions::OrHash
25
+ ).returns(T.attached_class)
26
+ end
27
+ def self.new(user_external_id:, request_options: {})
28
+ end
29
+
30
+ sig do
31
+ override.returns(
32
+ {
33
+ user_external_id: String,
34
+ request_options: Notiflows::RequestOptions
35
+ }
36
+ )
37
+ end
38
+ def to_hash
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,92 @@
1
+ # typed: strong
2
+
3
+ module Notiflows
4
+ module Models
5
+ module Users
6
+ class ChannelSettingUpdateParams < Notiflows::Internal::Type::BaseModel
7
+ extend Notiflows::Internal::Type::RequestParameters::Converter
8
+ include Notiflows::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Notiflows::Users::ChannelSettingUpdateParams,
14
+ Notiflows::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :user_external_id
20
+
21
+ # Provider-specific settings. Structure depends on channel provider.
22
+ sig do
23
+ returns(
24
+ T.any(
25
+ Notiflows::Users::MobilePushSettings,
26
+ Notiflows::Users::SlackSettings
27
+ )
28
+ )
29
+ end
30
+ attr_accessor :settings
31
+
32
+ sig do
33
+ params(
34
+ user_external_id: String,
35
+ settings:
36
+ T.any(
37
+ Notiflows::Users::MobilePushSettings::OrHash,
38
+ Notiflows::Users::SlackSettings::OrHash
39
+ ),
40
+ request_options: Notiflows::RequestOptions::OrHash
41
+ ).returns(T.attached_class)
42
+ end
43
+ def self.new(
44
+ user_external_id:,
45
+ # Provider-specific settings. Structure depends on channel provider.
46
+ settings:,
47
+ request_options: {}
48
+ )
49
+ end
50
+
51
+ sig do
52
+ override.returns(
53
+ {
54
+ user_external_id: String,
55
+ settings:
56
+ T.any(
57
+ Notiflows::Users::MobilePushSettings,
58
+ Notiflows::Users::SlackSettings
59
+ ),
60
+ request_options: Notiflows::RequestOptions
61
+ }
62
+ )
63
+ end
64
+ def to_hash
65
+ end
66
+
67
+ # Provider-specific settings. Structure depends on channel provider.
68
+ module Settings
69
+ extend Notiflows::Internal::Type::Union
70
+
71
+ Variants =
72
+ T.type_alias do
73
+ T.any(
74
+ Notiflows::Users::MobilePushSettings,
75
+ Notiflows::Users::SlackSettings
76
+ )
77
+ end
78
+
79
+ sig do
80
+ override.returns(
81
+ T::Array[
82
+ Notiflows::Users::ChannelSettingUpdateParams::Settings::Variants
83
+ ]
84
+ )
85
+ end
86
+ def self.variants
87
+ end
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,156 @@
1
+ # typed: strong
2
+
3
+ module Notiflows
4
+ module Models
5
+ module Users
6
+ class UsersChannelSettings < Notiflows::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Notiflows::Users::UsersChannelSettings,
11
+ Notiflows::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # Channel ID
16
+ sig { returns(String) }
17
+ attr_accessor :channel_id
18
+
19
+ # When the settings were created
20
+ sig { returns(Time) }
21
+ attr_accessor :created_at
22
+
23
+ # The provider type for this channel
24
+ sig do
25
+ returns(
26
+ Notiflows::Users::UsersChannelSettings::Provider::TaggedSymbol
27
+ )
28
+ end
29
+ attr_accessor :provider
30
+
31
+ # Provider-specific settings. See MobilePushSettings or SlackSettings schemas.
32
+ sig do
33
+ returns(Notiflows::Users::UsersChannelSettings::Settings::Variants)
34
+ end
35
+ attr_accessor :settings
36
+
37
+ # When the settings were last updated
38
+ sig { returns(Time) }
39
+ attr_accessor :updated_at
40
+
41
+ # Internal user ID
42
+ sig { returns(String) }
43
+ attr_accessor :user_id
44
+
45
+ # User's settings for a specific channel (e.g., device tokens, Slack credentials)
46
+ sig do
47
+ params(
48
+ channel_id: String,
49
+ created_at: Time,
50
+ provider:
51
+ Notiflows::Users::UsersChannelSettings::Provider::OrSymbol,
52
+ settings:
53
+ T.any(
54
+ Notiflows::Users::MobilePushSettings::OrHash,
55
+ Notiflows::Users::SlackSettings::OrHash
56
+ ),
57
+ updated_at: Time,
58
+ user_id: String
59
+ ).returns(T.attached_class)
60
+ end
61
+ def self.new(
62
+ # Channel ID
63
+ channel_id:,
64
+ # When the settings were created
65
+ created_at:,
66
+ # The provider type for this channel
67
+ provider:,
68
+ # Provider-specific settings. See MobilePushSettings or SlackSettings schemas.
69
+ settings:,
70
+ # When the settings were last updated
71
+ updated_at:,
72
+ # Internal user ID
73
+ user_id:
74
+ )
75
+ end
76
+
77
+ sig do
78
+ override.returns(
79
+ {
80
+ channel_id: String,
81
+ created_at: Time,
82
+ provider:
83
+ Notiflows::Users::UsersChannelSettings::Provider::TaggedSymbol,
84
+ settings:
85
+ Notiflows::Users::UsersChannelSettings::Settings::Variants,
86
+ updated_at: Time,
87
+ user_id: String
88
+ }
89
+ )
90
+ end
91
+ def to_hash
92
+ end
93
+
94
+ # The provider type for this channel
95
+ module Provider
96
+ extend Notiflows::Internal::Type::Enum
97
+
98
+ TaggedSymbol =
99
+ T.type_alias do
100
+ T.all(Symbol, Notiflows::Users::UsersChannelSettings::Provider)
101
+ end
102
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
103
+
104
+ APNS =
105
+ T.let(
106
+ :apns,
107
+ Notiflows::Users::UsersChannelSettings::Provider::TaggedSymbol
108
+ )
109
+ FCM =
110
+ T.let(
111
+ :fcm,
112
+ Notiflows::Users::UsersChannelSettings::Provider::TaggedSymbol
113
+ )
114
+ SLACK =
115
+ T.let(
116
+ :slack,
117
+ Notiflows::Users::UsersChannelSettings::Provider::TaggedSymbol
118
+ )
119
+
120
+ sig do
121
+ override.returns(
122
+ T::Array[
123
+ Notiflows::Users::UsersChannelSettings::Provider::TaggedSymbol
124
+ ]
125
+ )
126
+ end
127
+ def self.values
128
+ end
129
+ end
130
+
131
+ # Provider-specific settings. See MobilePushSettings or SlackSettings schemas.
132
+ module Settings
133
+ extend Notiflows::Internal::Type::Union
134
+
135
+ Variants =
136
+ T.type_alias do
137
+ T.any(
138
+ Notiflows::Users::MobilePushSettings,
139
+ Notiflows::Users::SlackSettings
140
+ )
141
+ end
142
+
143
+ sig do
144
+ override.returns(
145
+ T::Array[
146
+ Notiflows::Users::UsersChannelSettings::Settings::Variants
147
+ ]
148
+ )
149
+ end
150
+ def self.variants
151
+ end
152
+ end
153
+ end
154
+ end
155
+ end
156
+ end
@@ -0,0 +1,128 @@
1
+ # typed: strong
2
+
3
+ module Notiflows
4
+ module Models
5
+ module Users
6
+ class DeliveryListParams < Notiflows::Internal::Type::BaseModel
7
+ extend Notiflows::Internal::Type::RequestParameters::Converter
8
+ include Notiflows::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Notiflows::Users::DeliveryListParams,
14
+ Notiflows::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ # Cursor for fetching the next page
19
+ sig { returns(T.nilable(String)) }
20
+ attr_reader :after
21
+
22
+ sig { params(after: String).void }
23
+ attr_writer :after
24
+
25
+ # Cursor for fetching the previous page
26
+ sig { returns(T.nilable(String)) }
27
+ attr_reader :before
28
+
29
+ sig { params(before: String).void }
30
+ attr_writer :before
31
+
32
+ # Filter by channel ID (UUID)
33
+ sig { returns(T.nilable(String)) }
34
+ attr_reader :channel_id
35
+
36
+ sig { params(channel_id: String).void }
37
+ attr_writer :channel_id
38
+
39
+ # Filter by created after (ISO 8601 datetime)
40
+ sig { returns(T.nilable(String)) }
41
+ attr_reader :created_after
42
+
43
+ sig { params(created_after: String).void }
44
+ attr_writer :created_after
45
+
46
+ # Filter by created before (ISO 8601 datetime)
47
+ sig { returns(T.nilable(String)) }
48
+ attr_reader :created_before
49
+
50
+ sig { params(created_before: String).void }
51
+ attr_writer :created_before
52
+
53
+ # Number of items per page (default: 25, max: 1000)
54
+ sig { returns(T.nilable(Integer)) }
55
+ attr_reader :limit
56
+
57
+ sig { params(limit: Integer).void }
58
+ attr_writer :limit
59
+
60
+ # Filter by status (pending, sent, failed)
61
+ sig { returns(T.nilable(String)) }
62
+ attr_reader :status
63
+
64
+ sig { params(status: String).void }
65
+ attr_writer :status
66
+
67
+ # Filter by topic name
68
+ sig { returns(T.nilable(String)) }
69
+ attr_reader :topic
70
+
71
+ sig { params(topic: String).void }
72
+ attr_writer :topic
73
+
74
+ sig do
75
+ params(
76
+ after: String,
77
+ before: String,
78
+ channel_id: String,
79
+ created_after: String,
80
+ created_before: String,
81
+ limit: Integer,
82
+ status: String,
83
+ topic: String,
84
+ request_options: Notiflows::RequestOptions::OrHash
85
+ ).returns(T.attached_class)
86
+ end
87
+ def self.new(
88
+ # Cursor for fetching the next page
89
+ after: nil,
90
+ # Cursor for fetching the previous page
91
+ before: nil,
92
+ # Filter by channel ID (UUID)
93
+ channel_id: nil,
94
+ # Filter by created after (ISO 8601 datetime)
95
+ created_after: nil,
96
+ # Filter by created before (ISO 8601 datetime)
97
+ created_before: nil,
98
+ # Number of items per page (default: 25, max: 1000)
99
+ limit: nil,
100
+ # Filter by status (pending, sent, failed)
101
+ status: nil,
102
+ # Filter by topic name
103
+ topic: nil,
104
+ request_options: {}
105
+ )
106
+ end
107
+
108
+ sig do
109
+ override.returns(
110
+ {
111
+ after: String,
112
+ before: String,
113
+ channel_id: String,
114
+ created_after: String,
115
+ created_before: String,
116
+ limit: Integer,
117
+ status: String,
118
+ topic: String,
119
+ request_options: Notiflows::RequestOptions
120
+ }
121
+ )
122
+ end
123
+ def to_hash
124
+ end
125
+ end
126
+ end
127
+ end
128
+ end
@@ -0,0 +1,43 @@
1
+ # typed: strong
2
+
3
+ module Notiflows
4
+ module Models
5
+ module Users
6
+ class DeliveryRetrieveParams < Notiflows::Internal::Type::BaseModel
7
+ extend Notiflows::Internal::Type::RequestParameters::Converter
8
+ include Notiflows::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Notiflows::Users::DeliveryRetrieveParams,
14
+ Notiflows::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :user_external_id
20
+
21
+ sig do
22
+ params(
23
+ user_external_id: String,
24
+ request_options: Notiflows::RequestOptions::OrHash
25
+ ).returns(T.attached_class)
26
+ end
27
+ def self.new(user_external_id:, request_options: {})
28
+ end
29
+
30
+ sig do
31
+ override.returns(
32
+ {
33
+ user_external_id: String,
34
+ request_options: Notiflows::RequestOptions
35
+ }
36
+ )
37
+ end
38
+ def to_hash
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end