trycourier 4.3.0 → 4.5.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 +23 -0
- data/README.md +1 -1
- 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/bulk_create_job_params.rb +12 -3
- data/lib/trycourier/models/bulk_retrieve_job_response.rb +15 -3
- 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/inbound_bulk_message.rb +79 -113
- data/lib/trycourier/models/inbound_bulk_message_user.rb +21 -6
- 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 +38 -8
- 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 +84 -2
- data/lib/trycourier/resources/audiences.rb +1 -1
- data/lib/trycourier/resources/bulk.rb +17 -3
- data/lib/trycourier/version.rb +1 -1
- data/lib/trycourier.rb +42 -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/bulk_create_job_params.rbi +21 -20
- data/rbi/trycourier/models/bulk_retrieve_job_response.rbi +24 -9
- 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/inbound_bulk_message.rbi +97 -153
- data/rbi/trycourier/models/inbound_bulk_message_user.rbi +20 -7
- 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 +50 -11
- 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 +84 -2
- data/rbi/trycourier/resources/audiences.rbi +7 -1
- data/rbi/trycourier/resources/bulk.rbi +22 -8
- 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/bulk_create_job_params.rbs +4 -4
- data/sig/trycourier/models/bulk_retrieve_job_response.rbs +4 -4
- 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/inbound_bulk_message.rbs +52 -99
- data/sig/trycourier/models/inbound_bulk_message_user.rbs +4 -6
- 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 +22 -6
- 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 +87 -5
- data/sig/trycourier/resources/audiences.rbs +1 -1
- data/sig/trycourier/resources/bulk.rbs +1 -1
- metadata +128 -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
|
@@ -2,124 +2,90 @@
|
|
|
2
2
|
|
|
3
3
|
module Trycourier
|
|
4
4
|
module Models
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
# @return [Hash{Symbol=>Hash{Symbol=>Object}}, nil]
|
|
81
|
-
optional :locale,
|
|
82
|
-
Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown]],
|
|
83
|
-
nil?: true
|
|
84
|
-
|
|
85
|
-
# @!attribute override
|
|
86
|
-
#
|
|
87
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
88
|
-
optional :override,
|
|
89
|
-
Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown],
|
|
90
|
-
nil?: true
|
|
91
|
-
|
|
92
|
-
# @!method initialize(content:, brand: nil, data: nil, event: nil, locale: nil, override: nil)
|
|
93
|
-
# @param content [Trycourier::Models::ElementalContentSugar, Trycourier::Models::ElementalContent] Syntactic sugar to provide a fast shorthand for Courier Elemental Blocks.
|
|
94
|
-
#
|
|
95
|
-
# @param brand [String, nil]
|
|
96
|
-
#
|
|
97
|
-
# @param data [Hash{Symbol=>Object}, nil]
|
|
98
|
-
#
|
|
99
|
-
# @param event [String, nil]
|
|
100
|
-
#
|
|
101
|
-
# @param locale [Hash{Symbol=>Hash{Symbol=>Object}}, nil]
|
|
102
|
-
#
|
|
103
|
-
# @param override [Hash{Symbol=>Object}, nil]
|
|
5
|
+
class InboundBulkMessage < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute event
|
|
7
|
+
# Event ID or Notification ID (required). Can be either a Notification ID (e.g.,
|
|
8
|
+
# "FRH3QXM9E34W4RKP7MRC8NZ1T8V8") or a custom Event ID (e.g., "welcome-email")
|
|
9
|
+
# mapped to a notification.
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
required :event, String
|
|
13
|
+
|
|
14
|
+
# @!attribute brand
|
|
15
|
+
#
|
|
16
|
+
# @return [String, nil]
|
|
17
|
+
optional :brand, String, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!attribute content
|
|
20
|
+
# Elemental content (optional, for V2 format). When provided, this will be used
|
|
21
|
+
# instead of the notification associated with the `event` field.
|
|
22
|
+
#
|
|
23
|
+
# @return [Trycourier::Models::ElementalContentSugar, Trycourier::Models::ElementalContent, nil]
|
|
24
|
+
optional :content, union: -> { Trycourier::InboundBulkMessage::Content }, nil?: true
|
|
25
|
+
|
|
26
|
+
# @!attribute data
|
|
27
|
+
#
|
|
28
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
29
|
+
optional :data, Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown], nil?: true
|
|
30
|
+
|
|
31
|
+
# @!attribute locale
|
|
32
|
+
#
|
|
33
|
+
# @return [Hash{Symbol=>Hash{Symbol=>Object}}, nil]
|
|
34
|
+
optional :locale,
|
|
35
|
+
Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown]],
|
|
36
|
+
nil?: true
|
|
37
|
+
|
|
38
|
+
# @!attribute override
|
|
39
|
+
#
|
|
40
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
41
|
+
optional :override, Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown], nil?: true
|
|
42
|
+
|
|
43
|
+
# @!attribute template
|
|
44
|
+
# Notification ID or template ID (optional, for V2 format). When provided, this
|
|
45
|
+
# will be used instead of the notification associated with the `event` field.
|
|
46
|
+
#
|
|
47
|
+
# @return [String, nil]
|
|
48
|
+
optional :template, String, nil?: true
|
|
49
|
+
|
|
50
|
+
# @!method initialize(event:, brand: nil, content: nil, data: nil, locale: nil, override: nil, template: nil)
|
|
51
|
+
# Some parameter documentations has been truncated, see
|
|
52
|
+
# {Trycourier::Models::InboundBulkMessage} for more details.
|
|
53
|
+
#
|
|
54
|
+
# Bulk message definition. Supports two formats:
|
|
55
|
+
#
|
|
56
|
+
# - V1 format: Requires `event` field (event ID or notification ID)
|
|
57
|
+
# - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
|
|
58
|
+
# content) in addition to `event`
|
|
59
|
+
#
|
|
60
|
+
# @param event [String] Event ID or Notification ID (required). Can be either a
|
|
61
|
+
#
|
|
62
|
+
# @param brand [String, nil]
|
|
63
|
+
#
|
|
64
|
+
# @param content [Trycourier::Models::ElementalContentSugar, Trycourier::Models::ElementalContent, nil] Elemental content (optional, for V2 format). When provided, this will be used
|
|
65
|
+
#
|
|
66
|
+
# @param data [Hash{Symbol=>Object}, nil]
|
|
67
|
+
#
|
|
68
|
+
# @param locale [Hash{Symbol=>Hash{Symbol=>Object}}, nil]
|
|
69
|
+
#
|
|
70
|
+
# @param override [Hash{Symbol=>Object}, nil]
|
|
71
|
+
#
|
|
72
|
+
# @param template [String, nil] Notification ID or template ID (optional, for V2 format). When provided,
|
|
73
|
+
|
|
74
|
+
# Elemental content (optional, for V2 format). When provided, this will be used
|
|
75
|
+
# instead of the notification associated with the `event` field.
|
|
76
|
+
#
|
|
77
|
+
# @see Trycourier::Models::InboundBulkMessage#content
|
|
78
|
+
module Content
|
|
79
|
+
extend Trycourier::Internal::Type::Union
|
|
104
80
|
|
|
105
81
|
# Syntactic sugar to provide a fast shorthand for Courier Elemental Blocks.
|
|
106
|
-
|
|
107
|
-
# @see Trycourier::Models::InboundBulkMessage::InboundBulkContentMessage#content
|
|
108
|
-
module Content
|
|
109
|
-
extend Trycourier::Internal::Type::Union
|
|
82
|
+
variant -> { Trycourier::ElementalContentSugar }
|
|
110
83
|
|
|
111
|
-
|
|
112
|
-
variant -> { Trycourier::ElementalContentSugar }
|
|
84
|
+
variant -> { Trycourier::ElementalContent }
|
|
113
85
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
# @!method self.variants
|
|
117
|
-
# @return [Array(Trycourier::Models::ElementalContentSugar, Trycourier::Models::ElementalContent)]
|
|
118
|
-
end
|
|
86
|
+
# @!method self.variants
|
|
87
|
+
# @return [Array(Trycourier::Models::ElementalContentSugar, Trycourier::Models::ElementalContent)]
|
|
119
88
|
end
|
|
120
|
-
|
|
121
|
-
# @!method self.variants
|
|
122
|
-
# @return [Array(Trycourier::Models::InboundBulkMessage::InboundBulkTemplateMessage, Trycourier::Models::InboundBulkMessage::InboundBulkContentMessage)]
|
|
123
89
|
end
|
|
124
90
|
end
|
|
125
91
|
end
|
|
@@ -4,6 +4,7 @@ module Trycourier
|
|
|
4
4
|
module Models
|
|
5
5
|
class InboundBulkMessageUser < Trycourier::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute data
|
|
7
|
+
# User-specific data that will be merged with message.data
|
|
7
8
|
#
|
|
8
9
|
# @return [Object, nil]
|
|
9
10
|
optional :data, Trycourier::Internal::Type::Unknown
|
|
@@ -14,26 +15,40 @@ module Trycourier
|
|
|
14
15
|
optional :preferences, -> { Trycourier::RecipientPreferences }, nil?: true
|
|
15
16
|
|
|
16
17
|
# @!attribute profile
|
|
18
|
+
# User profile information. For email-based bulk jobs, `profile.email` is required
|
|
19
|
+
# for provider routing to determine if the message can be delivered. The email
|
|
20
|
+
# address should be provided here rather than in `to.email`.
|
|
17
21
|
#
|
|
18
|
-
# @return [Object, nil]
|
|
19
|
-
optional :profile, Trycourier::Internal::Type::Unknown
|
|
22
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
23
|
+
optional :profile, Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown], nil?: true
|
|
20
24
|
|
|
21
25
|
# @!attribute recipient
|
|
26
|
+
# User ID (legacy field, use profile or to.user_id instead)
|
|
22
27
|
#
|
|
23
28
|
# @return [String, nil]
|
|
24
29
|
optional :recipient, String, nil?: true
|
|
25
30
|
|
|
26
31
|
# @!attribute to
|
|
32
|
+
# Optional recipient information. Note: For email provider routing, use
|
|
33
|
+
# `profile.email` instead of `to.email`. The `to` field is primarily used for
|
|
34
|
+
# recipient identification and data merging.
|
|
27
35
|
#
|
|
28
36
|
# @return [Trycourier::Models::UserRecipient, nil]
|
|
29
37
|
optional :to, -> { Trycourier::UserRecipient }, nil?: true
|
|
30
38
|
|
|
31
39
|
# @!method initialize(data: nil, preferences: nil, profile: nil, recipient: nil, to: nil)
|
|
32
|
-
#
|
|
40
|
+
# Some parameter documentations has been truncated, see
|
|
41
|
+
# {Trycourier::Models::InboundBulkMessageUser} for more details.
|
|
42
|
+
#
|
|
43
|
+
# @param data [Object] User-specific data that will be merged with message.data
|
|
44
|
+
#
|
|
33
45
|
# @param preferences [Trycourier::Models::RecipientPreferences, nil]
|
|
34
|
-
#
|
|
35
|
-
# @param
|
|
36
|
-
#
|
|
46
|
+
#
|
|
47
|
+
# @param profile [Hash{Symbol=>Object}, nil] User profile information. For email-based bulk jobs, `profile.email` is required
|
|
48
|
+
#
|
|
49
|
+
# @param recipient [String, nil] User ID (legacy field, use profile or to.user_id instead)
|
|
50
|
+
#
|
|
51
|
+
# @param to [Trycourier::Models::UserRecipient, nil] Optional recipient information. Note: For email provider routing, use
|
|
37
52
|
end
|
|
38
53
|
end
|
|
39
54
|
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
class Intercom < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute from
|
|
7
|
+
#
|
|
8
|
+
# @return [String]
|
|
9
|
+
required :from, String
|
|
10
|
+
|
|
11
|
+
# @!attribute to
|
|
12
|
+
#
|
|
13
|
+
# @return [Trycourier::Models::IntercomRecipient]
|
|
14
|
+
required :to, -> { Trycourier::IntercomRecipient }
|
|
15
|
+
|
|
16
|
+
# @!method initialize(from:, to:)
|
|
17
|
+
# @param from [String]
|
|
18
|
+
# @param to [Trycourier::Models::IntercomRecipient]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
class IntercomRecipient < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute id
|
|
7
|
+
#
|
|
8
|
+
# @return [String]
|
|
9
|
+
required :id, String
|
|
10
|
+
|
|
11
|
+
# @!method initialize(id:)
|
|
12
|
+
# @param id [String]
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
class ListFilter < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute operator
|
|
7
|
+
# Send to users only if they are member of the account
|
|
8
|
+
#
|
|
9
|
+
# @return [Symbol, Trycourier::Models::ListFilter::Operator]
|
|
10
|
+
required :operator, enum: -> { Trycourier::ListFilter::Operator }
|
|
11
|
+
|
|
12
|
+
# @!attribute path
|
|
13
|
+
#
|
|
14
|
+
# @return [Symbol, Trycourier::Models::ListFilter::Path]
|
|
15
|
+
required :path, enum: -> { Trycourier::ListFilter::Path }
|
|
16
|
+
|
|
17
|
+
# @!attribute value
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :value, String
|
|
21
|
+
|
|
22
|
+
# @!method initialize(operator:, path:, value:)
|
|
23
|
+
# @param operator [Symbol, Trycourier::Models::ListFilter::Operator] Send to users only if they are member of the account
|
|
24
|
+
#
|
|
25
|
+
# @param path [Symbol, Trycourier::Models::ListFilter::Path]
|
|
26
|
+
#
|
|
27
|
+
# @param value [String]
|
|
28
|
+
|
|
29
|
+
# Send to users only if they are member of the account
|
|
30
|
+
#
|
|
31
|
+
# @see Trycourier::Models::ListFilter#operator
|
|
32
|
+
module Operator
|
|
33
|
+
extend Trycourier::Internal::Type::Enum
|
|
34
|
+
|
|
35
|
+
MEMBER_OF = :MEMBER_OF
|
|
36
|
+
|
|
37
|
+
# @!method self.values
|
|
38
|
+
# @return [Array<Symbol>]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# @see Trycourier::Models::ListFilter#path
|
|
42
|
+
module Path
|
|
43
|
+
extend Trycourier::Internal::Type::Enum
|
|
44
|
+
|
|
45
|
+
ACCOUNT_ID = :account_id
|
|
46
|
+
|
|
47
|
+
# @!method self.values
|
|
48
|
+
# @return [Array<Symbol>]
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
class ListPatternRecipient < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute data
|
|
7
|
+
#
|
|
8
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
9
|
+
optional :data, Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown], nil?: true
|
|
10
|
+
|
|
11
|
+
# @!attribute list_pattern
|
|
12
|
+
#
|
|
13
|
+
# @return [String, nil]
|
|
14
|
+
optional :list_pattern, String, nil?: true
|
|
15
|
+
|
|
16
|
+
# @!method initialize(data: nil, list_pattern: nil)
|
|
17
|
+
# Send to users in lists matching a pattern
|
|
18
|
+
#
|
|
19
|
+
# @param data [Hash{Symbol=>Object}, nil]
|
|
20
|
+
# @param list_pattern [String, nil]
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
class ListRecipient < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute data
|
|
7
|
+
#
|
|
8
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
9
|
+
optional :data, Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown], nil?: true
|
|
10
|
+
|
|
11
|
+
# @!attribute filters
|
|
12
|
+
#
|
|
13
|
+
# @return [Array<Trycourier::Models::ListFilter>, nil]
|
|
14
|
+
optional :filters, -> { Trycourier::Internal::Type::ArrayOf[Trycourier::ListFilter] }, nil?: true
|
|
15
|
+
|
|
16
|
+
# @!attribute list_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String, nil]
|
|
19
|
+
optional :list_id, String, nil?: true
|
|
20
|
+
|
|
21
|
+
# @!method initialize(data: nil, filters: nil, list_id: nil)
|
|
22
|
+
# Send to all users in a specific list
|
|
23
|
+
#
|
|
24
|
+
# @param data [Hash{Symbol=>Object}, nil]
|
|
25
|
+
# @param filters [Array<Trycourier::Models::ListFilter>, nil]
|
|
26
|
+
# @param list_id [String, nil]
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
module MsTeams
|
|
6
|
+
extend Trycourier::Internal::Type::Union
|
|
7
|
+
|
|
8
|
+
variant -> { Trycourier::SendToMsTeamsUserID }
|
|
9
|
+
|
|
10
|
+
variant -> { Trycourier::SendToMsTeamsEmail }
|
|
11
|
+
|
|
12
|
+
variant -> { Trycourier::SendToMsTeamsChannelID }
|
|
13
|
+
|
|
14
|
+
variant -> { Trycourier::SendToMsTeamsConversationID }
|
|
15
|
+
|
|
16
|
+
variant -> { Trycourier::SendToMsTeamsChannelName }
|
|
17
|
+
|
|
18
|
+
# @!method self.variants
|
|
19
|
+
# @return [Array(Trycourier::Models::SendToMsTeamsUserID, Trycourier::Models::SendToMsTeamsEmail, Trycourier::Models::SendToMsTeamsChannelID, Trycourier::Models::SendToMsTeamsConversationID, Trycourier::Models::SendToMsTeamsChannelName)]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
class MsTeamsBaseProperties < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute service_url
|
|
7
|
+
#
|
|
8
|
+
# @return [String]
|
|
9
|
+
required :service_url, String
|
|
10
|
+
|
|
11
|
+
# @!attribute tenant_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :tenant_id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(service_url:, tenant_id:)
|
|
17
|
+
# @param service_url [String]
|
|
18
|
+
# @param tenant_id [String]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
class MsTeamsRecipient < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute ms_teams
|
|
7
|
+
#
|
|
8
|
+
# @return [Trycourier::Models::SendToMsTeamsUserID, Trycourier::Models::SendToMsTeamsEmail, Trycourier::Models::SendToMsTeamsChannelID, Trycourier::Models::SendToMsTeamsConversationID, Trycourier::Models::SendToMsTeamsChannelName]
|
|
9
|
+
required :ms_teams, union: -> { Trycourier::MsTeams }
|
|
10
|
+
|
|
11
|
+
# @!method initialize(ms_teams:)
|
|
12
|
+
# Send via Microsoft Teams
|
|
13
|
+
#
|
|
14
|
+
# @param ms_teams [Trycourier::Models::SendToMsTeamsUserID, Trycourier::Models::SendToMsTeamsEmail, Trycourier::Models::SendToMsTeamsChannelID, Trycourier::Models::SendToMsTeamsConversationID, Trycourier::Models::SendToMsTeamsChannelName]
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
class MultipleTokens < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute tokens
|
|
7
|
+
#
|
|
8
|
+
# @return [Array<Trycourier::Models::Token>]
|
|
9
|
+
required :tokens, -> { Trycourier::Internal::Type::ArrayOf[Trycourier::Token] }
|
|
10
|
+
|
|
11
|
+
# @!method initialize(tokens:)
|
|
12
|
+
# @param tokens [Array<Trycourier::Models::Token>]
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
class NestedFilterConfig < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute operator
|
|
7
|
+
# The operator to use for filtering
|
|
8
|
+
#
|
|
9
|
+
# @return [Symbol, Trycourier::Models::NestedFilterConfig::Operator]
|
|
10
|
+
required :operator, enum: -> { Trycourier::NestedFilterConfig::Operator }
|
|
11
|
+
|
|
12
|
+
# @!attribute rules
|
|
13
|
+
#
|
|
14
|
+
# @return [Array<Trycourier::Models::FilterConfig>]
|
|
15
|
+
required :rules, -> { Trycourier::Internal::Type::ArrayOf[union: Trycourier::FilterConfig] }
|
|
16
|
+
|
|
17
|
+
# @!method initialize(operator:, rules:)
|
|
18
|
+
# @param operator [Symbol, Trycourier::Models::NestedFilterConfig::Operator] The operator to use for filtering
|
|
19
|
+
#
|
|
20
|
+
# @param rules [Array<Trycourier::Models::FilterConfig>]
|
|
21
|
+
|
|
22
|
+
# The operator to use for filtering
|
|
23
|
+
#
|
|
24
|
+
# @see Trycourier::Models::NestedFilterConfig#operator
|
|
25
|
+
module Operator
|
|
26
|
+
extend Trycourier::Internal::Type::Enum
|
|
27
|
+
|
|
28
|
+
ENDS_WITH = :ENDS_WITH
|
|
29
|
+
EQ = :EQ
|
|
30
|
+
EXISTS = :EXISTS
|
|
31
|
+
GT = :GT
|
|
32
|
+
GTE = :GTE
|
|
33
|
+
INCLUDES = :INCLUDES
|
|
34
|
+
IS_AFTER = :IS_AFTER
|
|
35
|
+
IS_BEFORE = :IS_BEFORE
|
|
36
|
+
LT = :LT
|
|
37
|
+
LTE = :LTE
|
|
38
|
+
NEQ = :NEQ
|
|
39
|
+
OMIT = :OMIT
|
|
40
|
+
STARTS_WITH = :STARTS_WITH
|
|
41
|
+
AND = :AND
|
|
42
|
+
OR = :OR
|
|
43
|
+
|
|
44
|
+
# @!method self.values
|
|
45
|
+
# @return [Array<Symbol>]
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
class Pagerduty < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute event_action
|
|
7
|
+
#
|
|
8
|
+
# @return [String, nil]
|
|
9
|
+
optional :event_action, String, nil?: true
|
|
10
|
+
|
|
11
|
+
# @!attribute routing_key
|
|
12
|
+
#
|
|
13
|
+
# @return [String, nil]
|
|
14
|
+
optional :routing_key, String, nil?: true
|
|
15
|
+
|
|
16
|
+
# @!attribute severity
|
|
17
|
+
#
|
|
18
|
+
# @return [String, nil]
|
|
19
|
+
optional :severity, String, nil?: true
|
|
20
|
+
|
|
21
|
+
# @!attribute source
|
|
22
|
+
#
|
|
23
|
+
# @return [String, nil]
|
|
24
|
+
optional :source, String, nil?: true
|
|
25
|
+
|
|
26
|
+
# @!method initialize(event_action: nil, routing_key: nil, severity: nil, source: nil)
|
|
27
|
+
# @param event_action [String, nil]
|
|
28
|
+
# @param routing_key [String, nil]
|
|
29
|
+
# @param severity [String, nil]
|
|
30
|
+
# @param source [String, nil]
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
class PagerdutyRecipient < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute pagerduty
|
|
7
|
+
#
|
|
8
|
+
# @return [Trycourier::Models::Pagerduty]
|
|
9
|
+
required :pagerduty, -> { Trycourier::Pagerduty }
|
|
10
|
+
|
|
11
|
+
# @!method initialize(pagerduty:)
|
|
12
|
+
# Send via PagerDuty
|
|
13
|
+
#
|
|
14
|
+
# @param pagerduty [Trycourier::Models::Pagerduty]
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
class SendDirectMessage < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute user_id
|
|
7
|
+
#
|
|
8
|
+
# @return [String]
|
|
9
|
+
required :user_id, String
|
|
10
|
+
|
|
11
|
+
# @!method initialize(user_id:)
|
|
12
|
+
# @param user_id [String]
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|