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,112 @@
1
+ # typed: strong
2
+
3
+ module Notiflows
4
+ module Models
5
+ class NotificationListParams < 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::NotificationListParams, Notiflows::Internal::AnyHash)
12
+ end
13
+
14
+ # Cursor for fetching the next page
15
+ sig { returns(T.nilable(String)) }
16
+ attr_reader :after
17
+
18
+ sig { params(after: String).void }
19
+ attr_writer :after
20
+
21
+ # Cursor for fetching the previous page
22
+ sig { returns(T.nilable(String)) }
23
+ attr_reader :before
24
+
25
+ sig { params(before: String).void }
26
+ attr_writer :before
27
+
28
+ # Filter by created after (ISO 8601 datetime)
29
+ sig { returns(T.nilable(String)) }
30
+ attr_reader :created_after
31
+
32
+ sig { params(created_after: String).void }
33
+ attr_writer :created_after
34
+
35
+ # Filter by created before (ISO 8601 datetime)
36
+ sig { returns(T.nilable(String)) }
37
+ attr_reader :created_before
38
+
39
+ sig { params(created_before: String).void }
40
+ attr_writer :created_before
41
+
42
+ # Number of items per page (default: 25, max: 1000)
43
+ sig { returns(T.nilable(Integer)) }
44
+ attr_reader :limit
45
+
46
+ sig { params(limit: Integer).void }
47
+ attr_writer :limit
48
+
49
+ # Filter by status
50
+ sig { returns(T.nilable(String)) }
51
+ attr_reader :status
52
+
53
+ sig { params(status: String).void }
54
+ attr_writer :status
55
+
56
+ # Filter by topic
57
+ sig { returns(T.nilable(String)) }
58
+ attr_reader :topic
59
+
60
+ sig { params(topic: String).void }
61
+ attr_writer :topic
62
+
63
+ sig do
64
+ params(
65
+ after: String,
66
+ before: String,
67
+ created_after: String,
68
+ created_before: String,
69
+ limit: Integer,
70
+ status: String,
71
+ topic: String,
72
+ request_options: Notiflows::RequestOptions::OrHash
73
+ ).returns(T.attached_class)
74
+ end
75
+ def self.new(
76
+ # Cursor for fetching the next page
77
+ after: nil,
78
+ # Cursor for fetching the previous page
79
+ before: nil,
80
+ # Filter by created after (ISO 8601 datetime)
81
+ created_after: nil,
82
+ # Filter by created before (ISO 8601 datetime)
83
+ created_before: nil,
84
+ # Number of items per page (default: 25, max: 1000)
85
+ limit: nil,
86
+ # Filter by status
87
+ status: nil,
88
+ # Filter by topic
89
+ topic: nil,
90
+ request_options: {}
91
+ )
92
+ end
93
+
94
+ sig do
95
+ override.returns(
96
+ {
97
+ after: String,
98
+ before: String,
99
+ created_after: String,
100
+ created_before: String,
101
+ limit: Integer,
102
+ status: String,
103
+ topic: String,
104
+ request_options: Notiflows::RequestOptions
105
+ }
106
+ )
107
+ end
108
+ def to_hash
109
+ end
110
+ end
111
+ end
112
+ end
@@ -0,0 +1,30 @@
1
+ # typed: strong
2
+
3
+ module Notiflows
4
+ module Models
5
+ class NotificationRetrieveParams < 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(
12
+ Notiflows::NotificationRetrieveParams,
13
+ Notiflows::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig do
18
+ params(request_options: Notiflows::RequestOptions::OrHash).returns(
19
+ T.attached_class
20
+ )
21
+ end
22
+ def self.new(request_options: {})
23
+ end
24
+
25
+ sig { override.returns({ request_options: Notiflows::RequestOptions }) }
26
+ def to_hash
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,320 @@
1
+ # typed: strong
2
+
3
+ module Notiflows
4
+ module Models
5
+ class NotiflowRunParams < 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::NotiflowRunParams, Notiflows::Internal::AnyHash)
12
+ end
13
+
14
+ # Actor (triggering user) specification. Accessible in templates as `actor.*`.
15
+ sig { returns(T.nilable(Notiflows::NotiflowRunParams::Actor)) }
16
+ attr_reader :actor
17
+
18
+ sig { params(actor: Notiflows::NotiflowRunParams::Actor::OrHash).void }
19
+ attr_writer :actor
20
+
21
+ # Template variables. Accessible in notification templates as `data.*`.
22
+ sig { returns(T.nilable(T.anything)) }
23
+ attr_reader :data
24
+
25
+ sig { params(data: T.anything).void }
26
+ attr_writer :data
27
+
28
+ # List of recipients. Each recipient must have an `external_id`. Users are
29
+ # auto-created if they don't exist.
30
+ sig do
31
+ returns(T.nilable(T::Array[Notiflows::NotiflowRunParams::Recipient]))
32
+ end
33
+ attr_reader :recipients
34
+
35
+ sig do
36
+ params(
37
+ recipients: T::Array[Notiflows::NotiflowRunParams::Recipient::OrHash]
38
+ ).void
39
+ end
40
+ attr_writer :recipients
41
+
42
+ # Topic name for pub/sub targeting. Cannot be used with `recipients`.
43
+ sig { returns(T.nilable(String)) }
44
+ attr_reader :topic
45
+
46
+ sig { params(topic: String).void }
47
+ attr_writer :topic
48
+
49
+ sig do
50
+ params(
51
+ actor: Notiflows::NotiflowRunParams::Actor::OrHash,
52
+ data: T.anything,
53
+ recipients: T::Array[Notiflows::NotiflowRunParams::Recipient::OrHash],
54
+ topic: String,
55
+ request_options: Notiflows::RequestOptions::OrHash
56
+ ).returns(T.attached_class)
57
+ end
58
+ def self.new(
59
+ # Actor (triggering user) specification. Accessible in templates as `actor.*`.
60
+ actor: nil,
61
+ # Template variables. Accessible in notification templates as `data.*`.
62
+ data: nil,
63
+ # List of recipients. Each recipient must have an `external_id`. Users are
64
+ # auto-created if they don't exist.
65
+ recipients: nil,
66
+ # Topic name for pub/sub targeting. Cannot be used with `recipients`.
67
+ topic: nil,
68
+ request_options: {}
69
+ )
70
+ end
71
+
72
+ sig do
73
+ override.returns(
74
+ {
75
+ actor: Notiflows::NotiflowRunParams::Actor,
76
+ data: T.anything,
77
+ recipients: T::Array[Notiflows::NotiflowRunParams::Recipient],
78
+ topic: String,
79
+ request_options: Notiflows::RequestOptions
80
+ }
81
+ )
82
+ end
83
+ def to_hash
84
+ end
85
+
86
+ class Actor < Notiflows::Internal::Type::BaseModel
87
+ OrHash =
88
+ T.type_alias do
89
+ T.any(
90
+ Notiflows::NotiflowRunParams::Actor,
91
+ Notiflows::Internal::AnyHash
92
+ )
93
+ end
94
+
95
+ # Your system's identifier for the actor (required)
96
+ sig { returns(String) }
97
+ attr_accessor :external_id
98
+
99
+ sig { returns(T.nilable(String)) }
100
+ attr_reader :avatar
101
+
102
+ sig { params(avatar: String).void }
103
+ attr_writer :avatar
104
+
105
+ sig { returns(T.nilable(T.anything)) }
106
+ attr_reader :custom_fields
107
+
108
+ sig { params(custom_fields: T.anything).void }
109
+ attr_writer :custom_fields
110
+
111
+ sig { returns(T.nilable(String)) }
112
+ attr_reader :email
113
+
114
+ sig { params(email: String).void }
115
+ attr_writer :email
116
+
117
+ sig { returns(T.nilable(String)) }
118
+ attr_reader :first_name
119
+
120
+ sig { params(first_name: String).void }
121
+ attr_writer :first_name
122
+
123
+ sig { returns(T.nilable(String)) }
124
+ attr_reader :last_name
125
+
126
+ sig { params(last_name: String).void }
127
+ attr_writer :last_name
128
+
129
+ sig { returns(T.nilable(String)) }
130
+ attr_reader :locale
131
+
132
+ sig { params(locale: String).void }
133
+ attr_writer :locale
134
+
135
+ sig { returns(T.nilable(String)) }
136
+ attr_reader :phone
137
+
138
+ sig { params(phone: String).void }
139
+ attr_writer :phone
140
+
141
+ sig { returns(T.nilable(String)) }
142
+ attr_reader :timezone
143
+
144
+ sig { params(timezone: String).void }
145
+ attr_writer :timezone
146
+
147
+ # Actor (triggering user) specification. Accessible in templates as `actor.*`.
148
+ sig do
149
+ params(
150
+ external_id: String,
151
+ avatar: String,
152
+ custom_fields: T.anything,
153
+ email: String,
154
+ first_name: String,
155
+ last_name: String,
156
+ locale: String,
157
+ phone: String,
158
+ timezone: String
159
+ ).returns(T.attached_class)
160
+ end
161
+ def self.new(
162
+ # Your system's identifier for the actor (required)
163
+ external_id:,
164
+ avatar: nil,
165
+ custom_fields: nil,
166
+ email: nil,
167
+ first_name: nil,
168
+ last_name: nil,
169
+ locale: nil,
170
+ phone: nil,
171
+ timezone: nil
172
+ )
173
+ end
174
+
175
+ sig do
176
+ override.returns(
177
+ {
178
+ external_id: String,
179
+ avatar: String,
180
+ custom_fields: T.anything,
181
+ email: String,
182
+ first_name: String,
183
+ last_name: String,
184
+ locale: String,
185
+ phone: String,
186
+ timezone: String
187
+ }
188
+ )
189
+ end
190
+ def to_hash
191
+ end
192
+ end
193
+
194
+ class Recipient < Notiflows::Internal::Type::BaseModel
195
+ OrHash =
196
+ T.type_alias do
197
+ T.any(
198
+ Notiflows::NotiflowRunParams::Recipient,
199
+ Notiflows::Internal::AnyHash
200
+ )
201
+ end
202
+
203
+ # Your system's unique identifier for this user (required)
204
+ sig { returns(String) }
205
+ attr_accessor :external_id
206
+
207
+ # Avatar URL
208
+ sig { returns(T.nilable(String)) }
209
+ attr_reader :avatar
210
+
211
+ sig { params(avatar: String).void }
212
+ attr_writer :avatar
213
+
214
+ # Custom attributes
215
+ sig { returns(T.nilable(T.anything)) }
216
+ attr_reader :custom_fields
217
+
218
+ sig { params(custom_fields: T.anything).void }
219
+ attr_writer :custom_fields
220
+
221
+ # Email address (used if user is auto-created)
222
+ sig { returns(T.nilable(String)) }
223
+ attr_reader :email
224
+
225
+ sig { params(email: String).void }
226
+ attr_writer :email
227
+
228
+ # First name
229
+ sig { returns(T.nilable(String)) }
230
+ attr_reader :first_name
231
+
232
+ sig { params(first_name: String).void }
233
+ attr_writer :first_name
234
+
235
+ # Last name
236
+ sig { returns(T.nilable(String)) }
237
+ attr_reader :last_name
238
+
239
+ sig { params(last_name: String).void }
240
+ attr_writer :last_name
241
+
242
+ # BCP 47 locale
243
+ sig { returns(T.nilable(String)) }
244
+ attr_reader :locale
245
+
246
+ sig { params(locale: String).void }
247
+ attr_writer :locale
248
+
249
+ # Phone number in E.164 format
250
+ sig { returns(T.nilable(String)) }
251
+ attr_reader :phone
252
+
253
+ sig { params(phone: String).void }
254
+ attr_writer :phone
255
+
256
+ # IANA timezone
257
+ sig { returns(T.nilable(String)) }
258
+ attr_reader :timezone
259
+
260
+ sig { params(timezone: String).void }
261
+ attr_writer :timezone
262
+
263
+ # Recipient specification for running a notiflow. Users are auto-created if they
264
+ # don't exist.
265
+ sig do
266
+ params(
267
+ external_id: String,
268
+ avatar: String,
269
+ custom_fields: T.anything,
270
+ email: String,
271
+ first_name: String,
272
+ last_name: String,
273
+ locale: String,
274
+ phone: String,
275
+ timezone: String
276
+ ).returns(T.attached_class)
277
+ end
278
+ def self.new(
279
+ # Your system's unique identifier for this user (required)
280
+ external_id:,
281
+ # Avatar URL
282
+ avatar: nil,
283
+ # Custom attributes
284
+ custom_fields: nil,
285
+ # Email address (used if user is auto-created)
286
+ email: nil,
287
+ # First name
288
+ first_name: nil,
289
+ # Last name
290
+ last_name: nil,
291
+ # BCP 47 locale
292
+ locale: nil,
293
+ # Phone number in E.164 format
294
+ phone: nil,
295
+ # IANA timezone
296
+ timezone: nil
297
+ )
298
+ end
299
+
300
+ sig do
301
+ override.returns(
302
+ {
303
+ external_id: String,
304
+ avatar: String,
305
+ custom_fields: T.anything,
306
+ email: String,
307
+ first_name: String,
308
+ last_name: String,
309
+ locale: String,
310
+ phone: String,
311
+ timezone: String
312
+ }
313
+ )
314
+ end
315
+ def to_hash
316
+ end
317
+ end
318
+ end
319
+ end
320
+ end
@@ -0,0 +1,31 @@
1
+ # typed: strong
2
+
3
+ module Notiflows
4
+ module Models
5
+ class NotiflowRunResponse < Notiflows::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Notiflows::Models::NotiflowRunResponse,
10
+ Notiflows::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # ID of the notiflow run. Use this to query notifications created by this run.
15
+ sig { returns(String) }
16
+ attr_accessor :notiflow_run_id
17
+
18
+ # Response after successfully running a notiflow
19
+ sig { params(notiflow_run_id: String).returns(T.attached_class) }
20
+ def self.new(
21
+ # ID of the notiflow run. Use this to query notifications created by this run.
22
+ notiflow_run_id:
23
+ )
24
+ end
25
+
26
+ sig { override.returns({ notiflow_run_id: String }) }
27
+ def to_hash
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,32 @@
1
+ # typed: strong
2
+
3
+ module Notiflows
4
+ module Models
5
+ class Topic < Notiflows::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias { T.any(Notiflows::Topic, Notiflows::Internal::AnyHash) }
8
+
9
+ # When the topic was created
10
+ sig { returns(Time) }
11
+ attr_accessor :created_at
12
+
13
+ # Unique topic name within your project
14
+ sig { returns(String) }
15
+ attr_accessor :name
16
+
17
+ # A topic for pub/sub notification patterns
18
+ sig { params(created_at: Time, name: String).returns(T.attached_class) }
19
+ def self.new(
20
+ # When the topic was created
21
+ created_at:,
22
+ # Unique topic name within your project
23
+ name:
24
+ )
25
+ end
26
+
27
+ sig { override.returns({ created_at: Time, name: String }) }
28
+ def to_hash
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,27 @@
1
+ # typed: strong
2
+
3
+ module Notiflows
4
+ module Models
5
+ class TopicDeleteParams < 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::TopicDeleteParams, Notiflows::Internal::AnyHash)
12
+ end
13
+
14
+ sig do
15
+ params(request_options: Notiflows::RequestOptions::OrHash).returns(
16
+ T.attached_class
17
+ )
18
+ end
19
+ def self.new(request_options: {})
20
+ end
21
+
22
+ sig { override.returns({ request_options: Notiflows::RequestOptions }) }
23
+ def to_hash
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,68 @@
1
+ # typed: strong
2
+
3
+ module Notiflows
4
+ module Models
5
+ class TopicListParams < 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::TopicListParams, Notiflows::Internal::AnyHash)
12
+ end
13
+
14
+ # Cursor for fetching the next page
15
+ sig { returns(T.nilable(String)) }
16
+ attr_reader :after
17
+
18
+ sig { params(after: String).void }
19
+ attr_writer :after
20
+
21
+ # Cursor for fetching the previous page
22
+ sig { returns(T.nilable(String)) }
23
+ attr_reader :before
24
+
25
+ sig { params(before: String).void }
26
+ attr_writer :before
27
+
28
+ # Number of items per page (default: 25, max: 1000)
29
+ sig { returns(T.nilable(Integer)) }
30
+ attr_reader :limit
31
+
32
+ sig { params(limit: Integer).void }
33
+ attr_writer :limit
34
+
35
+ sig do
36
+ params(
37
+ after: String,
38
+ before: String,
39
+ limit: Integer,
40
+ request_options: Notiflows::RequestOptions::OrHash
41
+ ).returns(T.attached_class)
42
+ end
43
+ def self.new(
44
+ # Cursor for fetching the next page
45
+ after: nil,
46
+ # Cursor for fetching the previous page
47
+ before: nil,
48
+ # Number of items per page (default: 25, max: 1000)
49
+ limit: nil,
50
+ request_options: {}
51
+ )
52
+ end
53
+
54
+ sig do
55
+ override.returns(
56
+ {
57
+ after: String,
58
+ before: String,
59
+ limit: Integer,
60
+ request_options: Notiflows::RequestOptions
61
+ }
62
+ )
63
+ end
64
+ def to_hash
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,27 @@
1
+ # typed: strong
2
+
3
+ module Notiflows
4
+ module Models
5
+ class TopicRetrieveParams < 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::TopicRetrieveParams, Notiflows::Internal::AnyHash)
12
+ end
13
+
14
+ sig do
15
+ params(request_options: Notiflows::RequestOptions::OrHash).returns(
16
+ T.attached_class
17
+ )
18
+ end
19
+ def self.new(request_options: {})
20
+ end
21
+
22
+ sig { override.returns({ request_options: Notiflows::RequestOptions }) }
23
+ def to_hash
24
+ end
25
+ end
26
+ end
27
+ end