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,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Notiflows
|
|
4
|
+
module Internal
|
|
5
|
+
extend Notiflows::Internal::Util::SorbetRuntimeSupport
|
|
6
|
+
|
|
7
|
+
OMIT =
|
|
8
|
+
Object.new.tap do
|
|
9
|
+
_1.define_singleton_method(:inspect) { "#<#{Notiflows::Internal}::OMIT>" }
|
|
10
|
+
end
|
|
11
|
+
.freeze
|
|
12
|
+
|
|
13
|
+
define_sorbet_constant!(:AnyHash) do
|
|
14
|
+
T.type_alias { T::Hash[Symbol, T.anything] }
|
|
15
|
+
end
|
|
16
|
+
define_sorbet_constant!(:FileInput) do
|
|
17
|
+
T.type_alias { T.any(Pathname, StringIO, IO, String, Notiflows::FilePart) }
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Notiflows
|
|
4
|
+
module Models
|
|
5
|
+
# @see Notiflows::Resources::Deliveries#retrieve
|
|
6
|
+
class Delivery < Notiflows::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# Delivery ID
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute channel_type
|
|
14
|
+
# Type of channel used for this delivery
|
|
15
|
+
#
|
|
16
|
+
# @return [Symbol, Notiflows::Models::Delivery::ChannelType]
|
|
17
|
+
required :channel_type, enum: -> { Notiflows::Delivery::ChannelType }
|
|
18
|
+
|
|
19
|
+
# @!attribute created_at
|
|
20
|
+
# When the delivery was created
|
|
21
|
+
#
|
|
22
|
+
# @return [Time]
|
|
23
|
+
required :created_at, Time
|
|
24
|
+
|
|
25
|
+
# @!attribute notification_id
|
|
26
|
+
# ID of the parent notification
|
|
27
|
+
#
|
|
28
|
+
# @return [String]
|
|
29
|
+
required :notification_id, String
|
|
30
|
+
|
|
31
|
+
# @!attribute notiflow_id
|
|
32
|
+
# ID of the notiflow
|
|
33
|
+
#
|
|
34
|
+
# @return [String]
|
|
35
|
+
required :notiflow_id, String
|
|
36
|
+
|
|
37
|
+
# @!attribute recipient_id
|
|
38
|
+
# Internal ID of the recipient
|
|
39
|
+
#
|
|
40
|
+
# @return [String]
|
|
41
|
+
required :recipient_id, String
|
|
42
|
+
|
|
43
|
+
# @!attribute status
|
|
44
|
+
# Delivery status:
|
|
45
|
+
#
|
|
46
|
+
# - `pending`: Queued for sending
|
|
47
|
+
# - `sent`: Successfully sent to the provider
|
|
48
|
+
# - `failed`: Delivery failed
|
|
49
|
+
#
|
|
50
|
+
# @return [Symbol, Notiflows::Models::Delivery::Status]
|
|
51
|
+
required :status, enum: -> { Notiflows::Delivery::Status }
|
|
52
|
+
|
|
53
|
+
# @!attribute updated_at
|
|
54
|
+
# When the delivery was last updated
|
|
55
|
+
#
|
|
56
|
+
# @return [Time]
|
|
57
|
+
required :updated_at, Time
|
|
58
|
+
|
|
59
|
+
# @!attribute actor_id
|
|
60
|
+
# Internal ID of the actor
|
|
61
|
+
#
|
|
62
|
+
# @return [String, nil]
|
|
63
|
+
optional :actor_id, String, nil?: true
|
|
64
|
+
|
|
65
|
+
# @!attribute archived_at
|
|
66
|
+
# When the recipient archived it
|
|
67
|
+
#
|
|
68
|
+
# @return [Time, nil]
|
|
69
|
+
optional :archived_at, Time, nil?: true
|
|
70
|
+
|
|
71
|
+
# @!attribute channel_id
|
|
72
|
+
# ID of the channel used for delivery
|
|
73
|
+
#
|
|
74
|
+
# @return [String, nil]
|
|
75
|
+
optional :channel_id, String, nil?: true
|
|
76
|
+
|
|
77
|
+
# @!attribute clicked_at
|
|
78
|
+
# When the recipient clicked/interacted
|
|
79
|
+
#
|
|
80
|
+
# @return [Time, nil]
|
|
81
|
+
optional :clicked_at, Time, nil?: true
|
|
82
|
+
|
|
83
|
+
# @!attribute data
|
|
84
|
+
# Rendered notification content (varies by channel type)
|
|
85
|
+
#
|
|
86
|
+
# @return [Object, nil]
|
|
87
|
+
optional :data, Notiflows::Internal::Type::Unknown
|
|
88
|
+
|
|
89
|
+
# @!attribute read_at
|
|
90
|
+
# When the recipient marked it as read
|
|
91
|
+
#
|
|
92
|
+
# @return [Time, nil]
|
|
93
|
+
optional :read_at, Time, nil?: true
|
|
94
|
+
|
|
95
|
+
# @!attribute seen_at
|
|
96
|
+
# When the recipient saw the notification
|
|
97
|
+
#
|
|
98
|
+
# @return [Time, nil]
|
|
99
|
+
optional :seen_at, Time, nil?: true
|
|
100
|
+
|
|
101
|
+
# @!attribute sent_at
|
|
102
|
+
# When the delivery was sent to the provider
|
|
103
|
+
#
|
|
104
|
+
# @return [Time, nil]
|
|
105
|
+
optional :sent_at, Time, nil?: true
|
|
106
|
+
|
|
107
|
+
# @!attribute topic
|
|
108
|
+
# Topic name if triggered via topic
|
|
109
|
+
#
|
|
110
|
+
# @return [String, nil]
|
|
111
|
+
optional :topic, String, nil?: true
|
|
112
|
+
|
|
113
|
+
# @!method initialize(id:, channel_type:, created_at:, notification_id:, notiflow_id:, recipient_id:, status:, updated_at:, actor_id: nil, archived_at: nil, channel_id: nil, clicked_at: nil, data: nil, read_at: nil, seen_at: nil, sent_at: nil, topic: nil)
|
|
114
|
+
# Some parameter documentations has been truncated, see
|
|
115
|
+
# {Notiflows::Models::Delivery} for more details.
|
|
116
|
+
#
|
|
117
|
+
# A single delivery attempt through a specific channel
|
|
118
|
+
#
|
|
119
|
+
# @param id [String] Delivery ID
|
|
120
|
+
#
|
|
121
|
+
# @param channel_type [Symbol, Notiflows::Models::Delivery::ChannelType] Type of channel used for this delivery
|
|
122
|
+
#
|
|
123
|
+
# @param created_at [Time] When the delivery was created
|
|
124
|
+
#
|
|
125
|
+
# @param notification_id [String] ID of the parent notification
|
|
126
|
+
#
|
|
127
|
+
# @param notiflow_id [String] ID of the notiflow
|
|
128
|
+
#
|
|
129
|
+
# @param recipient_id [String] Internal ID of the recipient
|
|
130
|
+
#
|
|
131
|
+
# @param status [Symbol, Notiflows::Models::Delivery::Status] Delivery status:
|
|
132
|
+
#
|
|
133
|
+
# @param updated_at [Time] When the delivery was last updated
|
|
134
|
+
#
|
|
135
|
+
# @param actor_id [String, nil] Internal ID of the actor
|
|
136
|
+
#
|
|
137
|
+
# @param archived_at [Time, nil] When the recipient archived it
|
|
138
|
+
#
|
|
139
|
+
# @param channel_id [String, nil] ID of the channel used for delivery
|
|
140
|
+
#
|
|
141
|
+
# @param clicked_at [Time, nil] When the recipient clicked/interacted
|
|
142
|
+
#
|
|
143
|
+
# @param data [Object] Rendered notification content (varies by channel type)
|
|
144
|
+
#
|
|
145
|
+
# @param read_at [Time, nil] When the recipient marked it as read
|
|
146
|
+
#
|
|
147
|
+
# @param seen_at [Time, nil] When the recipient saw the notification
|
|
148
|
+
#
|
|
149
|
+
# @param sent_at [Time, nil] When the delivery was sent to the provider
|
|
150
|
+
#
|
|
151
|
+
# @param topic [String, nil] Topic name if triggered via topic
|
|
152
|
+
|
|
153
|
+
# Type of channel used for this delivery
|
|
154
|
+
#
|
|
155
|
+
# @see Notiflows::Models::Delivery#channel_type
|
|
156
|
+
module ChannelType
|
|
157
|
+
extend Notiflows::Internal::Type::Enum
|
|
158
|
+
|
|
159
|
+
IN_APP = :in_app
|
|
160
|
+
EMAIL = :email
|
|
161
|
+
SMS = :sms
|
|
162
|
+
CHAT = :chat
|
|
163
|
+
WEB_PUSH = :web_push
|
|
164
|
+
MOBILE_PUSH = :mobile_push
|
|
165
|
+
|
|
166
|
+
# @!method self.values
|
|
167
|
+
# @return [Array<Symbol>]
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Delivery status:
|
|
171
|
+
#
|
|
172
|
+
# - `pending`: Queued for sending
|
|
173
|
+
# - `sent`: Successfully sent to the provider
|
|
174
|
+
# - `failed`: Delivery failed
|
|
175
|
+
#
|
|
176
|
+
# @see Notiflows::Models::Delivery#status
|
|
177
|
+
module Status
|
|
178
|
+
extend Notiflows::Internal::Type::Enum
|
|
179
|
+
|
|
180
|
+
PENDING = :pending
|
|
181
|
+
SENT = :sent
|
|
182
|
+
FAILED = :failed
|
|
183
|
+
|
|
184
|
+
# @!method self.values
|
|
185
|
+
# @return [Array<Symbol>]
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Notiflows
|
|
4
|
+
module Models
|
|
5
|
+
# @see Notiflows::Resources::Deliveries#list
|
|
6
|
+
class DeliveryListParams < Notiflows::Internal::Type::BaseModel
|
|
7
|
+
extend Notiflows::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Notiflows::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute after
|
|
11
|
+
# Cursor for fetching the next page
|
|
12
|
+
#
|
|
13
|
+
# @return [String, nil]
|
|
14
|
+
optional :after, String
|
|
15
|
+
|
|
16
|
+
# @!attribute before
|
|
17
|
+
# Cursor for fetching the previous page
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :before, String
|
|
21
|
+
|
|
22
|
+
# @!attribute channel_id
|
|
23
|
+
# Filter by channel ID (UUID)
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :channel_id, String
|
|
27
|
+
|
|
28
|
+
# @!attribute created_after
|
|
29
|
+
# Filter by created after (ISO 8601 datetime)
|
|
30
|
+
#
|
|
31
|
+
# @return [String, nil]
|
|
32
|
+
optional :created_after, String
|
|
33
|
+
|
|
34
|
+
# @!attribute created_before
|
|
35
|
+
# Filter by created before (ISO 8601 datetime)
|
|
36
|
+
#
|
|
37
|
+
# @return [String, nil]
|
|
38
|
+
optional :created_before, String
|
|
39
|
+
|
|
40
|
+
# @!attribute limit
|
|
41
|
+
# Number of items per page (default: 25, max: 1000)
|
|
42
|
+
#
|
|
43
|
+
# @return [Integer, nil]
|
|
44
|
+
optional :limit, Integer
|
|
45
|
+
|
|
46
|
+
# @!attribute status
|
|
47
|
+
# Filter by status (pending, sent, failed)
|
|
48
|
+
#
|
|
49
|
+
# @return [String, nil]
|
|
50
|
+
optional :status, String
|
|
51
|
+
|
|
52
|
+
# @!attribute topic
|
|
53
|
+
# Filter by topic name
|
|
54
|
+
#
|
|
55
|
+
# @return [String, nil]
|
|
56
|
+
optional :topic, String
|
|
57
|
+
|
|
58
|
+
# @!method initialize(after: nil, before: nil, channel_id: nil, created_after: nil, created_before: nil, limit: nil, status: nil, topic: nil, request_options: {})
|
|
59
|
+
# @param after [String] Cursor for fetching the next page
|
|
60
|
+
#
|
|
61
|
+
# @param before [String] Cursor for fetching the previous page
|
|
62
|
+
#
|
|
63
|
+
# @param channel_id [String] Filter by channel ID (UUID)
|
|
64
|
+
#
|
|
65
|
+
# @param created_after [String] Filter by created after (ISO 8601 datetime)
|
|
66
|
+
#
|
|
67
|
+
# @param created_before [String] Filter by created before (ISO 8601 datetime)
|
|
68
|
+
#
|
|
69
|
+
# @param limit [Integer] Number of items per page (default: 25, max: 1000)
|
|
70
|
+
#
|
|
71
|
+
# @param status [String] Filter by status (pending, sent, failed)
|
|
72
|
+
#
|
|
73
|
+
# @param topic [String] Filter by topic name
|
|
74
|
+
#
|
|
75
|
+
# @param request_options [Notiflows::RequestOptions, Hash{Symbol=>Object}]
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Notiflows
|
|
4
|
+
module Models
|
|
5
|
+
# @see Notiflows::Resources::Deliveries#retrieve
|
|
6
|
+
class DeliveryRetrieveParams < Notiflows::Internal::Type::BaseModel
|
|
7
|
+
extend Notiflows::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Notiflows::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [Notiflows::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Notiflows
|
|
4
|
+
module Models
|
|
5
|
+
# @see Notiflows::Resources::Notifications#retrieve
|
|
6
|
+
class Notification < Notiflows::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# Notification ID
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute created_at
|
|
14
|
+
# When the notification was created
|
|
15
|
+
#
|
|
16
|
+
# @return [Time]
|
|
17
|
+
required :created_at, Time
|
|
18
|
+
|
|
19
|
+
# @!attribute data
|
|
20
|
+
# Template variables passed when running the notiflow
|
|
21
|
+
#
|
|
22
|
+
# @return [Object]
|
|
23
|
+
required :data, Notiflows::Internal::Type::Unknown
|
|
24
|
+
|
|
25
|
+
# @!attribute notiflow_id
|
|
26
|
+
# ID of the notiflow that generated this notification
|
|
27
|
+
#
|
|
28
|
+
# @return [String]
|
|
29
|
+
required :notiflow_id, String
|
|
30
|
+
|
|
31
|
+
# @!attribute notiflow_run_id
|
|
32
|
+
# ID of the specific notiflow run
|
|
33
|
+
#
|
|
34
|
+
# @return [String]
|
|
35
|
+
required :notiflow_run_id, String
|
|
36
|
+
|
|
37
|
+
# @!attribute recipient_id
|
|
38
|
+
# Internal ID of the recipient user
|
|
39
|
+
#
|
|
40
|
+
# @return [String]
|
|
41
|
+
required :recipient_id, String
|
|
42
|
+
|
|
43
|
+
# @!attribute status
|
|
44
|
+
# Notification processing status:
|
|
45
|
+
#
|
|
46
|
+
# - `pending`: Queued for processing
|
|
47
|
+
# - `processing`: Currently being processed
|
|
48
|
+
# - `processed`: Successfully processed (deliveries created)
|
|
49
|
+
# - `failed`: Processing failed
|
|
50
|
+
#
|
|
51
|
+
# @return [Symbol, Notiflows::Models::Notification::Status]
|
|
52
|
+
required :status, enum: -> { Notiflows::Notification::Status }
|
|
53
|
+
|
|
54
|
+
# @!attribute updated_at
|
|
55
|
+
# When the notification was last updated
|
|
56
|
+
#
|
|
57
|
+
# @return [Time]
|
|
58
|
+
required :updated_at, Time
|
|
59
|
+
|
|
60
|
+
# @!attribute actor
|
|
61
|
+
# A user (recipient) in your project
|
|
62
|
+
#
|
|
63
|
+
# @return [Notiflows::Models::User, nil]
|
|
64
|
+
optional :actor, -> { Notiflows::User }, nil?: true
|
|
65
|
+
|
|
66
|
+
# @!attribute actor_id
|
|
67
|
+
# Internal ID of the actor (user who triggered the notification)
|
|
68
|
+
#
|
|
69
|
+
# @return [String, nil]
|
|
70
|
+
optional :actor_id, String, nil?: true
|
|
71
|
+
|
|
72
|
+
# @!attribute deliveries
|
|
73
|
+
# Delivery attempts for this notification (when expanded)
|
|
74
|
+
#
|
|
75
|
+
# @return [Array<Notiflows::Models::Delivery>, nil]
|
|
76
|
+
optional :deliveries, -> { Notiflows::Internal::Type::ArrayOf[Notiflows::Delivery] }
|
|
77
|
+
|
|
78
|
+
# @!attribute processed_at
|
|
79
|
+
# When the notification was processed
|
|
80
|
+
#
|
|
81
|
+
# @return [Time, nil]
|
|
82
|
+
optional :processed_at, Time, nil?: true
|
|
83
|
+
|
|
84
|
+
# @!attribute recipient
|
|
85
|
+
# A user (recipient) in your project
|
|
86
|
+
#
|
|
87
|
+
# @return [Notiflows::Models::User, nil]
|
|
88
|
+
optional :recipient, -> { Notiflows::User }
|
|
89
|
+
|
|
90
|
+
# @!attribute topic
|
|
91
|
+
# Topic name if triggered via topic
|
|
92
|
+
#
|
|
93
|
+
# @return [String, nil]
|
|
94
|
+
optional :topic, String, nil?: true
|
|
95
|
+
|
|
96
|
+
# @!method initialize(id:, created_at:, data:, notiflow_id:, notiflow_run_id:, recipient_id:, status:, updated_at:, actor: nil, actor_id: nil, deliveries: nil, processed_at: nil, recipient: nil, topic: nil)
|
|
97
|
+
# Some parameter documentations has been truncated, see
|
|
98
|
+
# {Notiflows::Models::Notification} for more details.
|
|
99
|
+
#
|
|
100
|
+
# A notification sent to a recipient through a notiflow run
|
|
101
|
+
#
|
|
102
|
+
# @param id [String] Notification ID
|
|
103
|
+
#
|
|
104
|
+
# @param created_at [Time] When the notification was created
|
|
105
|
+
#
|
|
106
|
+
# @param data [Object] Template variables passed when running the notiflow
|
|
107
|
+
#
|
|
108
|
+
# @param notiflow_id [String] ID of the notiflow that generated this notification
|
|
109
|
+
#
|
|
110
|
+
# @param notiflow_run_id [String] ID of the specific notiflow run
|
|
111
|
+
#
|
|
112
|
+
# @param recipient_id [String] Internal ID of the recipient user
|
|
113
|
+
#
|
|
114
|
+
# @param status [Symbol, Notiflows::Models::Notification::Status] Notification processing status:
|
|
115
|
+
#
|
|
116
|
+
# @param updated_at [Time] When the notification was last updated
|
|
117
|
+
#
|
|
118
|
+
# @param actor [Notiflows::Models::User, nil] A user (recipient) in your project
|
|
119
|
+
#
|
|
120
|
+
# @param actor_id [String, nil] Internal ID of the actor (user who triggered the notification)
|
|
121
|
+
#
|
|
122
|
+
# @param deliveries [Array<Notiflows::Models::Delivery>] Delivery attempts for this notification (when expanded)
|
|
123
|
+
#
|
|
124
|
+
# @param processed_at [Time, nil] When the notification was processed
|
|
125
|
+
#
|
|
126
|
+
# @param recipient [Notiflows::Models::User] A user (recipient) in your project
|
|
127
|
+
#
|
|
128
|
+
# @param topic [String, nil] Topic name if triggered via topic
|
|
129
|
+
|
|
130
|
+
# Notification processing status:
|
|
131
|
+
#
|
|
132
|
+
# - `pending`: Queued for processing
|
|
133
|
+
# - `processing`: Currently being processed
|
|
134
|
+
# - `processed`: Successfully processed (deliveries created)
|
|
135
|
+
# - `failed`: Processing failed
|
|
136
|
+
#
|
|
137
|
+
# @see Notiflows::Models::Notification#status
|
|
138
|
+
module Status
|
|
139
|
+
extend Notiflows::Internal::Type::Enum
|
|
140
|
+
|
|
141
|
+
PENDING = :pending
|
|
142
|
+
PROCESSING = :processing
|
|
143
|
+
PROCESSED = :processed
|
|
144
|
+
FAILED = :failed
|
|
145
|
+
|
|
146
|
+
# @!method self.values
|
|
147
|
+
# @return [Array<Symbol>]
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Notiflows
|
|
4
|
+
module Models
|
|
5
|
+
# @see Notiflows::Resources::Notifications#list_deliveries
|
|
6
|
+
class NotificationListDeliveriesParams < Notiflows::Internal::Type::BaseModel
|
|
7
|
+
extend Notiflows::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Notiflows::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute after
|
|
11
|
+
# Cursor for fetching the next page
|
|
12
|
+
#
|
|
13
|
+
# @return [String, nil]
|
|
14
|
+
optional :after, String
|
|
15
|
+
|
|
16
|
+
# @!attribute before
|
|
17
|
+
# Cursor for fetching the previous page
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :before, String
|
|
21
|
+
|
|
22
|
+
# @!attribute channel_id
|
|
23
|
+
# Filter by channel ID (UUID)
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :channel_id, String
|
|
27
|
+
|
|
28
|
+
# @!attribute created_after
|
|
29
|
+
# Filter by created after (ISO 8601 datetime)
|
|
30
|
+
#
|
|
31
|
+
# @return [String, nil]
|
|
32
|
+
optional :created_after, String
|
|
33
|
+
|
|
34
|
+
# @!attribute created_before
|
|
35
|
+
# Filter by created before (ISO 8601 datetime)
|
|
36
|
+
#
|
|
37
|
+
# @return [String, nil]
|
|
38
|
+
optional :created_before, String
|
|
39
|
+
|
|
40
|
+
# @!attribute limit
|
|
41
|
+
# Number of items per page (default: 25, max: 1000)
|
|
42
|
+
#
|
|
43
|
+
# @return [Integer, nil]
|
|
44
|
+
optional :limit, Integer
|
|
45
|
+
|
|
46
|
+
# @!attribute status
|
|
47
|
+
# Filter by status (pending, sent, failed)
|
|
48
|
+
#
|
|
49
|
+
# @return [String, nil]
|
|
50
|
+
optional :status, String
|
|
51
|
+
|
|
52
|
+
# @!attribute topic
|
|
53
|
+
# Filter by topic name
|
|
54
|
+
#
|
|
55
|
+
# @return [String, nil]
|
|
56
|
+
optional :topic, String
|
|
57
|
+
|
|
58
|
+
# @!method initialize(after: nil, before: nil, channel_id: nil, created_after: nil, created_before: nil, limit: nil, status: nil, topic: nil, request_options: {})
|
|
59
|
+
# @param after [String] Cursor for fetching the next page
|
|
60
|
+
#
|
|
61
|
+
# @param before [String] Cursor for fetching the previous page
|
|
62
|
+
#
|
|
63
|
+
# @param channel_id [String] Filter by channel ID (UUID)
|
|
64
|
+
#
|
|
65
|
+
# @param created_after [String] Filter by created after (ISO 8601 datetime)
|
|
66
|
+
#
|
|
67
|
+
# @param created_before [String] Filter by created before (ISO 8601 datetime)
|
|
68
|
+
#
|
|
69
|
+
# @param limit [Integer] Number of items per page (default: 25, max: 1000)
|
|
70
|
+
#
|
|
71
|
+
# @param status [String] Filter by status (pending, sent, failed)
|
|
72
|
+
#
|
|
73
|
+
# @param topic [String] Filter by topic name
|
|
74
|
+
#
|
|
75
|
+
# @param request_options [Notiflows::RequestOptions, Hash{Symbol=>Object}]
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Notiflows
|
|
4
|
+
module Models
|
|
5
|
+
# @see Notiflows::Resources::Notifications#list
|
|
6
|
+
class NotificationListParams < Notiflows::Internal::Type::BaseModel
|
|
7
|
+
extend Notiflows::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Notiflows::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute after
|
|
11
|
+
# Cursor for fetching the next page
|
|
12
|
+
#
|
|
13
|
+
# @return [String, nil]
|
|
14
|
+
optional :after, String
|
|
15
|
+
|
|
16
|
+
# @!attribute before
|
|
17
|
+
# Cursor for fetching the previous page
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :before, String
|
|
21
|
+
|
|
22
|
+
# @!attribute created_after
|
|
23
|
+
# Filter by created after (ISO 8601 datetime)
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :created_after, String
|
|
27
|
+
|
|
28
|
+
# @!attribute created_before
|
|
29
|
+
# Filter by created before (ISO 8601 datetime)
|
|
30
|
+
#
|
|
31
|
+
# @return [String, nil]
|
|
32
|
+
optional :created_before, String
|
|
33
|
+
|
|
34
|
+
# @!attribute limit
|
|
35
|
+
# Number of items per page (default: 25, max: 1000)
|
|
36
|
+
#
|
|
37
|
+
# @return [Integer, nil]
|
|
38
|
+
optional :limit, Integer
|
|
39
|
+
|
|
40
|
+
# @!attribute status
|
|
41
|
+
# Filter by status
|
|
42
|
+
#
|
|
43
|
+
# @return [String, nil]
|
|
44
|
+
optional :status, String
|
|
45
|
+
|
|
46
|
+
# @!attribute topic
|
|
47
|
+
# Filter by topic
|
|
48
|
+
#
|
|
49
|
+
# @return [String, nil]
|
|
50
|
+
optional :topic, String
|
|
51
|
+
|
|
52
|
+
# @!method initialize(after: nil, before: nil, created_after: nil, created_before: nil, limit: nil, status: nil, topic: nil, request_options: {})
|
|
53
|
+
# @param after [String] Cursor for fetching the next page
|
|
54
|
+
#
|
|
55
|
+
# @param before [String] Cursor for fetching the previous page
|
|
56
|
+
#
|
|
57
|
+
# @param created_after [String] Filter by created after (ISO 8601 datetime)
|
|
58
|
+
#
|
|
59
|
+
# @param created_before [String] Filter by created before (ISO 8601 datetime)
|
|
60
|
+
#
|
|
61
|
+
# @param limit [Integer] Number of items per page (default: 25, max: 1000)
|
|
62
|
+
#
|
|
63
|
+
# @param status [String] Filter by status
|
|
64
|
+
#
|
|
65
|
+
# @param topic [String] Filter by topic
|
|
66
|
+
#
|
|
67
|
+
# @param request_options [Notiflows::RequestOptions, Hash{Symbol=>Object}]
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Notiflows
|
|
4
|
+
module Models
|
|
5
|
+
# @see Notiflows::Resources::Notifications#retrieve
|
|
6
|
+
class NotificationRetrieveParams < Notiflows::Internal::Type::BaseModel
|
|
7
|
+
extend Notiflows::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Notiflows::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [Notiflows::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|