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.
- checksums.yaml +7 -0
- data/README.md +305 -0
- data/SECURITY.md +27 -0
- data/lib/notiflows/client.rb +117 -0
- data/lib/notiflows/errors.rb +228 -0
- data/lib/notiflows/file_part.rb +58 -0
- data/lib/notiflows/internal/cursor_page.rb +100 -0
- data/lib/notiflows/internal/transport/base_client.rb +573 -0
- data/lib/notiflows/internal/transport/pooled_net_requester.rb +210 -0
- data/lib/notiflows/internal/type/array_of.rb +168 -0
- data/lib/notiflows/internal/type/base_model.rb +531 -0
- data/lib/notiflows/internal/type/base_page.rb +55 -0
- data/lib/notiflows/internal/type/boolean.rb +77 -0
- data/lib/notiflows/internal/type/converter.rb +327 -0
- data/lib/notiflows/internal/type/enum.rb +131 -0
- data/lib/notiflows/internal/type/file_input.rb +111 -0
- data/lib/notiflows/internal/type/hash_of.rb +188 -0
- data/lib/notiflows/internal/type/request_parameters.rb +42 -0
- data/lib/notiflows/internal/type/union.rb +237 -0
- data/lib/notiflows/internal/type/unknown.rb +81 -0
- data/lib/notiflows/internal/util.rb +920 -0
- data/lib/notiflows/internal.rb +20 -0
- data/lib/notiflows/models/delivery.rb +189 -0
- data/lib/notiflows/models/delivery_list_params.rb +78 -0
- data/lib/notiflows/models/delivery_retrieve_params.rb +14 -0
- data/lib/notiflows/models/notification.rb +151 -0
- data/lib/notiflows/models/notification_list_deliveries_params.rb +78 -0
- data/lib/notiflows/models/notification_list_params.rb +70 -0
- data/lib/notiflows/models/notification_retrieve_params.rb +14 -0
- data/lib/notiflows/models/notiflow_run_params.rb +197 -0
- data/lib/notiflows/models/notiflow_run_response.rb +19 -0
- data/lib/notiflows/models/topic.rb +27 -0
- data/lib/notiflows/models/topic_delete_params.rb +14 -0
- data/lib/notiflows/models/topic_list_params.rb +38 -0
- data/lib/notiflows/models/topic_retrieve_params.rb +14 -0
- data/lib/notiflows/models/topics/bulk_operation_response.rb +51 -0
- data/lib/notiflows/models/topics/bulk_subscribe_request.rb +20 -0
- data/lib/notiflows/models/topics/subscription_list_params.rb +56 -0
- data/lib/notiflows/models/topics/subscription_subscribe_bulk_params.rb +16 -0
- data/lib/notiflows/models/topics/subscription_unsubscribe_bulk_params.rb +16 -0
- data/lib/notiflows/models/user.rb +111 -0
- data/lib/notiflows/models/user_delete_params.rb +14 -0
- data/lib/notiflows/models/user_list_params.rb +54 -0
- data/lib/notiflows/models/user_retrieve_params.rb +14 -0
- data/lib/notiflows/models/user_upsert_params.rb +122 -0
- data/lib/notiflows/models/users/channel_setting_delete_params.rb +22 -0
- data/lib/notiflows/models/users/channel_setting_retrieve_params.rb +22 -0
- data/lib/notiflows/models/users/channel_setting_update_params.rb +45 -0
- data/lib/notiflows/models/users/channel_settings.rb +91 -0
- data/lib/notiflows/models/users/delivery_list_params.rb +80 -0
- data/lib/notiflows/models/users/delivery_retrieve_params.rb +22 -0
- data/lib/notiflows/models/users/mobile_push_settings.rb +20 -0
- data/lib/notiflows/models/users/notification_list_params.rb +72 -0
- data/lib/notiflows/models/users/notification_retrieve_params.rb +22 -0
- data/lib/notiflows/models/users/preference_retrieve_params.rb +16 -0
- data/lib/notiflows/models/users/preference_update_params.rb +16 -0
- data/lib/notiflows/models/users/preferences.rb +116 -0
- data/lib/notiflows/models/users/slack_settings.rb +29 -0
- data/lib/notiflows/models/users/subscription.rb +45 -0
- data/lib/notiflows/models/users/subscription_list_params.rb +56 -0
- data/lib/notiflows/models/users/subscription_retrieve_params.rb +22 -0
- data/lib/notiflows/models/users/subscription_subscribe_params.rb +28 -0
- data/lib/notiflows/models/users/subscription_unsubscribe_params.rb +22 -0
- data/lib/notiflows/models/users/update_preferences_request.rb +45 -0
- data/lib/notiflows/models.rb +79 -0
- data/lib/notiflows/request_options.rb +77 -0
- data/lib/notiflows/resources/deliveries.rb +77 -0
- data/lib/notiflows/resources/notifications.rb +112 -0
- data/lib/notiflows/resources/notiflows.rb +60 -0
- data/lib/notiflows/resources/topics/subscriptions.rb +106 -0
- data/lib/notiflows/resources/topics.rb +91 -0
- data/lib/notiflows/resources/users/channel_settings.rb +132 -0
- data/lib/notiflows/resources/users/deliveries.rb +82 -0
- data/lib/notiflows/resources/users/notifications.rb +80 -0
- data/lib/notiflows/resources/users/preferences.rb +86 -0
- data/lib/notiflows/resources/users/subscriptions.rb +135 -0
- data/lib/notiflows/resources/users.rb +167 -0
- data/lib/notiflows/version.rb +5 -0
- data/lib/notiflows.rb +109 -0
- data/manifest.yaml +17 -0
- data/rbi/notiflows/client.rbi +82 -0
- data/rbi/notiflows/errors.rbi +205 -0
- data/rbi/notiflows/file_part.rbi +37 -0
- data/rbi/notiflows/internal/cursor_page.rbi +37 -0
- data/rbi/notiflows/internal/transport/base_client.rbi +298 -0
- data/rbi/notiflows/internal/transport/pooled_net_requester.rbi +83 -0
- data/rbi/notiflows/internal/type/array_of.rbi +104 -0
- data/rbi/notiflows/internal/type/base_model.rbi +308 -0
- data/rbi/notiflows/internal/type/base_page.rbi +42 -0
- data/rbi/notiflows/internal/type/boolean.rbi +58 -0
- data/rbi/notiflows/internal/type/converter.rbi +216 -0
- data/rbi/notiflows/internal/type/enum.rbi +82 -0
- data/rbi/notiflows/internal/type/file_input.rbi +59 -0
- data/rbi/notiflows/internal/type/hash_of.rbi +104 -0
- data/rbi/notiflows/internal/type/request_parameters.rbi +29 -0
- data/rbi/notiflows/internal/type/union.rbi +128 -0
- data/rbi/notiflows/internal/type/unknown.rbi +58 -0
- data/rbi/notiflows/internal/util.rbi +487 -0
- data/rbi/notiflows/internal.rbi +18 -0
- data/rbi/notiflows/models/delivery.rbi +226 -0
- data/rbi/notiflows/models/delivery_list_params.rbi +123 -0
- data/rbi/notiflows/models/delivery_retrieve_params.rbi +27 -0
- data/rbi/notiflows/models/notification.rbi +190 -0
- data/rbi/notiflows/models/notification_list_deliveries_params.rbi +126 -0
- data/rbi/notiflows/models/notification_list_params.rbi +112 -0
- data/rbi/notiflows/models/notification_retrieve_params.rbi +30 -0
- data/rbi/notiflows/models/notiflow_run_params.rbi +320 -0
- data/rbi/notiflows/models/notiflow_run_response.rbi +31 -0
- data/rbi/notiflows/models/topic.rbi +32 -0
- data/rbi/notiflows/models/topic_delete_params.rbi +27 -0
- data/rbi/notiflows/models/topic_list_params.rbi +68 -0
- data/rbi/notiflows/models/topic_retrieve_params.rbi +27 -0
- data/rbi/notiflows/models/topics/bulk_operation_response.rbi +93 -0
- data/rbi/notiflows/models/topics/bulk_subscribe_request.rbi +35 -0
- data/rbi/notiflows/models/topics/subscription_list_params.rbi +95 -0
- data/rbi/notiflows/models/topics/subscription_subscribe_bulk_params.rbi +32 -0
- data/rbi/notiflows/models/topics/subscription_unsubscribe_bulk_params.rbi +32 -0
- data/rbi/notiflows/models/user.rbi +126 -0
- data/rbi/notiflows/models/user_delete_params.rbi +27 -0
- data/rbi/notiflows/models/user_list_params.rbi +90 -0
- data/rbi/notiflows/models/user_retrieve_params.rbi +27 -0
- data/rbi/notiflows/models/user_upsert_params.rbi +203 -0
- data/rbi/notiflows/models/users/channel_setting_delete_params.rbi +43 -0
- data/rbi/notiflows/models/users/channel_setting_retrieve_params.rbi +43 -0
- data/rbi/notiflows/models/users/channel_setting_update_params.rbi +92 -0
- data/rbi/notiflows/models/users/channel_settings.rbi +156 -0
- data/rbi/notiflows/models/users/delivery_list_params.rbi +128 -0
- data/rbi/notiflows/models/users/delivery_retrieve_params.rbi +43 -0
- data/rbi/notiflows/models/users/mobile_push_settings.rbi +35 -0
- data/rbi/notiflows/models/users/notification_list_params.rbi +117 -0
- data/rbi/notiflows/models/users/notification_retrieve_params.rbi +43 -0
- data/rbi/notiflows/models/users/preference_retrieve_params.rbi +32 -0
- data/rbi/notiflows/models/users/preference_update_params.rbi +34 -0
- data/rbi/notiflows/models/users/preferences.rbi +241 -0
- data/rbi/notiflows/models/users/slack_settings.rbi +49 -0
- data/rbi/notiflows/models/users/subscription.rbi +64 -0
- data/rbi/notiflows/models/users/subscription_list_params.rbi +95 -0
- data/rbi/notiflows/models/users/subscription_retrieve_params.rbi +43 -0
- data/rbi/notiflows/models/users/subscription_subscribe_params.rbi +47 -0
- data/rbi/notiflows/models/users/subscription_unsubscribe_params.rbi +43 -0
- data/rbi/notiflows/models/users/update_preferences_request.rbi +124 -0
- data/rbi/notiflows/models.rbi +42 -0
- data/rbi/notiflows/request_options.rbi +59 -0
- data/rbi/notiflows/resources/deliveries.rbi +67 -0
- data/rbi/notiflows/resources/notifications.rbi +100 -0
- data/rbi/notiflows/resources/notiflows.rbi +52 -0
- data/rbi/notiflows/resources/topics/subscriptions.rbi +88 -0
- data/rbi/notiflows/resources/topics.rbi +69 -0
- data/rbi/notiflows/resources/users/channel_settings.rbi +104 -0
- data/rbi/notiflows/resources/users/deliveries.rbi +69 -0
- data/rbi/notiflows/resources/users/notifications.rbi +66 -0
- data/rbi/notiflows/resources/users/preferences.rbi +76 -0
- data/rbi/notiflows/resources/users/subscriptions.rbi +102 -0
- data/rbi/notiflows/resources/users.rbi +147 -0
- data/rbi/notiflows/version.rbi +5 -0
- data/sig/notiflows/client.rbs +41 -0
- data/sig/notiflows/errors.rbs +117 -0
- data/sig/notiflows/file_part.rbs +21 -0
- data/sig/notiflows/internal/cursor_page.rbs +22 -0
- data/sig/notiflows/internal/transport/base_client.rbs +133 -0
- data/sig/notiflows/internal/transport/pooled_net_requester.rbs +48 -0
- data/sig/notiflows/internal/type/array_of.rbs +48 -0
- data/sig/notiflows/internal/type/base_model.rbs +102 -0
- data/sig/notiflows/internal/type/base_page.rbs +24 -0
- data/sig/notiflows/internal/type/boolean.rbs +26 -0
- data/sig/notiflows/internal/type/converter.rbs +79 -0
- data/sig/notiflows/internal/type/enum.rbs +32 -0
- data/sig/notiflows/internal/type/file_input.rbs +25 -0
- data/sig/notiflows/internal/type/hash_of.rbs +48 -0
- data/sig/notiflows/internal/type/request_parameters.rbs +19 -0
- data/sig/notiflows/internal/type/union.rbs +52 -0
- data/sig/notiflows/internal/type/unknown.rbs +26 -0
- data/sig/notiflows/internal/util.rbs +185 -0
- data/sig/notiflows/internal.rbs +9 -0
- data/sig/notiflows/models/delivery.rbs +130 -0
- data/sig/notiflows/models/delivery_list_params.rbs +77 -0
- data/sig/notiflows/models/delivery_retrieve_params.rbs +15 -0
- data/sig/notiflows/models/notification.rbs +104 -0
- data/sig/notiflows/models/notification_list_deliveries_params.rbs +77 -0
- data/sig/notiflows/models/notification_list_params.rbs +70 -0
- data/sig/notiflows/models/notification_retrieve_params.rbs +15 -0
- data/sig/notiflows/models/notiflow_run_params.rbs +199 -0
- data/sig/notiflows/models/notiflow_run_response.rbs +13 -0
- data/sig/notiflows/models/topic.rbs +15 -0
- data/sig/notiflows/models/topic_delete_params.rbs +15 -0
- data/sig/notiflows/models/topic_list_params.rbs +38 -0
- data/sig/notiflows/models/topic_retrieve_params.rbs +15 -0
- data/sig/notiflows/models/topics/bulk_operation_response.rbs +39 -0
- data/sig/notiflows/models/topics/bulk_subscribe_request.rbs +15 -0
- data/sig/notiflows/models/topics/subscription_list_params.rbs +58 -0
- data/sig/notiflows/models/topics/subscription_subscribe_bulk_params.rbs +17 -0
- data/sig/notiflows/models/topics/subscription_unsubscribe_bulk_params.rbs +17 -0
- data/sig/notiflows/models/user.rbs +75 -0
- data/sig/notiflows/models/user_delete_params.rbs +15 -0
- data/sig/notiflows/models/user_list_params.rbs +56 -0
- data/sig/notiflows/models/user_retrieve_params.rbs +15 -0
- data/sig/notiflows/models/user_upsert_params.rbs +112 -0
- data/sig/notiflows/models/users/channel_setting_delete_params.rbs +26 -0
- data/sig/notiflows/models/users/channel_setting_retrieve_params.rbs +26 -0
- data/sig/notiflows/models/users/channel_setting_update_params.rbs +42 -0
- data/sig/notiflows/models/users/channel_settings.rbs +68 -0
- data/sig/notiflows/models/users/delivery_list_params.rbs +79 -0
- data/sig/notiflows/models/users/delivery_retrieve_params.rbs +26 -0
- data/sig/notiflows/models/users/mobile_push_settings.rbs +15 -0
- data/sig/notiflows/models/users/notification_list_params.rbs +72 -0
- data/sig/notiflows/models/users/notification_retrieve_params.rbs +26 -0
- data/sig/notiflows/models/users/preference_retrieve_params.rbs +17 -0
- data/sig/notiflows/models/users/preference_update_params.rbs +17 -0
- data/sig/notiflows/models/users/preferences.rbs +118 -0
- data/sig/notiflows/models/users/slack_settings.rbs +24 -0
- data/sig/notiflows/models/users/subscription.rbs +32 -0
- data/sig/notiflows/models/users/subscription_list_params.rbs +58 -0
- data/sig/notiflows/models/users/subscription_retrieve_params.rbs +26 -0
- data/sig/notiflows/models/users/subscription_subscribe_params.rbs +25 -0
- data/sig/notiflows/models/users/subscription_unsubscribe_params.rbs +26 -0
- data/sig/notiflows/models/users/update_preferences_request.rbs +52 -0
- data/sig/notiflows/models.rbs +39 -0
- data/sig/notiflows/request_options.rbs +34 -0
- data/sig/notiflows/resources/deliveries.rbs +24 -0
- data/sig/notiflows/resources/notifications.rbs +36 -0
- data/sig/notiflows/resources/notiflows.rbs +16 -0
- data/sig/notiflows/resources/topics/subscriptions.rbs +31 -0
- data/sig/notiflows/resources/topics.rbs +23 -0
- data/sig/notiflows/resources/users/channel_settings.rbs +28 -0
- data/sig/notiflows/resources/users/deliveries.rbs +28 -0
- data/sig/notiflows/resources/users/notifications.rbs +27 -0
- data/sig/notiflows/resources/users/preferences.rbs +21 -0
- data/sig/notiflows/resources/users/subscriptions.rbs +37 -0
- data/sig/notiflows/resources/users.rbs +52 -0
- data/sig/notiflows/version.rbs +3 -0
- metadata +302 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Notiflows
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
class MobilePushSettings < Notiflows::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Notiflows::Users::MobilePushSettings,
|
|
11
|
+
Notiflows::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# List of device tokens for push notifications. At least one token is required.
|
|
16
|
+
sig { returns(T::Array[String]) }
|
|
17
|
+
attr_accessor :device_tokens
|
|
18
|
+
|
|
19
|
+
# Settings for mobile push notifications (APNS/FCM)
|
|
20
|
+
sig do
|
|
21
|
+
params(device_tokens: T::Array[String]).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(
|
|
24
|
+
# List of device tokens for push notifications. At least one token is required.
|
|
25
|
+
device_tokens:
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig { override.returns({ device_tokens: T::Array[String] }) }
|
|
30
|
+
def to_hash
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Notiflows
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
class NotificationListParams < 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::NotificationListParams,
|
|
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 created after (ISO 8601 datetime)
|
|
33
|
+
sig { returns(T.nilable(String)) }
|
|
34
|
+
attr_reader :created_after
|
|
35
|
+
|
|
36
|
+
sig { params(created_after: String).void }
|
|
37
|
+
attr_writer :created_after
|
|
38
|
+
|
|
39
|
+
# Filter by created before (ISO 8601 datetime)
|
|
40
|
+
sig { returns(T.nilable(String)) }
|
|
41
|
+
attr_reader :created_before
|
|
42
|
+
|
|
43
|
+
sig { params(created_before: String).void }
|
|
44
|
+
attr_writer :created_before
|
|
45
|
+
|
|
46
|
+
# Number of items per page (default: 25, max: 1000)
|
|
47
|
+
sig { returns(T.nilable(Integer)) }
|
|
48
|
+
attr_reader :limit
|
|
49
|
+
|
|
50
|
+
sig { params(limit: Integer).void }
|
|
51
|
+
attr_writer :limit
|
|
52
|
+
|
|
53
|
+
# Filter by status
|
|
54
|
+
sig { returns(T.nilable(String)) }
|
|
55
|
+
attr_reader :status
|
|
56
|
+
|
|
57
|
+
sig { params(status: String).void }
|
|
58
|
+
attr_writer :status
|
|
59
|
+
|
|
60
|
+
# Filter by topic
|
|
61
|
+
sig { returns(T.nilable(String)) }
|
|
62
|
+
attr_reader :topic
|
|
63
|
+
|
|
64
|
+
sig { params(topic: String).void }
|
|
65
|
+
attr_writer :topic
|
|
66
|
+
|
|
67
|
+
sig do
|
|
68
|
+
params(
|
|
69
|
+
after: String,
|
|
70
|
+
before: String,
|
|
71
|
+
created_after: String,
|
|
72
|
+
created_before: String,
|
|
73
|
+
limit: Integer,
|
|
74
|
+
status: String,
|
|
75
|
+
topic: String,
|
|
76
|
+
request_options: Notiflows::RequestOptions::OrHash
|
|
77
|
+
).returns(T.attached_class)
|
|
78
|
+
end
|
|
79
|
+
def self.new(
|
|
80
|
+
# Cursor for fetching the next page
|
|
81
|
+
after: nil,
|
|
82
|
+
# Cursor for fetching the previous page
|
|
83
|
+
before: nil,
|
|
84
|
+
# Filter by created after (ISO 8601 datetime)
|
|
85
|
+
created_after: nil,
|
|
86
|
+
# Filter by created before (ISO 8601 datetime)
|
|
87
|
+
created_before: nil,
|
|
88
|
+
# Number of items per page (default: 25, max: 1000)
|
|
89
|
+
limit: nil,
|
|
90
|
+
# Filter by status
|
|
91
|
+
status: nil,
|
|
92
|
+
# Filter by topic
|
|
93
|
+
topic: nil,
|
|
94
|
+
request_options: {}
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
sig do
|
|
99
|
+
override.returns(
|
|
100
|
+
{
|
|
101
|
+
after: String,
|
|
102
|
+
before: String,
|
|
103
|
+
created_after: String,
|
|
104
|
+
created_before: String,
|
|
105
|
+
limit: Integer,
|
|
106
|
+
status: String,
|
|
107
|
+
topic: String,
|
|
108
|
+
request_options: Notiflows::RequestOptions
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
end
|
|
112
|
+
def to_hash
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Notiflows
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
class NotificationRetrieveParams < 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::NotificationRetrieveParams,
|
|
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,32 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Notiflows
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
class PreferenceRetrieveParams < 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::PreferenceRetrieveParams,
|
|
14
|
+
Notiflows::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig do
|
|
19
|
+
params(request_options: Notiflows::RequestOptions::OrHash).returns(
|
|
20
|
+
T.attached_class
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
def self.new(request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig { override.returns({ request_options: Notiflows::RequestOptions }) }
|
|
27
|
+
def to_hash
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Notiflows
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
class PreferenceUpdateParams < ::Notiflows::Models::Users::UpdatePreferencesRequest
|
|
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::PreferenceUpdateParams,
|
|
14
|
+
::Notiflows::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig do
|
|
19
|
+
params(request_options: Notiflows::RequestOptions::OrHash).returns(
|
|
20
|
+
T.attached_class
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
def self.new(request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns({ request_options: ::Notiflows::RequestOptions })
|
|
28
|
+
end
|
|
29
|
+
def to_hash
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Notiflows
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
class UsersPreferences < ::Notiflows::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
::Notiflows::Users::UsersPreferences,
|
|
11
|
+
::Notiflows::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Global opt-in/opt-out settings per channel type. `true` = enabled, `false` =
|
|
16
|
+
# opted out.
|
|
17
|
+
sig do
|
|
18
|
+
returns(T.nilable(::Notiflows::Users::UsersPreferences::ChannelTypes))
|
|
19
|
+
end
|
|
20
|
+
attr_reader :channel_types
|
|
21
|
+
|
|
22
|
+
sig do
|
|
23
|
+
params(
|
|
24
|
+
channel_types:
|
|
25
|
+
::Notiflows::Users::UsersPreferences::ChannelTypes::OrHash
|
|
26
|
+
).void
|
|
27
|
+
end
|
|
28
|
+
attr_writer :channel_types
|
|
29
|
+
|
|
30
|
+
# Per-notiflow preferences. Keys are notiflow IDs (UUIDs).
|
|
31
|
+
sig do
|
|
32
|
+
returns(
|
|
33
|
+
T.nilable(
|
|
34
|
+
T::Hash[Symbol, ::Notiflows::Users::UsersPreferences::Notiflow]
|
|
35
|
+
)
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
attr_reader :notiflows
|
|
39
|
+
|
|
40
|
+
sig do
|
|
41
|
+
params(
|
|
42
|
+
notiflows:
|
|
43
|
+
T::Hash[
|
|
44
|
+
Symbol,
|
|
45
|
+
::Notiflows::Users::UsersPreferences::Notiflow::OrHash
|
|
46
|
+
]
|
|
47
|
+
).void
|
|
48
|
+
end
|
|
49
|
+
attr_writer :notiflows
|
|
50
|
+
|
|
51
|
+
# User notification preferences
|
|
52
|
+
sig do
|
|
53
|
+
params(
|
|
54
|
+
channel_types:
|
|
55
|
+
::Notiflows::Users::UsersPreferences::ChannelTypes::OrHash,
|
|
56
|
+
notiflows:
|
|
57
|
+
T::Hash[
|
|
58
|
+
Symbol,
|
|
59
|
+
::Notiflows::Users::UsersPreferences::Notiflow::OrHash
|
|
60
|
+
]
|
|
61
|
+
).returns(T.attached_class)
|
|
62
|
+
end
|
|
63
|
+
def self.new(
|
|
64
|
+
# Global opt-in/opt-out settings per channel type. `true` = enabled, `false` =
|
|
65
|
+
# opted out.
|
|
66
|
+
channel_types: nil,
|
|
67
|
+
# Per-notiflow preferences. Keys are notiflow IDs (UUIDs).
|
|
68
|
+
notiflows: nil
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
sig do
|
|
73
|
+
override.returns(
|
|
74
|
+
{
|
|
75
|
+
channel_types: ::Notiflows::Users::UsersPreferences::ChannelTypes,
|
|
76
|
+
notiflows:
|
|
77
|
+
T::Hash[Symbol, ::Notiflows::Users::UsersPreferences::Notiflow]
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
def to_hash
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
class ChannelTypes < ::Notiflows::Internal::Type::BaseModel
|
|
85
|
+
OrHash =
|
|
86
|
+
T.type_alias do
|
|
87
|
+
T.any(
|
|
88
|
+
::Notiflows::Users::UsersPreferences::ChannelTypes,
|
|
89
|
+
::Notiflows::Internal::AnyHash
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Chat notifications (Slack, etc.)
|
|
94
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
95
|
+
attr_reader :chat
|
|
96
|
+
|
|
97
|
+
sig { params(chat: T::Boolean).void }
|
|
98
|
+
attr_writer :chat
|
|
99
|
+
|
|
100
|
+
# Email notifications
|
|
101
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
102
|
+
attr_reader :email
|
|
103
|
+
|
|
104
|
+
sig { params(email: T::Boolean).void }
|
|
105
|
+
attr_writer :email
|
|
106
|
+
|
|
107
|
+
# In-app feed notifications
|
|
108
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
109
|
+
attr_reader :in_app
|
|
110
|
+
|
|
111
|
+
sig { params(in_app: T::Boolean).void }
|
|
112
|
+
attr_writer :in_app
|
|
113
|
+
|
|
114
|
+
# Mobile push notifications (iOS/Android)
|
|
115
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
116
|
+
attr_reader :mobile_push
|
|
117
|
+
|
|
118
|
+
sig { params(mobile_push: T::Boolean).void }
|
|
119
|
+
attr_writer :mobile_push
|
|
120
|
+
|
|
121
|
+
# SMS notifications
|
|
122
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
123
|
+
attr_reader :sms
|
|
124
|
+
|
|
125
|
+
sig { params(sms: T::Boolean).void }
|
|
126
|
+
attr_writer :sms
|
|
127
|
+
|
|
128
|
+
# Web push notifications
|
|
129
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
130
|
+
attr_reader :web_push
|
|
131
|
+
|
|
132
|
+
sig { params(web_push: T::Boolean).void }
|
|
133
|
+
attr_writer :web_push
|
|
134
|
+
|
|
135
|
+
# Global opt-in/opt-out settings per channel type. `true` = enabled, `false` =
|
|
136
|
+
# opted out.
|
|
137
|
+
sig do
|
|
138
|
+
params(
|
|
139
|
+
chat: T::Boolean,
|
|
140
|
+
email: T::Boolean,
|
|
141
|
+
in_app: T::Boolean,
|
|
142
|
+
mobile_push: T::Boolean,
|
|
143
|
+
sms: T::Boolean,
|
|
144
|
+
web_push: T::Boolean
|
|
145
|
+
).returns(T.attached_class)
|
|
146
|
+
end
|
|
147
|
+
def self.new(
|
|
148
|
+
# Chat notifications (Slack, etc.)
|
|
149
|
+
chat: nil,
|
|
150
|
+
# Email notifications
|
|
151
|
+
email: nil,
|
|
152
|
+
# In-app feed notifications
|
|
153
|
+
in_app: nil,
|
|
154
|
+
# Mobile push notifications (iOS/Android)
|
|
155
|
+
mobile_push: nil,
|
|
156
|
+
# SMS notifications
|
|
157
|
+
sms: nil,
|
|
158
|
+
# Web push notifications
|
|
159
|
+
web_push: nil
|
|
160
|
+
)
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
sig do
|
|
164
|
+
override.returns(
|
|
165
|
+
{
|
|
166
|
+
chat: T::Boolean,
|
|
167
|
+
email: T::Boolean,
|
|
168
|
+
in_app: T::Boolean,
|
|
169
|
+
mobile_push: T::Boolean,
|
|
170
|
+
sms: T::Boolean,
|
|
171
|
+
web_push: T::Boolean
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
end
|
|
175
|
+
def to_hash
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
class Notiflow < ::Notiflows::Internal::Type::BaseModel
|
|
180
|
+
OrHash =
|
|
181
|
+
T.type_alias do
|
|
182
|
+
T.any(
|
|
183
|
+
::Notiflows::Users::UsersPreferences::Notiflow,
|
|
184
|
+
::Notiflows::Internal::AnyHash
|
|
185
|
+
)
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Channel-specific overrides for this notiflow
|
|
189
|
+
sig { returns(T.nilable(T::Hash[Symbol, T::Boolean])) }
|
|
190
|
+
attr_reader :channel_types
|
|
191
|
+
|
|
192
|
+
sig { params(channel_types: T::Hash[Symbol, T::Boolean]).void }
|
|
193
|
+
attr_writer :channel_types
|
|
194
|
+
|
|
195
|
+
# Whether this notiflow is enabled for the user
|
|
196
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
197
|
+
attr_reader :enabled
|
|
198
|
+
|
|
199
|
+
sig { params(enabled: T::Boolean).void }
|
|
200
|
+
attr_writer :enabled
|
|
201
|
+
|
|
202
|
+
# Notiflow name (read-only, for display)
|
|
203
|
+
sig { returns(T.nilable(String)) }
|
|
204
|
+
attr_reader :name
|
|
205
|
+
|
|
206
|
+
sig { params(name: String).void }
|
|
207
|
+
attr_writer :name
|
|
208
|
+
|
|
209
|
+
sig do
|
|
210
|
+
params(
|
|
211
|
+
channel_types: T::Hash[Symbol, T::Boolean],
|
|
212
|
+
enabled: T::Boolean,
|
|
213
|
+
name: String
|
|
214
|
+
).returns(T.attached_class)
|
|
215
|
+
end
|
|
216
|
+
def self.new(
|
|
217
|
+
# Channel-specific overrides for this notiflow
|
|
218
|
+
channel_types: nil,
|
|
219
|
+
# Whether this notiflow is enabled for the user
|
|
220
|
+
enabled: nil,
|
|
221
|
+
# Notiflow name (read-only, for display)
|
|
222
|
+
name: nil
|
|
223
|
+
)
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
sig do
|
|
227
|
+
override.returns(
|
|
228
|
+
{
|
|
229
|
+
channel_types: T::Hash[Symbol, T::Boolean],
|
|
230
|
+
enabled: T::Boolean,
|
|
231
|
+
name: String
|
|
232
|
+
}
|
|
233
|
+
)
|
|
234
|
+
end
|
|
235
|
+
def to_hash
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Notiflows
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
class SlackSettings < Notiflows::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(Notiflows::Users::SlackSettings, Notiflows::Internal::AnyHash)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# Slack channel ID (starts with C)
|
|
13
|
+
sig { returns(T.nilable(String)) }
|
|
14
|
+
attr_reader :slack_channel_id
|
|
15
|
+
|
|
16
|
+
sig { params(slack_channel_id: String).void }
|
|
17
|
+
attr_writer :slack_channel_id
|
|
18
|
+
|
|
19
|
+
# Slack user ID for direct messages (starts with U)
|
|
20
|
+
sig { returns(T.nilable(String)) }
|
|
21
|
+
attr_reader :slack_user_id
|
|
22
|
+
|
|
23
|
+
sig { params(slack_user_id: String).void }
|
|
24
|
+
attr_writer :slack_user_id
|
|
25
|
+
|
|
26
|
+
# Settings for Slack notifications. At least one of `slack_channel_id` or
|
|
27
|
+
# `slack_user_id` must be provided.
|
|
28
|
+
sig do
|
|
29
|
+
params(slack_channel_id: String, slack_user_id: String).returns(
|
|
30
|
+
T.attached_class
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
def self.new(
|
|
34
|
+
# Slack channel ID (starts with C)
|
|
35
|
+
slack_channel_id: nil,
|
|
36
|
+
# Slack user ID for direct messages (starts with U)
|
|
37
|
+
slack_user_id: nil
|
|
38
|
+
)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
sig do
|
|
42
|
+
override.returns({ slack_channel_id: String, slack_user_id: String })
|
|
43
|
+
end
|
|
44
|
+
def to_hash
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Notiflows
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
class Subscription < Notiflows::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(Notiflows::Users::Subscription, Notiflows::Internal::AnyHash)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# Subscription ID
|
|
13
|
+
sig { returns(String) }
|
|
14
|
+
attr_accessor :id
|
|
15
|
+
|
|
16
|
+
# When the subscription was created
|
|
17
|
+
sig { returns(Time) }
|
|
18
|
+
attr_accessor :created_at
|
|
19
|
+
|
|
20
|
+
# Name of the subscribed topic
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :topic_name
|
|
23
|
+
|
|
24
|
+
# User's internal ID
|
|
25
|
+
sig { returns(String) }
|
|
26
|
+
attr_accessor :user_id
|
|
27
|
+
|
|
28
|
+
# A user's subscription to a topic
|
|
29
|
+
sig do
|
|
30
|
+
params(
|
|
31
|
+
id: String,
|
|
32
|
+
created_at: Time,
|
|
33
|
+
topic_name: String,
|
|
34
|
+
user_id: String
|
|
35
|
+
).returns(T.attached_class)
|
|
36
|
+
end
|
|
37
|
+
def self.new(
|
|
38
|
+
# Subscription ID
|
|
39
|
+
id:,
|
|
40
|
+
# When the subscription was created
|
|
41
|
+
created_at:,
|
|
42
|
+
# Name of the subscribed topic
|
|
43
|
+
topic_name:,
|
|
44
|
+
# User's internal ID
|
|
45
|
+
user_id:
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
sig do
|
|
50
|
+
override.returns(
|
|
51
|
+
{
|
|
52
|
+
id: String,
|
|
53
|
+
created_at: Time,
|
|
54
|
+
topic_name: String,
|
|
55
|
+
user_id: String
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
def to_hash
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Notiflows
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
class SubscriptionListParams < 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::SubscriptionListParams,
|
|
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 created after (ISO 8601 datetime)
|
|
33
|
+
sig { returns(T.nilable(String)) }
|
|
34
|
+
attr_reader :created_after
|
|
35
|
+
|
|
36
|
+
sig { params(created_after: String).void }
|
|
37
|
+
attr_writer :created_after
|
|
38
|
+
|
|
39
|
+
# Filter by created before (ISO 8601 datetime)
|
|
40
|
+
sig { returns(T.nilable(String)) }
|
|
41
|
+
attr_reader :created_before
|
|
42
|
+
|
|
43
|
+
sig { params(created_before: String).void }
|
|
44
|
+
attr_writer :created_before
|
|
45
|
+
|
|
46
|
+
# Number of items per page (default: 25, max: 1000)
|
|
47
|
+
sig { returns(T.nilable(Integer)) }
|
|
48
|
+
attr_reader :limit
|
|
49
|
+
|
|
50
|
+
sig { params(limit: Integer).void }
|
|
51
|
+
attr_writer :limit
|
|
52
|
+
|
|
53
|
+
sig do
|
|
54
|
+
params(
|
|
55
|
+
after: String,
|
|
56
|
+
before: String,
|
|
57
|
+
created_after: String,
|
|
58
|
+
created_before: String,
|
|
59
|
+
limit: Integer,
|
|
60
|
+
request_options: Notiflows::RequestOptions::OrHash
|
|
61
|
+
).returns(T.attached_class)
|
|
62
|
+
end
|
|
63
|
+
def self.new(
|
|
64
|
+
# Cursor for fetching the next page
|
|
65
|
+
after: nil,
|
|
66
|
+
# Cursor for fetching the previous page
|
|
67
|
+
before: nil,
|
|
68
|
+
# Filter by created after (ISO 8601 datetime)
|
|
69
|
+
created_after: nil,
|
|
70
|
+
# Filter by created before (ISO 8601 datetime)
|
|
71
|
+
created_before: nil,
|
|
72
|
+
# Number of items per page (default: 25, max: 1000)
|
|
73
|
+
limit: nil,
|
|
74
|
+
request_options: {}
|
|
75
|
+
)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
sig do
|
|
79
|
+
override.returns(
|
|
80
|
+
{
|
|
81
|
+
after: String,
|
|
82
|
+
before: String,
|
|
83
|
+
created_after: String,
|
|
84
|
+
created_before: String,
|
|
85
|
+
limit: Integer,
|
|
86
|
+
request_options: Notiflows::RequestOptions
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
end
|
|
90
|
+
def to_hash
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|