trycourier 4.4.0 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/README.md +9 -9
- data/lib/trycourier/internal/transport/pooled_net_requester.rb +12 -10
- data/lib/trycourier/internal/type/base_model.rb +4 -3
- data/lib/trycourier/internal/type/union.rb +7 -9
- data/lib/trycourier/internal/util.rb +7 -2
- data/lib/trycourier/models/airship_profile.rb +21 -0
- data/lib/trycourier/models/airship_profile_audience.rb +15 -0
- data/lib/trycourier/models/audience.rb +3 -3
- data/lib/trycourier/models/audience_filter.rb +52 -0
- data/lib/trycourier/models/audience_recipient.rb +36 -0
- data/lib/trycourier/models/audience_update_params.rb +3 -3
- data/lib/trycourier/models/automation_list_params.rb +47 -0
- data/lib/trycourier/models/automation_template.rb +61 -0
- data/lib/trycourier/models/automation_template_list_response.rb +24 -0
- data/lib/trycourier/models/device_type.rb +7 -0
- data/lib/trycourier/models/discord.rb +16 -0
- data/lib/trycourier/models/expo.rb +16 -0
- data/lib/trycourier/models/filter.rb +8 -51
- data/lib/trycourier/models/filter_config.rb +8 -51
- data/lib/trycourier/models/intercom.rb +21 -0
- data/lib/trycourier/models/intercom_recipient.rb +15 -0
- data/lib/trycourier/models/list_filter.rb +52 -0
- data/lib/trycourier/models/list_pattern_recipient.rb +23 -0
- data/lib/trycourier/models/list_recipient.rb +29 -0
- data/lib/trycourier/models/ms_teams.rb +22 -0
- data/lib/trycourier/models/ms_teams_base_properties.rb +21 -0
- data/lib/trycourier/models/ms_teams_recipient.rb +17 -0
- data/lib/trycourier/models/multiple_tokens.rb +15 -0
- data/lib/trycourier/models/nested_filter_config.rb +49 -0
- data/lib/trycourier/models/pagerduty.rb +33 -0
- data/lib/trycourier/models/pagerduty_recipient.rb +17 -0
- data/lib/trycourier/models/send_direct_message.rb +15 -0
- data/lib/trycourier/models/send_message_params.rb +24 -7
- data/lib/trycourier/models/send_to_channel.rb +15 -0
- data/lib/trycourier/models/send_to_ms_teams_channel_id.rb +27 -0
- data/lib/trycourier/models/send_to_ms_teams_channel_name.rb +33 -0
- data/lib/trycourier/models/send_to_ms_teams_conversation_id.rb +27 -0
- data/lib/trycourier/models/send_to_ms_teams_email.rb +27 -0
- data/lib/trycourier/models/send_to_ms_teams_user_id.rb +27 -0
- data/lib/trycourier/models/send_to_slack_channel.rb +21 -0
- data/lib/trycourier/models/send_to_slack_email.rb +21 -0
- data/lib/trycourier/models/send_to_slack_user_id.rb +21 -0
- data/lib/trycourier/models/single_filter_config.rb +62 -0
- data/lib/trycourier/models/slack.rb +18 -0
- data/lib/trycourier/models/slack_base_properties.rb +15 -0
- data/lib/trycourier/models/slack_recipient.rb +17 -0
- data/lib/trycourier/models/token.rb +15 -0
- data/lib/trycourier/models/user_profile.rb +274 -0
- data/lib/trycourier/models/user_profile_firebase_token.rb +19 -0
- data/lib/trycourier/models/webhook_auth_mode.rb +16 -0
- data/lib/trycourier/models/webhook_authentication.rb +40 -0
- data/lib/trycourier/models/webhook_method.rb +15 -0
- data/lib/trycourier/models/webhook_profile.rb +53 -0
- data/lib/trycourier/models/webhook_profile_type.rb +15 -0
- data/lib/trycourier/models/webhook_recipient.rb +17 -0
- data/lib/trycourier/models.rb +90 -2
- data/lib/trycourier/resources/audiences.rb +1 -1
- data/lib/trycourier/resources/automations.rb +27 -0
- data/lib/trycourier/version.rb +1 -1
- data/lib/trycourier.rb +45 -1
- data/rbi/trycourier/models/airship_profile.rbi +41 -0
- data/rbi/trycourier/models/airship_profile_audience.rbi +26 -0
- data/rbi/trycourier/models/audience.rbi +8 -7
- data/rbi/trycourier/models/audience_filter.rbi +88 -0
- data/rbi/trycourier/models/audience_recipient.rbi +52 -0
- data/rbi/trycourier/models/audience_update_params.rbi +25 -7
- data/rbi/trycourier/models/automation_list_params.rbi +95 -0
- data/rbi/trycourier/models/automation_template.rbi +102 -0
- data/rbi/trycourier/models/automation_template_list_response.rbi +54 -0
- data/rbi/trycourier/models/device_type.rbi +7 -0
- data/rbi/trycourier/models/discord.rbi +18 -0
- data/rbi/trycourier/models/expo.rbi +16 -0
- data/rbi/trycourier/models/filter.rbi +8 -78
- data/rbi/trycourier/models/filter_config.rbi +8 -83
- data/rbi/trycourier/models/intercom.rbi +35 -0
- data/rbi/trycourier/models/intercom_recipient.rbi +23 -0
- data/rbi/trycourier/models/list_filter.rbi +86 -0
- data/rbi/trycourier/models/list_pattern_recipient.rbi +39 -0
- data/rbi/trycourier/models/list_recipient.rbi +44 -0
- data/rbi/trycourier/models/ms_teams.rbi +24 -0
- data/rbi/trycourier/models/ms_teams_base_properties.rbi +31 -0
- data/rbi/trycourier/models/ms_teams_recipient.rbi +58 -0
- data/rbi/trycourier/models/multiple_tokens.rbi +27 -0
- data/rbi/trycourier/models/nested_filter_config.rbi +104 -0
- data/rbi/trycourier/models/pagerduty.rbi +53 -0
- data/rbi/trycourier/models/pagerduty_recipient.rbi +31 -0
- data/rbi/trycourier/models/send_direct_message.rbi +23 -0
- data/rbi/trycourier/models/send_message_params.rbi +34 -10
- data/rbi/trycourier/models/send_to_channel.rbi +23 -0
- data/rbi/trycourier/models/send_to_ms_teams_channel_id.rbi +42 -0
- data/rbi/trycourier/models/send_to_ms_teams_channel_name.rbi +51 -0
- data/rbi/trycourier/models/send_to_ms_teams_conversation_id.rbi +42 -0
- data/rbi/trycourier/models/send_to_ms_teams_email.rbi +37 -0
- data/rbi/trycourier/models/send_to_ms_teams_user_id.rbi +37 -0
- data/rbi/trycourier/models/send_to_slack_channel.rbi +28 -0
- data/rbi/trycourier/models/send_to_slack_email.rbi +28 -0
- data/rbi/trycourier/models/send_to_slack_user_id.rbi +28 -0
- data/rbi/trycourier/models/single_filter_config.rbi +116 -0
- data/rbi/trycourier/models/slack.rbi +22 -0
- data/rbi/trycourier/models/slack_base_properties.rbi +23 -0
- data/rbi/trycourier/models/slack_recipient.rbi +52 -0
- data/rbi/trycourier/models/token.rbi +21 -0
- data/rbi/trycourier/models/user_profile.rbi +377 -0
- data/rbi/trycourier/models/user_profile_firebase_token.rbi +25 -0
- data/rbi/trycourier/models/webhook_auth_mode.rbi +22 -0
- data/rbi/trycourier/models/webhook_authentication.rbi +64 -0
- data/rbi/trycourier/models/webhook_method.rbi +21 -0
- data/rbi/trycourier/models/webhook_profile.rbi +80 -0
- data/rbi/trycourier/models/webhook_profile_type.rbi +22 -0
- data/rbi/trycourier/models/webhook_recipient.rbi +31 -0
- data/rbi/trycourier/models.rbi +91 -2
- data/rbi/trycourier/resources/audiences.rbi +7 -1
- data/rbi/trycourier/resources/automations.rbi +19 -0
- data/sig/trycourier/models/airship_profile.rbs +25 -0
- data/sig/trycourier/models/airship_profile_audience.rbs +13 -0
- data/sig/trycourier/models/audience.rbs +4 -4
- data/sig/trycourier/models/audience_filter.rbs +50 -0
- data/sig/trycourier/models/audience_recipient.rbs +30 -0
- data/sig/trycourier/models/audience_update_params.rbs +8 -4
- data/sig/trycourier/models/automation_list_params.rbs +48 -0
- data/sig/trycourier/models/automation_template.rbs +55 -0
- data/sig/trycourier/models/automation_template_list_response.rbs +28 -0
- data/sig/trycourier/models/device_type.rbs +5 -0
- data/sig/trycourier/models/discord.rbs +11 -0
- data/sig/trycourier/models/expo.rbs +11 -0
- data/sig/trycourier/models/filter.rbs +4 -61
- data/sig/trycourier/models/filter_config.rbs +4 -61
- data/sig/trycourier/models/intercom.rbs +15 -0
- data/sig/trycourier/models/intercom_recipient.rbs +13 -0
- data/sig/trycourier/models/list_filter.rbs +50 -0
- data/sig/trycourier/models/list_pattern_recipient.rbs +19 -0
- data/sig/trycourier/models/list_recipient.rbs +30 -0
- data/sig/trycourier/models/ms_teams.rbs +16 -0
- data/sig/trycourier/models/ms_teams_base_properties.rbs +15 -0
- data/sig/trycourier/models/ms_teams_recipient.rbs +13 -0
- data/sig/trycourier/models/multiple_tokens.rbs +13 -0
- data/sig/trycourier/models/nested_filter_config.rbs +64 -0
- data/sig/trycourier/models/pagerduty.rbs +35 -0
- data/sig/trycourier/models/pagerduty_recipient.rbs +13 -0
- data/sig/trycourier/models/send_direct_message.rbs +13 -0
- data/sig/trycourier/models/send_message_params.rbs +9 -3
- data/sig/trycourier/models/send_to_channel.rbs +13 -0
- data/sig/trycourier/models/send_to_ms_teams_channel_id.rbs +26 -0
- data/sig/trycourier/models/send_to_ms_teams_channel_name.rbs +35 -0
- data/sig/trycourier/models/send_to_ms_teams_conversation_id.rbs +26 -0
- data/sig/trycourier/models/send_to_ms_teams_email.rbs +22 -0
- data/sig/trycourier/models/send_to_ms_teams_user_id.rbs +26 -0
- data/sig/trycourier/models/send_to_slack_channel.rbs +15 -0
- data/sig/trycourier/models/send_to_slack_email.rbs +15 -0
- data/sig/trycourier/models/send_to_slack_user_id.rbs +15 -0
- data/sig/trycourier/models/single_filter_config.rbs +69 -0
- data/sig/trycourier/models/slack.rbs +14 -0
- data/sig/trycourier/models/slack_base_properties.rbs +13 -0
- data/sig/trycourier/models/slack_recipient.rbs +13 -0
- data/sig/trycourier/models/token.rbs +13 -0
- data/sig/trycourier/models/user_profile.rbs +212 -0
- data/sig/trycourier/models/user_profile_firebase_token.rbs +13 -0
- data/sig/trycourier/models/webhook_auth_mode.rbs +15 -0
- data/sig/trycourier/models/webhook_authentication.rbs +35 -0
- data/sig/trycourier/models/webhook_method.rbs +14 -0
- data/sig/trycourier/models/webhook_profile.rbs +40 -0
- data/sig/trycourier/models/webhook_profile_type.rbs +14 -0
- data/sig/trycourier/models/webhook_recipient.rbs +13 -0
- data/sig/trycourier/models.rbs +92 -4
- data/sig/trycourier/resources/audiences.rbs +1 -1
- data/sig/trycourier/resources/automations.rbs +6 -0
- metadata +137 -5
- data/lib/trycourier/models/recipient.rb +0 -113
- data/rbi/trycourier/models/recipient.rbi +0 -161
- data/sig/trycourier/models/recipient.rbs +0 -92
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Trycourier
|
|
4
|
-
module Models
|
|
5
|
-
class Recipient < Trycourier::Internal::Type::BaseModel
|
|
6
|
-
OrHash =
|
|
7
|
-
T.type_alias do
|
|
8
|
-
T.any(Trycourier::Recipient, Trycourier::Internal::AnyHash)
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
# Deprecated - Use `tenant_id` instead.
|
|
12
|
-
sig { returns(T.nilable(String)) }
|
|
13
|
-
attr_accessor :account_id
|
|
14
|
-
|
|
15
|
-
# Context such as tenant_id to send the notification with.
|
|
16
|
-
sig { returns(T.nilable(Trycourier::MessageContext)) }
|
|
17
|
-
attr_reader :context
|
|
18
|
-
|
|
19
|
-
sig do
|
|
20
|
-
params(context: T.nilable(Trycourier::MessageContext::OrHash)).void
|
|
21
|
-
end
|
|
22
|
-
attr_writer :context
|
|
23
|
-
|
|
24
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
25
|
-
attr_accessor :data
|
|
26
|
-
|
|
27
|
-
# The user's email address.
|
|
28
|
-
sig { returns(T.nilable(String)) }
|
|
29
|
-
attr_accessor :email
|
|
30
|
-
|
|
31
|
-
# The id of the list to send the message to.
|
|
32
|
-
sig { returns(T.nilable(String)) }
|
|
33
|
-
attr_accessor :list_id
|
|
34
|
-
|
|
35
|
-
# The user's preferred ISO 639-1 language code.
|
|
36
|
-
sig { returns(T.nilable(String)) }
|
|
37
|
-
attr_accessor :locale
|
|
38
|
-
|
|
39
|
-
# The user's phone number.
|
|
40
|
-
sig { returns(T.nilable(String)) }
|
|
41
|
-
attr_accessor :phone_number
|
|
42
|
-
|
|
43
|
-
sig { returns(T.nilable(Trycourier::Recipient::Preferences)) }
|
|
44
|
-
attr_reader :preferences
|
|
45
|
-
|
|
46
|
-
sig do
|
|
47
|
-
params(
|
|
48
|
-
preferences: T.nilable(Trycourier::Recipient::Preferences::OrHash)
|
|
49
|
-
).void
|
|
50
|
-
end
|
|
51
|
-
attr_writer :preferences
|
|
52
|
-
|
|
53
|
-
# The id of the tenant the user is associated with.
|
|
54
|
-
sig { returns(T.nilable(String)) }
|
|
55
|
-
attr_accessor :tenant_id
|
|
56
|
-
|
|
57
|
-
# The user's unique identifier. Typically, this will match the user id of a user
|
|
58
|
-
# in your system.
|
|
59
|
-
sig { returns(T.nilable(String)) }
|
|
60
|
-
attr_accessor :user_id
|
|
61
|
-
|
|
62
|
-
sig do
|
|
63
|
-
params(
|
|
64
|
-
account_id: T.nilable(String),
|
|
65
|
-
context: T.nilable(Trycourier::MessageContext::OrHash),
|
|
66
|
-
data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
67
|
-
email: T.nilable(String),
|
|
68
|
-
list_id: T.nilable(String),
|
|
69
|
-
locale: T.nilable(String),
|
|
70
|
-
phone_number: T.nilable(String),
|
|
71
|
-
preferences: T.nilable(Trycourier::Recipient::Preferences::OrHash),
|
|
72
|
-
tenant_id: T.nilable(String),
|
|
73
|
-
user_id: T.nilable(String)
|
|
74
|
-
).returns(T.attached_class)
|
|
75
|
-
end
|
|
76
|
-
def self.new(
|
|
77
|
-
# Deprecated - Use `tenant_id` instead.
|
|
78
|
-
account_id: nil,
|
|
79
|
-
# Context such as tenant_id to send the notification with.
|
|
80
|
-
context: nil,
|
|
81
|
-
data: nil,
|
|
82
|
-
# The user's email address.
|
|
83
|
-
email: nil,
|
|
84
|
-
# The id of the list to send the message to.
|
|
85
|
-
list_id: nil,
|
|
86
|
-
# The user's preferred ISO 639-1 language code.
|
|
87
|
-
locale: nil,
|
|
88
|
-
# The user's phone number.
|
|
89
|
-
phone_number: nil,
|
|
90
|
-
preferences: nil,
|
|
91
|
-
# The id of the tenant the user is associated with.
|
|
92
|
-
tenant_id: nil,
|
|
93
|
-
# The user's unique identifier. Typically, this will match the user id of a user
|
|
94
|
-
# in your system.
|
|
95
|
-
user_id: nil
|
|
96
|
-
)
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
sig do
|
|
100
|
-
override.returns(
|
|
101
|
-
{
|
|
102
|
-
account_id: T.nilable(String),
|
|
103
|
-
context: T.nilable(Trycourier::MessageContext),
|
|
104
|
-
data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
105
|
-
email: T.nilable(String),
|
|
106
|
-
list_id: T.nilable(String),
|
|
107
|
-
locale: T.nilable(String),
|
|
108
|
-
phone_number: T.nilable(String),
|
|
109
|
-
preferences: T.nilable(Trycourier::Recipient::Preferences),
|
|
110
|
-
tenant_id: T.nilable(String),
|
|
111
|
-
user_id: T.nilable(String)
|
|
112
|
-
}
|
|
113
|
-
)
|
|
114
|
-
end
|
|
115
|
-
def to_hash
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
class Preferences < Trycourier::Internal::Type::BaseModel
|
|
119
|
-
OrHash =
|
|
120
|
-
T.type_alias do
|
|
121
|
-
T.any(
|
|
122
|
-
Trycourier::Recipient::Preferences,
|
|
123
|
-
Trycourier::Internal::AnyHash
|
|
124
|
-
)
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
sig { returns(T::Hash[Symbol, Trycourier::Preference]) }
|
|
128
|
-
attr_accessor :notifications
|
|
129
|
-
|
|
130
|
-
sig { returns(T.nilable(T::Hash[Symbol, Trycourier::Preference])) }
|
|
131
|
-
attr_accessor :categories
|
|
132
|
-
|
|
133
|
-
sig { returns(T.nilable(String)) }
|
|
134
|
-
attr_accessor :template_id
|
|
135
|
-
|
|
136
|
-
sig do
|
|
137
|
-
params(
|
|
138
|
-
notifications: T::Hash[Symbol, Trycourier::Preference::OrHash],
|
|
139
|
-
categories:
|
|
140
|
-
T.nilable(T::Hash[Symbol, Trycourier::Preference::OrHash]),
|
|
141
|
-
template_id: T.nilable(String)
|
|
142
|
-
).returns(T.attached_class)
|
|
143
|
-
end
|
|
144
|
-
def self.new(notifications:, categories: nil, template_id: nil)
|
|
145
|
-
end
|
|
146
|
-
|
|
147
|
-
sig do
|
|
148
|
-
override.returns(
|
|
149
|
-
{
|
|
150
|
-
notifications: T::Hash[Symbol, Trycourier::Preference],
|
|
151
|
-
categories: T.nilable(T::Hash[Symbol, Trycourier::Preference]),
|
|
152
|
-
template_id: T.nilable(String)
|
|
153
|
-
}
|
|
154
|
-
)
|
|
155
|
-
end
|
|
156
|
-
def to_hash
|
|
157
|
-
end
|
|
158
|
-
end
|
|
159
|
-
end
|
|
160
|
-
end
|
|
161
|
-
end
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
module Trycourier
|
|
2
|
-
module Models
|
|
3
|
-
type recipient =
|
|
4
|
-
{
|
|
5
|
-
account_id: String?,
|
|
6
|
-
context: Trycourier::MessageContext?,
|
|
7
|
-
data: ::Hash[Symbol, top]?,
|
|
8
|
-
email: String?,
|
|
9
|
-
list_id: String?,
|
|
10
|
-
locale: String?,
|
|
11
|
-
phone_number: String?,
|
|
12
|
-
preferences: Trycourier::Recipient::Preferences?,
|
|
13
|
-
tenant_id: String?,
|
|
14
|
-
user_id: String?
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
class Recipient < Trycourier::Internal::Type::BaseModel
|
|
18
|
-
attr_accessor account_id: String?
|
|
19
|
-
|
|
20
|
-
attr_accessor context: Trycourier::MessageContext?
|
|
21
|
-
|
|
22
|
-
attr_accessor data: ::Hash[Symbol, top]?
|
|
23
|
-
|
|
24
|
-
attr_accessor email: String?
|
|
25
|
-
|
|
26
|
-
attr_accessor list_id: String?
|
|
27
|
-
|
|
28
|
-
attr_accessor locale: String?
|
|
29
|
-
|
|
30
|
-
attr_accessor phone_number: String?
|
|
31
|
-
|
|
32
|
-
attr_accessor preferences: Trycourier::Recipient::Preferences?
|
|
33
|
-
|
|
34
|
-
attr_accessor tenant_id: String?
|
|
35
|
-
|
|
36
|
-
attr_accessor user_id: String?
|
|
37
|
-
|
|
38
|
-
def initialize: (
|
|
39
|
-
?account_id: String?,
|
|
40
|
-
?context: Trycourier::MessageContext?,
|
|
41
|
-
?data: ::Hash[Symbol, top]?,
|
|
42
|
-
?email: String?,
|
|
43
|
-
?list_id: String?,
|
|
44
|
-
?locale: String?,
|
|
45
|
-
?phone_number: String?,
|
|
46
|
-
?preferences: Trycourier::Recipient::Preferences?,
|
|
47
|
-
?tenant_id: String?,
|
|
48
|
-
?user_id: String?
|
|
49
|
-
) -> void
|
|
50
|
-
|
|
51
|
-
def to_hash: -> {
|
|
52
|
-
account_id: String?,
|
|
53
|
-
context: Trycourier::MessageContext?,
|
|
54
|
-
data: ::Hash[Symbol, top]?,
|
|
55
|
-
email: String?,
|
|
56
|
-
list_id: String?,
|
|
57
|
-
locale: String?,
|
|
58
|
-
phone_number: String?,
|
|
59
|
-
preferences: Trycourier::Recipient::Preferences?,
|
|
60
|
-
tenant_id: String?,
|
|
61
|
-
user_id: String?
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
type preferences =
|
|
65
|
-
{
|
|
66
|
-
notifications: ::Hash[Symbol, Trycourier::Preference],
|
|
67
|
-
categories: ::Hash[Symbol, Trycourier::Preference]?,
|
|
68
|
-
template_id: String?
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
class Preferences < Trycourier::Internal::Type::BaseModel
|
|
72
|
-
attr_accessor notifications: ::Hash[Symbol, Trycourier::Preference]
|
|
73
|
-
|
|
74
|
-
attr_accessor categories: ::Hash[Symbol, Trycourier::Preference]?
|
|
75
|
-
|
|
76
|
-
attr_accessor template_id: String?
|
|
77
|
-
|
|
78
|
-
def initialize: (
|
|
79
|
-
notifications: ::Hash[Symbol, Trycourier::Preference],
|
|
80
|
-
?categories: ::Hash[Symbol, Trycourier::Preference]?,
|
|
81
|
-
?template_id: String?
|
|
82
|
-
) -> void
|
|
83
|
-
|
|
84
|
-
def to_hash: -> {
|
|
85
|
-
notifications: ::Hash[Symbol, Trycourier::Preference],
|
|
86
|
-
categories: ::Hash[Symbol, Trycourier::Preference]?,
|
|
87
|
-
template_id: String?
|
|
88
|
-
}
|
|
89
|
-
end
|
|
90
|
-
end
|
|
91
|
-
end
|
|
92
|
-
end
|