From f1212481e65a0b8701385951944f544ff68ef5f0 Mon Sep 17 00:00:00 2001 From: OneSignal Date: Wed, 20 May 2026 20:31:51 +0000 Subject: [PATCH] feat: add v5.5.0 package updates --- docs/BasicNotification.md | 4 +++- docs/BasicNotificationAllOf.md | 1 + docs/Notification.md | 4 +++- docs/NotificationTarget.md | 3 ++- docs/NotificationWithMeta.md | 4 +++- docs/SubscriptionNotificationTarget.md | 3 ++- src/models/basic_notification.rs | 10 +++++++++- src/models/basic_notification_all_of.rs | 4 ++++ src/models/notification.rs | 10 +++++++++- src/models/notification_target.rs | 6 +++++- src/models/notification_with_meta.rs | 10 +++++++++- src/models/subscription_notification_target.rs | 6 +++++- 12 files changed, 55 insertions(+), 10 deletions(-) diff --git a/docs/BasicNotification.md b/docs/BasicNotification.md index 7883a0d..8e4337c 100644 --- a/docs/BasicNotification.md +++ b/docs/BasicNotification.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **included_segments** | Option<**Vec**> | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] **excluded_segments** | Option<**Vec**> | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] **include_subscription_ids** | Option<**Vec**> | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] -**include_email_tokens** | Option<**Vec**> | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] +**include_email_tokens** | Option<**Vec**> | Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. | [optional] +**email_to** | Option<**Vec**> | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. | [optional] **include_phone_numbers** | Option<**Vec**> | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] **include_ios_tokens** | Option<**Vec**> | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] **include_wp_wns_uris** | Option<**Vec**> | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] @@ -110,6 +111,7 @@ Name | Type | Description | Notes **disable_email_click_tracking** | Option<**bool**> | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] **include_unsubscribed** | Option<**bool**> | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **email_bcc** | Option<**Vec**> | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] +**email_sender_domain** | Option<**String**> | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] **sms_from** | Option<**String**> | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **sms_media_urls** | Option<**Vec**> | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] **filters** | Option<[**Vec**](FilterExpression.md)> | | [optional] diff --git a/docs/BasicNotificationAllOf.md b/docs/BasicNotificationAllOf.md index 23b0542..3b26450 100644 --- a/docs/BasicNotificationAllOf.md +++ b/docs/BasicNotificationAllOf.md @@ -97,6 +97,7 @@ Name | Type | Description | Notes **disable_email_click_tracking** | Option<**bool**> | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] **include_unsubscribed** | Option<**bool**> | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **email_bcc** | Option<**Vec**> | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] +**email_sender_domain** | Option<**String**> | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] **sms_from** | Option<**String**> | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **sms_media_urls** | Option<**Vec**> | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] **filters** | Option<[**Vec**](FilterExpression.md)> | | [optional] diff --git a/docs/Notification.md b/docs/Notification.md index c70a5a2..1383f50 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **included_segments** | Option<**Vec**> | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] **excluded_segments** | Option<**Vec**> | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] **include_subscription_ids** | Option<**Vec**> | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] -**include_email_tokens** | Option<**Vec**> | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] +**include_email_tokens** | Option<**Vec**> | Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. | [optional] +**email_to** | Option<**Vec**> | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. | [optional] **include_phone_numbers** | Option<**Vec**> | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] **include_ios_tokens** | Option<**Vec**> | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] **include_wp_wns_uris** | Option<**Vec**> | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] @@ -110,6 +111,7 @@ Name | Type | Description | Notes **disable_email_click_tracking** | Option<**bool**> | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] **include_unsubscribed** | Option<**bool**> | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **email_bcc** | Option<**Vec**> | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] +**email_sender_domain** | Option<**String**> | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] **sms_from** | Option<**String**> | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **sms_media_urls** | Option<**Vec**> | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] **filters** | Option<[**Vec**](FilterExpression.md)> | | [optional] diff --git a/docs/NotificationTarget.md b/docs/NotificationTarget.md index 38bf93e..0292f4d 100644 --- a/docs/NotificationTarget.md +++ b/docs/NotificationTarget.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **included_segments** | Option<**Vec**> | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] **excluded_segments** | Option<**Vec**> | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] **include_subscription_ids** | Option<**Vec**> | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] -**include_email_tokens** | Option<**Vec**> | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] +**include_email_tokens** | Option<**Vec**> | Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. | [optional] +**email_to** | Option<**Vec**> | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. | [optional] **include_phone_numbers** | Option<**Vec**> | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] **include_ios_tokens** | Option<**Vec**> | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] **include_wp_wns_uris** | Option<**Vec**> | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] diff --git a/docs/NotificationWithMeta.md b/docs/NotificationWithMeta.md index fff1699..570c68e 100644 --- a/docs/NotificationWithMeta.md +++ b/docs/NotificationWithMeta.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **included_segments** | Option<**Vec**> | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] **excluded_segments** | Option<**Vec**> | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] **include_subscription_ids** | Option<**Vec**> | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] -**include_email_tokens** | Option<**Vec**> | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] +**include_email_tokens** | Option<**Vec**> | Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. | [optional] +**email_to** | Option<**Vec**> | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. | [optional] **include_phone_numbers** | Option<**Vec**> | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] **include_ios_tokens** | Option<**Vec**> | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] **include_wp_wns_uris** | Option<**Vec**> | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] @@ -110,6 +111,7 @@ Name | Type | Description | Notes **disable_email_click_tracking** | Option<**bool**> | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional] **include_unsubscribed** | Option<**bool**> | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **email_bcc** | Option<**Vec**> | BCC recipients that were set on this email notification. | [optional] +**email_sender_domain** | Option<**String**> | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] **sms_from** | Option<**String**> | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **sms_media_urls** | Option<**Vec**> | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] **filters** | Option<[**Vec**](FilterExpression.md)> | | [optional] diff --git a/docs/SubscriptionNotificationTarget.md b/docs/SubscriptionNotificationTarget.md index 8dc1461..bfbb46e 100644 --- a/docs/SubscriptionNotificationTarget.md +++ b/docs/SubscriptionNotificationTarget.md @@ -5,7 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **include_subscription_ids** | Option<**Vec**> | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] -**include_email_tokens** | Option<**Vec**> | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] +**include_email_tokens** | Option<**Vec**> | Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. | [optional] +**email_to** | Option<**Vec**> | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. | [optional] **include_phone_numbers** | Option<**Vec**> | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] **include_ios_tokens** | Option<**Vec**> | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] **include_wp_wns_uris** | Option<**Vec**> | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] diff --git a/src/models/basic_notification.rs b/src/models/basic_notification.rs index 616fc91..94b8283 100644 --- a/src/models/basic_notification.rs +++ b/src/models/basic_notification.rs @@ -22,9 +22,12 @@ pub struct BasicNotification { /// Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call #[serde(rename = "include_subscription_ids", skip_serializing_if = "Option::is_none")] pub include_subscription_ids: Option>, - /// Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call + /// Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. #[serde(rename = "include_email_tokens", skip_serializing_if = "Option::is_none")] pub include_email_tokens: Option>, + /// Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. + #[serde(rename = "email_to", skip_serializing_if = "Option::is_none")] + pub email_to: Option>, /// Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call #[serde(rename = "include_phone_numbers", skip_serializing_if = "Option::is_none")] pub include_phone_numbers: Option>, @@ -323,6 +326,9 @@ pub struct BasicNotification { /// Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. #[serde(rename = "email_bcc", skip_serializing_if = "Option::is_none")] pub email_bcc: Option>, + /// Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. + #[serde(rename = "email_sender_domain", skip_serializing_if = "Option::is_none")] + pub email_sender_domain: Option, /// Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. #[serde(rename = "sms_from", skip_serializing_if = "Option::is_none")] pub sms_from: Option, @@ -358,6 +364,7 @@ impl BasicNotification { excluded_segments: None, include_subscription_ids: None, include_email_tokens: None, + email_to: None, include_phone_numbers: None, include_ios_tokens: None, include_wp_wns_uris: None, @@ -460,6 +467,7 @@ impl BasicNotification { disable_email_click_tracking: None, include_unsubscribed: None, email_bcc: None, + email_sender_domain: None, sms_from: None, sms_media_urls: None, filters: None, diff --git a/src/models/basic_notification_all_of.rs b/src/models/basic_notification_all_of.rs index f16dd97..e15d8ce 100644 --- a/src/models/basic_notification_all_of.rs +++ b/src/models/basic_notification_all_of.rs @@ -285,6 +285,9 @@ pub struct BasicNotificationAllOf { /// Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. #[serde(rename = "email_bcc", skip_serializing_if = "Option::is_none")] pub email_bcc: Option>, + /// Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. + #[serde(rename = "email_sender_domain", skip_serializing_if = "Option::is_none")] + pub email_sender_domain: Option, /// Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. #[serde(rename = "sms_from", skip_serializing_if = "Option::is_none")] pub sms_from: Option, @@ -409,6 +412,7 @@ impl BasicNotificationAllOf { disable_email_click_tracking: None, include_unsubscribed: None, email_bcc: None, + email_sender_domain: None, sms_from: None, sms_media_urls: None, filters: None, diff --git a/src/models/notification.rs b/src/models/notification.rs index 817a497..24b6307 100644 --- a/src/models/notification.rs +++ b/src/models/notification.rs @@ -22,9 +22,12 @@ pub struct Notification { /// Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call #[serde(rename = "include_subscription_ids", skip_serializing_if = "Option::is_none")] pub include_subscription_ids: Option>, - /// Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call + /// Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. #[serde(rename = "include_email_tokens", skip_serializing_if = "Option::is_none")] pub include_email_tokens: Option>, + /// Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. + #[serde(rename = "email_to", skip_serializing_if = "Option::is_none")] + pub email_to: Option>, /// Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call #[serde(rename = "include_phone_numbers", skip_serializing_if = "Option::is_none")] pub include_phone_numbers: Option>, @@ -323,6 +326,9 @@ pub struct Notification { /// Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. #[serde(rename = "email_bcc", skip_serializing_if = "Option::is_none")] pub email_bcc: Option>, + /// Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. + #[serde(rename = "email_sender_domain", skip_serializing_if = "Option::is_none")] + pub email_sender_domain: Option, /// Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. #[serde(rename = "sms_from", skip_serializing_if = "Option::is_none")] pub sms_from: Option, @@ -361,6 +367,7 @@ impl Notification { excluded_segments: None, include_subscription_ids: None, include_email_tokens: None, + email_to: None, include_phone_numbers: None, include_ios_tokens: None, include_wp_wns_uris: None, @@ -463,6 +470,7 @@ impl Notification { disable_email_click_tracking: None, include_unsubscribed: None, email_bcc: None, + email_sender_domain: None, sms_from: None, sms_media_urls: None, filters: None, diff --git a/src/models/notification_target.rs b/src/models/notification_target.rs index 9036d47..c77e412 100644 --- a/src/models/notification_target.rs +++ b/src/models/notification_target.rs @@ -22,9 +22,12 @@ pub struct NotificationTarget { /// Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call #[serde(rename = "include_subscription_ids", skip_serializing_if = "Option::is_none")] pub include_subscription_ids: Option>, - /// Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call + /// Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. #[serde(rename = "include_email_tokens", skip_serializing_if = "Option::is_none")] pub include_email_tokens: Option>, + /// Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. + #[serde(rename = "email_to", skip_serializing_if = "Option::is_none")] + pub email_to: Option>, /// Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call #[serde(rename = "include_phone_numbers", skip_serializing_if = "Option::is_none")] pub include_phone_numbers: Option>, @@ -60,6 +63,7 @@ impl NotificationTarget { excluded_segments: None, include_subscription_ids: None, include_email_tokens: None, + email_to: None, include_phone_numbers: None, include_ios_tokens: None, include_wp_wns_uris: None, diff --git a/src/models/notification_with_meta.rs b/src/models/notification_with_meta.rs index 4aed200..08a9a34 100644 --- a/src/models/notification_with_meta.rs +++ b/src/models/notification_with_meta.rs @@ -22,9 +22,12 @@ pub struct NotificationWithMeta { /// Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call #[serde(rename = "include_subscription_ids", skip_serializing_if = "Option::is_none")] pub include_subscription_ids: Option>, - /// Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call + /// Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. #[serde(rename = "include_email_tokens", skip_serializing_if = "Option::is_none")] pub include_email_tokens: Option>, + /// Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. + #[serde(rename = "email_to", skip_serializing_if = "Option::is_none")] + pub email_to: Option>, /// Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call #[serde(rename = "include_phone_numbers", skip_serializing_if = "Option::is_none")] pub include_phone_numbers: Option>, @@ -323,6 +326,9 @@ pub struct NotificationWithMeta { /// BCC recipients that were set on this email notification. #[serde(rename = "email_bcc", skip_serializing_if = "Option::is_none")] pub email_bcc: Option>, + /// Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. + #[serde(rename = "email_sender_domain", skip_serializing_if = "Option::is_none")] + pub email_sender_domain: Option, /// Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. #[serde(rename = "sms_from", skip_serializing_if = "Option::is_none")] pub sms_from: Option, @@ -395,6 +401,7 @@ impl NotificationWithMeta { excluded_segments: None, include_subscription_ids: None, include_email_tokens: None, + email_to: None, include_phone_numbers: None, include_ios_tokens: None, include_wp_wns_uris: None, @@ -497,6 +504,7 @@ impl NotificationWithMeta { disable_email_click_tracking: None, include_unsubscribed: None, email_bcc: None, + email_sender_domain: None, sms_from: None, sms_media_urls: None, filters: None, diff --git a/src/models/subscription_notification_target.rs b/src/models/subscription_notification_target.rs index c19f6a9..03c37f4 100644 --- a/src/models/subscription_notification_target.rs +++ b/src/models/subscription_notification_target.rs @@ -16,9 +16,12 @@ pub struct SubscriptionNotificationTarget { /// Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call #[serde(rename = "include_subscription_ids", skip_serializing_if = "Option::is_none")] pub include_subscription_ids: Option>, - /// Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call + /// Deprecated alias for `email_to`. Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Prefer `email_to` in new integrations. #[serde(rename = "include_email_tokens", skip_serializing_if = "Option::is_none")] pub include_email_tokens: Option>, + /// Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST API call. Supersedes the deprecated `include_email_tokens` field. + #[serde(rename = "email_to", skip_serializing_if = "Option::is_none")] + pub email_to: Option>, /// Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call #[serde(rename = "include_phone_numbers", skip_serializing_if = "Option::is_none")] pub include_phone_numbers: Option>, @@ -52,6 +55,7 @@ impl SubscriptionNotificationTarget { SubscriptionNotificationTarget { include_subscription_ids: None, include_email_tokens: None, + email_to: None, include_phone_numbers: None, include_ios_tokens: None, include_wp_wns_uris: None,