From ea2cd74d98abc28fd4a5ab74605724b6a1d7d95d Mon Sep 17 00:00:00 2001 From: OneSignal Date: Tue, 24 Mar 2026 17:58:17 +0000 Subject: [PATCH] feat: add v5.3.0 package updates --- .github/workflows/release.yml | 93 +++++++++++++++++++++++++ Cargo.toml | 2 +- README.md | 2 +- docs/BasicNotification.md | 6 ++ docs/BasicNotificationAllOf.md | 6 ++ docs/Notification.md | 6 ++ docs/NotificationWithMeta.md | 6 ++ src/apis/default_api.rs | 88 +++++++++++------------ src/models/basic_notification.rs | 58 +++++++++++++++ src/models/basic_notification_all_of.rs | 58 +++++++++++++++ src/models/notification.rs | 58 +++++++++++++++ src/models/notification_with_meta.rs | 58 +++++++++++++++ 12 files changed, 395 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..91b1a7a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,93 @@ +name: Release + +on: + push: + branches: [main] + workflow_dispatch: + +jobs: + release: + name: Create GitHub Release + runs-on: ubuntu-latest + outputs: + new_release_published: ${{ steps.semantic.outputs.new_release_published }} + permissions: + contents: write + issues: write + pull-requests: write + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + - name: Create GitHub Release + id: semantic + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + output=$(npx -p semantic-release \ + -p @semantic-release/changelog \ + -p @semantic-release/git \ + -p @semantic-release/github \ + -p conventional-changelog-conventionalcommits \ + semantic-release 2>&1) && exit_code=0 || exit_code=$? + echo "$output" + if echo "$output" | grep -q "Published release"; then + echo "new_release_published=true" >> "$GITHUB_OUTPUT" + else + echo "new_release_published=false" >> "$GITHUB_OUTPUT" + fi + exit $exit_code + + publish: + name: Publish to crates.io + needs: release + if: needs.release.outputs.new_release_published == 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - name: Set up Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + profile: minimal + + - name: Cache cargo registry + uses: actions/cache@v3 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + + - name: Cache cargo index + uses: actions/cache@v3 + with: + path: ~/.cargo/git + key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }} + + - name: Cache target directory + uses: actions/cache@v3 + with: + path: target + key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }} + + - name: Run tests + run: cargo test --all-features + continue-on-error: true + + - name: Build release + run: cargo build --release + + - name: Publish to crates.io + uses: katyo/publish-crates@v2 + with: + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + if: always() + with: + name: rust-artifacts + path: target/release/ diff --git a/Cargo.toml b/Cargo.toml index b98deb1..80d473a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "onesignal-rust-api" -version = "5.3.0-beta1" +version = "5.3.0" authors = ["devrel@onesignal.com"] edition = "2018" description = "A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com" diff --git a/README.md b/README.md index ac24c33..2835813 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ For more information, please visit [https://onesignal.com](https://onesignal.com This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. - API version: 5.3.0 -- Package version: 5.3.0-beta1 +- Package version: 5.3.0 - Build package: `org.openapitools.codegen.languages.RustClientCodegen` - GitHub repository: [https://github.com/onesignal/onesignal-rust-api](https://github.com/onesignal/onesignal-rust-api) diff --git a/docs/BasicNotification.md b/docs/BasicNotification.md index 544fa07..0c32133 100644 --- a/docs/BasicNotification.md +++ b/docs/BasicNotification.md @@ -105,6 +105,7 @@ Name | Type | Description | Notes **email_body** | Option<**String**> | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **email_from_name** | Option<**String**> | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] **email_from_address** | Option<**String**> | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] +**email_reply_to_address** | Option<**String**> | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] **email_preheader** | Option<**String**> | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] **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] @@ -112,6 +113,11 @@ Name | Type | Description | Notes **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] **custom_data** | Option<[**serde_json::Value**](.md)> | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] +**huawei_badge_class** | Option<**String**> | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] +**huawei_badge_add_num** | Option<**i32**> | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] +**huawei_badge_set_num** | Option<**i32**> | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] +**huawei_category** | Option<**String**> | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] +**huawei_bi_tag** | Option<**String**> | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BasicNotificationAllOf.md b/docs/BasicNotificationAllOf.md index 58f6cf9..268c4dc 100644 --- a/docs/BasicNotificationAllOf.md +++ b/docs/BasicNotificationAllOf.md @@ -92,6 +92,7 @@ Name | Type | Description | Notes **email_body** | Option<**String**> | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **email_from_name** | Option<**String**> | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] **email_from_address** | Option<**String**> | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] +**email_reply_to_address** | Option<**String**> | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] **email_preheader** | Option<**String**> | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] **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] @@ -99,6 +100,11 @@ Name | Type | Description | Notes **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] **custom_data** | Option<[**serde_json::Value**](.md)> | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] +**huawei_badge_class** | Option<**String**> | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] +**huawei_badge_add_num** | Option<**i32**> | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] +**huawei_badge_set_num** | Option<**i32**> | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] +**huawei_category** | Option<**String**> | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] +**huawei_bi_tag** | Option<**String**> | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Notification.md b/docs/Notification.md index 7c8c64c..fdecd56 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -105,6 +105,7 @@ Name | Type | Description | Notes **email_body** | Option<**String**> | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **email_from_name** | Option<**String**> | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] **email_from_address** | Option<**String**> | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] +**email_reply_to_address** | Option<**String**> | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] **email_preheader** | Option<**String**> | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] **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] @@ -112,6 +113,11 @@ Name | Type | Description | Notes **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] **custom_data** | Option<[**serde_json::Value**](.md)> | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] +**huawei_badge_class** | Option<**String**> | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] +**huawei_badge_add_num** | Option<**i32**> | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] +**huawei_badge_set_num** | Option<**i32**> | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] +**huawei_category** | Option<**String**> | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] +**huawei_bi_tag** | Option<**String**> | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] **send_after** | Option<**String**> | Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/NotificationWithMeta.md b/docs/NotificationWithMeta.md index fbed3e8..2e4c931 100644 --- a/docs/NotificationWithMeta.md +++ b/docs/NotificationWithMeta.md @@ -105,6 +105,7 @@ Name | Type | Description | Notes **email_body** | Option<**String**> | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **email_from_name** | Option<**String**> | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] **email_from_address** | Option<**String**> | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] +**email_reply_to_address** | Option<**String**> | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] **email_preheader** | Option<**String**> | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] **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] @@ -112,6 +113,11 @@ Name | Type | Description | Notes **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] **custom_data** | Option<[**serde_json::Value**](.md)> | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] +**huawei_badge_class** | Option<**String**> | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] +**huawei_badge_add_num** | Option<**i32**> | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] +**huawei_badge_set_num** | Option<**i32**> | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] +**huawei_category** | Option<**String**> | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] +**huawei_bi_tag** | Option<**String**> | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] **successful** | Option<**i32**> | Number of notifications that were successfully delivered. | [optional] **failed** | Option<**i32**> | Number of notifications that could not be delivered due to those devices being unsubscribed. | [optional] **errored** | Option<**i32**> | Number of notifications that could not be delivered due to an error. You can find more information by viewing the notification in the dashboard. | [optional] diff --git a/src/apis/default_api.rs b/src/apis/default_api.rs index a4d31c3..ccadba9 100644 --- a/src/apis/default_api.rs +++ b/src/apis/default_api.rs @@ -446,7 +446,7 @@ pub async fn cancel_notification(configuration: &configuration::Configuration, a } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -482,7 +482,7 @@ pub async fn copy_template_to_app(configuration: &configuration::Configuration, } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.organization_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -518,7 +518,7 @@ pub async fn create_alias(configuration: &configuration::Configuration, app_id: } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -554,7 +554,7 @@ pub async fn create_alias_by_subscription(configuration: &configuration::Configu } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -590,7 +590,7 @@ pub async fn create_api_key(configuration: &configuration::Configuration, app_id } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.organization_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -626,7 +626,7 @@ pub async fn create_app(configuration: &configuration::Configuration, app: crate } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.organization_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -662,7 +662,7 @@ pub async fn create_custom_events(configuration: &configuration::Configuration, } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -698,7 +698,7 @@ pub async fn create_notification(configuration: &configuration::Configuration, n } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -734,7 +734,7 @@ pub async fn create_segment(configuration: &configuration::Configuration, app_id } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -770,7 +770,7 @@ pub async fn create_subscription(configuration: &configuration::Configuration, a } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -806,7 +806,7 @@ pub async fn create_template(configuration: &configuration::Configuration, creat } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -842,7 +842,7 @@ pub async fn create_user(configuration: &configuration::Configuration, app_id: & } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -878,7 +878,7 @@ pub async fn delete_alias(configuration: &configuration::Configuration, app_id: } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -913,7 +913,7 @@ pub async fn delete_api_key(configuration: &configuration::Configuration, app_id } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.organization_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -948,7 +948,7 @@ pub async fn delete_segment(configuration: &configuration::Configuration, app_id } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -983,7 +983,7 @@ pub async fn delete_subscription(configuration: &configuration::Configuration, a } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1019,7 +1019,7 @@ pub async fn delete_template(configuration: &configuration::Configuration, templ } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1054,7 +1054,7 @@ pub async fn delete_user(configuration: &configuration::Configuration, app_id: & } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1090,7 +1090,7 @@ pub async fn export_events(configuration: &configuration::Configuration, notific } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1125,7 +1125,7 @@ pub async fn export_subscriptions(configuration: &configuration::Configuration, } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1161,7 +1161,7 @@ pub async fn get_aliases(configuration: &configuration::Configuration, app_id: & } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1196,7 +1196,7 @@ pub async fn get_aliases_by_subscription(configuration: &configuration::Configur } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1231,7 +1231,7 @@ pub async fn get_app(configuration: &configuration::Configuration, app_id: &str) } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.organization_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1266,7 +1266,7 @@ pub async fn get_apps(configuration: &configuration::Configuration, ) -> Result< } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.organization_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1302,7 +1302,7 @@ pub async fn get_notification(configuration: &configuration::Configuration, app_ } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1337,7 +1337,7 @@ pub async fn get_notification_history(configuration: &configuration::Configurati } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1383,7 +1383,7 @@ pub async fn get_notifications(configuration: &configuration::Configuration, app } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1431,7 +1431,7 @@ pub async fn get_outcomes(configuration: &configuration::Configuration, app_id: } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1472,7 +1472,7 @@ pub async fn get_segments(configuration: &configuration::Configuration, app_id: } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1507,7 +1507,7 @@ pub async fn get_user(configuration: &configuration::Configuration, app_id: &str } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1542,7 +1542,7 @@ pub async fn rotate_api_key(configuration: &configuration::Configuration, app_id } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.organization_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1577,7 +1577,7 @@ pub async fn start_live_activity(configuration: &configuration::Configuration, a } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1613,7 +1613,7 @@ pub async fn transfer_subscription(configuration: &configuration::Configuration, } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1650,7 +1650,7 @@ pub async fn unsubscribe_email_with_token(configuration: &configuration::Configu } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1685,7 +1685,7 @@ pub async fn update_api_key(configuration: &configuration::Configuration, app_id } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.organization_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1721,7 +1721,7 @@ pub async fn update_app(configuration: &configuration::Configuration, app_id: &s } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.organization_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1757,7 +1757,7 @@ pub async fn update_live_activity(configuration: &configuration::Configuration, } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1793,7 +1793,7 @@ pub async fn update_subscription(configuration: &configuration::Configuration, a } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1829,7 +1829,7 @@ pub async fn update_subscription_by_token(configuration: &configuration::Configu } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1866,7 +1866,7 @@ pub async fn update_template(configuration: &configuration::Configuration, templ } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1902,7 +1902,7 @@ pub async fn update_user(configuration: &configuration::Configuration, app_id: & } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1938,7 +1938,7 @@ pub async fn view_api_keys(configuration: &configuration::Configuration, app_id: } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.organization_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -1974,7 +1974,7 @@ pub async fn view_template(configuration: &configuration::Configuration, templat } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); @@ -2019,7 +2019,7 @@ pub async fn view_templates(configuration: &configuration::Configuration, app_id } // Adds a telemetry header - req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0-beta1"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.3.0"); if let Some(ref token) = configuration.rest_api_key_token { req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); diff --git a/src/models/basic_notification.rs b/src/models/basic_notification.rs index efaa455..44da3d7 100644 --- a/src/models/basic_notification.rs +++ b/src/models/basic_notification.rs @@ -308,6 +308,9 @@ pub struct BasicNotification { /// Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. #[serde(rename = "email_from_address", skip_serializing_if = "Option::is_none")] pub email_from_address: Option, + /// Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. + #[serde(rename = "email_reply_to_address", skip_serializing_if = "Option::is_none")] + pub email_reply_to_address: Option, /// Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. #[serde(rename = "email_preheader", skip_serializing_if = "Option::is_none")] pub email_preheader: Option, @@ -328,6 +331,21 @@ pub struct BasicNotification { /// Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} #[serde(rename = "custom_data", skip_serializing_if = "Option::is_none")] pub custom_data: Option, + /// Channel: Push Notifications Platform: Huawei Full path of the app entry activity class + #[serde(rename = "huawei_badge_class", skip_serializing_if = "Option::is_none")] + pub huawei_badge_class: Option, + /// Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 + #[serde(rename = "huawei_badge_add_num", skip_serializing_if = "Option::is_none")] + pub huawei_badge_add_num: Option, + /// Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 + #[serde(rename = "huawei_badge_set_num", skip_serializing_if = "Option::is_none")] + pub huawei_badge_set_num: Option, + /// Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. + #[serde(rename = "huawei_category", skip_serializing_if = "Option::is_none")] + pub huawei_category: Option, + /// Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. + #[serde(rename = "huawei_bi_tag", skip_serializing_if = "Option::is_none")] + pub huawei_bi_tag: Option, } impl BasicNotification { @@ -434,6 +452,7 @@ impl BasicNotification { email_body: None, email_from_name: None, email_from_address: None, + email_reply_to_address: None, email_preheader: None, disable_email_click_tracking: None, include_unsubscribed: None, @@ -441,6 +460,11 @@ impl BasicNotification { sms_media_urls: None, filters: None, custom_data: None, + huawei_badge_class: None, + huawei_badge_add_num: None, + huawei_badge_set_num: None, + huawei_category: None, + huawei_bi_tag: None, } } } @@ -475,4 +499,38 @@ impl Default for AggregationType { Self::Sum } } +/// Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum HuaweiCategoryType { + #[serde(rename = "IM")] + IM, + #[serde(rename = "VOIP")] + VOIP, + #[serde(rename = "SUBSCRIPTION")] + SUBSCRIPTION, + #[serde(rename = "TRAVEL")] + TRAVEL, + #[serde(rename = "HEALTH")] + HEALTH, + #[serde(rename = "WORK")] + WORK, + #[serde(rename = "ACCOUNT")] + ACCOUNT, + #[serde(rename = "EXPRESS")] + EXPRESS, + #[serde(rename = "FINANCE")] + FINANCE, + #[serde(rename = "DEVICE_REMINDER")] + DEVICEREMINDER, + #[serde(rename = "MAIL")] + MAIL, + #[serde(rename = "MARKETING")] + MARKETING, +} + +impl Default for HuaweiCategoryType { + fn default() -> HuaweiCategoryType { + Self::IM + } +} diff --git a/src/models/basic_notification_all_of.rs b/src/models/basic_notification_all_of.rs index f25cf74..73d3e5b 100644 --- a/src/models/basic_notification_all_of.rs +++ b/src/models/basic_notification_all_of.rs @@ -270,6 +270,9 @@ pub struct BasicNotificationAllOf { /// Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. #[serde(rename = "email_from_address", skip_serializing_if = "Option::is_none")] pub email_from_address: Option, + /// Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. + #[serde(rename = "email_reply_to_address", skip_serializing_if = "Option::is_none")] + pub email_reply_to_address: Option, /// Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. #[serde(rename = "email_preheader", skip_serializing_if = "Option::is_none")] pub email_preheader: Option, @@ -290,6 +293,21 @@ pub struct BasicNotificationAllOf { /// Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} #[serde(rename = "custom_data", skip_serializing_if = "Option::is_none")] pub custom_data: Option, + /// Channel: Push Notifications Platform: Huawei Full path of the app entry activity class + #[serde(rename = "huawei_badge_class", skip_serializing_if = "Option::is_none")] + pub huawei_badge_class: Option, + /// Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 + #[serde(rename = "huawei_badge_add_num", skip_serializing_if = "Option::is_none")] + pub huawei_badge_add_num: Option, + /// Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 + #[serde(rename = "huawei_badge_set_num", skip_serializing_if = "Option::is_none")] + pub huawei_badge_set_num: Option, + /// Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. + #[serde(rename = "huawei_category", skip_serializing_if = "Option::is_none")] + pub huawei_category: Option, + /// Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. + #[serde(rename = "huawei_bi_tag", skip_serializing_if = "Option::is_none")] + pub huawei_bi_tag: Option, } impl BasicNotificationAllOf { @@ -383,6 +401,7 @@ impl BasicNotificationAllOf { email_body: None, email_from_name: None, email_from_address: None, + email_reply_to_address: None, email_preheader: None, disable_email_click_tracking: None, include_unsubscribed: None, @@ -390,6 +409,11 @@ impl BasicNotificationAllOf { sms_media_urls: None, filters: None, custom_data: None, + huawei_badge_class: None, + huawei_badge_add_num: None, + huawei_badge_set_num: None, + huawei_category: None, + huawei_bi_tag: None, } } } @@ -408,4 +432,38 @@ impl Default for AggregationType { Self::Sum } } +/// Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum HuaweiCategoryType { + #[serde(rename = "IM")] + IM, + #[serde(rename = "VOIP")] + VOIP, + #[serde(rename = "SUBSCRIPTION")] + SUBSCRIPTION, + #[serde(rename = "TRAVEL")] + TRAVEL, + #[serde(rename = "HEALTH")] + HEALTH, + #[serde(rename = "WORK")] + WORK, + #[serde(rename = "ACCOUNT")] + ACCOUNT, + #[serde(rename = "EXPRESS")] + EXPRESS, + #[serde(rename = "FINANCE")] + FINANCE, + #[serde(rename = "DEVICE_REMINDER")] + DEVICEREMINDER, + #[serde(rename = "MAIL")] + MAIL, + #[serde(rename = "MARKETING")] + MARKETING, +} + +impl Default for HuaweiCategoryType { + fn default() -> HuaweiCategoryType { + Self::IM + } +} diff --git a/src/models/notification.rs b/src/models/notification.rs index f405cb3..cb2d8ce 100644 --- a/src/models/notification.rs +++ b/src/models/notification.rs @@ -308,6 +308,9 @@ pub struct Notification { /// Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. #[serde(rename = "email_from_address", skip_serializing_if = "Option::is_none")] pub email_from_address: Option, + /// Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. + #[serde(rename = "email_reply_to_address", skip_serializing_if = "Option::is_none")] + pub email_reply_to_address: Option, /// Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. #[serde(rename = "email_preheader", skip_serializing_if = "Option::is_none")] pub email_preheader: Option, @@ -328,6 +331,21 @@ pub struct Notification { /// Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} #[serde(rename = "custom_data", skip_serializing_if = "Option::is_none")] pub custom_data: Option, + /// Channel: Push Notifications Platform: Huawei Full path of the app entry activity class + #[serde(rename = "huawei_badge_class", skip_serializing_if = "Option::is_none")] + pub huawei_badge_class: Option, + /// Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 + #[serde(rename = "huawei_badge_add_num", skip_serializing_if = "Option::is_none")] + pub huawei_badge_add_num: Option, + /// Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 + #[serde(rename = "huawei_badge_set_num", skip_serializing_if = "Option::is_none")] + pub huawei_badge_set_num: Option, + /// Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. + #[serde(rename = "huawei_category", skip_serializing_if = "Option::is_none")] + pub huawei_category: Option, + /// Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. + #[serde(rename = "huawei_bi_tag", skip_serializing_if = "Option::is_none")] + pub huawei_bi_tag: Option, /// Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. #[serde(rename = "send_after", skip_serializing_if = "Option::is_none")] pub send_after: Option, @@ -437,6 +455,7 @@ impl Notification { email_body: None, email_from_name: None, email_from_address: None, + email_reply_to_address: None, email_preheader: None, disable_email_click_tracking: None, include_unsubscribed: None, @@ -444,6 +463,11 @@ impl Notification { sms_media_urls: None, filters: None, custom_data: None, + huawei_badge_class: None, + huawei_badge_add_num: None, + huawei_badge_set_num: None, + huawei_category: None, + huawei_bi_tag: None, send_after: None, } } @@ -479,4 +503,38 @@ impl Default for AggregationType { Self::Sum } } +/// Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum HuaweiCategoryType { + #[serde(rename = "IM")] + IM, + #[serde(rename = "VOIP")] + VOIP, + #[serde(rename = "SUBSCRIPTION")] + SUBSCRIPTION, + #[serde(rename = "TRAVEL")] + TRAVEL, + #[serde(rename = "HEALTH")] + HEALTH, + #[serde(rename = "WORK")] + WORK, + #[serde(rename = "ACCOUNT")] + ACCOUNT, + #[serde(rename = "EXPRESS")] + EXPRESS, + #[serde(rename = "FINANCE")] + FINANCE, + #[serde(rename = "DEVICE_REMINDER")] + DEVICEREMINDER, + #[serde(rename = "MAIL")] + MAIL, + #[serde(rename = "MARKETING")] + MARKETING, +} + +impl Default for HuaweiCategoryType { + fn default() -> HuaweiCategoryType { + Self::IM + } +} diff --git a/src/models/notification_with_meta.rs b/src/models/notification_with_meta.rs index fa4a509..6c6ed24 100644 --- a/src/models/notification_with_meta.rs +++ b/src/models/notification_with_meta.rs @@ -308,6 +308,9 @@ pub struct NotificationWithMeta { /// Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. #[serde(rename = "email_from_address", skip_serializing_if = "Option::is_none")] pub email_from_address: Option, + /// Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. + #[serde(rename = "email_reply_to_address", skip_serializing_if = "Option::is_none")] + pub email_reply_to_address: Option, /// Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. #[serde(rename = "email_preheader", skip_serializing_if = "Option::is_none")] pub email_preheader: Option, @@ -328,6 +331,21 @@ pub struct NotificationWithMeta { /// Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} #[serde(rename = "custom_data", skip_serializing_if = "Option::is_none")] pub custom_data: Option, + /// Channel: Push Notifications Platform: Huawei Full path of the app entry activity class + #[serde(rename = "huawei_badge_class", skip_serializing_if = "Option::is_none")] + pub huawei_badge_class: Option, + /// Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 + #[serde(rename = "huawei_badge_add_num", skip_serializing_if = "Option::is_none")] + pub huawei_badge_add_num: Option, + /// Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 + #[serde(rename = "huawei_badge_set_num", skip_serializing_if = "Option::is_none")] + pub huawei_badge_set_num: Option, + /// Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. + #[serde(rename = "huawei_category", skip_serializing_if = "Option::is_none")] + pub huawei_category: Option, + /// Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. + #[serde(rename = "huawei_bi_tag", skip_serializing_if = "Option::is_none")] + pub huawei_bi_tag: Option, /// Number of notifications that were successfully delivered. #[serde(rename = "successful", skip_serializing_if = "Option::is_none")] pub successful: Option, @@ -468,6 +486,7 @@ impl NotificationWithMeta { email_body: None, email_from_name: None, email_from_address: None, + email_reply_to_address: None, email_preheader: None, disable_email_click_tracking: None, include_unsubscribed: None, @@ -475,6 +494,11 @@ impl NotificationWithMeta { sms_media_urls: None, filters: None, custom_data: None, + huawei_badge_class: None, + huawei_badge_add_num: None, + huawei_badge_set_num: None, + huawei_category: None, + huawei_bi_tag: None, successful: None, failed: None, errored: None, @@ -521,4 +545,38 @@ impl Default for AggregationType { Self::Sum } } +/// Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum HuaweiCategoryType { + #[serde(rename = "IM")] + IM, + #[serde(rename = "VOIP")] + VOIP, + #[serde(rename = "SUBSCRIPTION")] + SUBSCRIPTION, + #[serde(rename = "TRAVEL")] + TRAVEL, + #[serde(rename = "HEALTH")] + HEALTH, + #[serde(rename = "WORK")] + WORK, + #[serde(rename = "ACCOUNT")] + ACCOUNT, + #[serde(rename = "EXPRESS")] + EXPRESS, + #[serde(rename = "FINANCE")] + FINANCE, + #[serde(rename = "DEVICE_REMINDER")] + DEVICEREMINDER, + #[serde(rename = "MAIL")] + MAIL, + #[serde(rename = "MARKETING")] + MARKETING, +} + +impl Default for HuaweiCategoryType { + fn default() -> HuaweiCategoryType { + Self::IM + } +}