diff --git a/Cargo.toml b/Cargo.toml index 67d27d9..b960f7c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "onesignal-rust-api" -version = "5.6.0" +version = "5.7.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" @@ -11,6 +11,9 @@ serde = "^1.0" serde_derive = "^1.0" serde_json = "^1.0" url = "^2.2" +uuid = { version = "^1.0", features = ["v4"] } +tokio = { version = "^1.0", features = ["time"] } + [dependencies.reqwest] version = "^0.11" features = ["json", "multipart"] diff --git a/README.md b/README.md index 77094eb..bf0a870 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,15 @@ A powerful way to send personalized messages at scale and build effective custom For more information, please visit [https://onesignal.com](https://onesignal.com) -- API version: 5.6.0 -- Package version: 5.6.0 +- API version: 5.7.0 +- Package version: 5.7.0 ## Installation Add to `Cargo.toml` under `[dependencies]`: ```toml -onesignal-rust-api = "5.6.0" +onesignal-rust-api = "5.7.0" ``` ## Configuration diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index fc7e0b4..6ad705e 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -62,9 +62,16 @@ Every operation requires either a **REST API Key** (App-scoped, used by ~77% of `POST /notifications` accepts a top-level `idempotency_key` (UUIDv4) that the server uses for request dedup within a **30-day window**. Pass a freshly-generated UUID per logical send so that network-level retries are safe. Never reuse a key across distinct sends — the server returns the original response instead of acting on the new payload. The hero `create_notification` example below demonstrates the call. +Prefer the bundled `helpers::create_notification_with_retry` helper over wiring this up by hand: it generates the key when absent (a caller-provided key is respected), retries 429 / 503 / connect/timeout errors with the **same** key (honoring `Retry-After`, exponential backoff otherwise; `max_retries` / `base_delay` configurable via the options struct), fails fast on other errors, and reports via `was_replayed` whether the server answered from a previously completed request (`Idempotent-Replayed` response header): + +```rust +let result = onesignal_rust_api::helpers::create_notification_with_retry(&configuration, &mut notification, None).await?; +println!("{:?} replayed={}", result.response.id, result.was_replayed); +``` + ### Error handling -When a request fails, the future resolves to `Err(onesignal_rust_api::apis::Error<...>)`. Pattern-match on the `Error::ResponseError(content)` variant to access `content.status` (`reqwest::StatusCode`, the HTTP status code) and `content.content` (`String`, the raw JSON envelope). Other `Error` variants (`Reqwest`, `Serde`, `Io`) indicate transport or deserialization failures and don't carry a response body. Most envelopes match `{ "errors": ["..."] }` (an array of strings) but a few endpoints return `{ "errors": [{"code": ..., "title": ..., "meta": {...}}] }` (an array of structured error objects — used by `POST /apps/{app_id}/users` 409 conflict, see `CreateUserConflictResponse`), `{ "errors": "..." }` (string), or `{ "success": false }` (no `errors` field at all). Robust error-handling code should tolerate all four shapes. +When a request fails, the future resolves to `Err(onesignal_rust_api::apis::Error<...>)`. Pattern-match on the `Error::ResponseError(content)` variant to access `content.status` (`reqwest::StatusCode`, the HTTP status code) and `content.content` (`String`, the raw JSON envelope). Other `Error` variants (`Reqwest`, `Serde`, `Io`) indicate transport or deserialization failures and don't carry a response body. Most envelopes match `{ "errors": ["..."] }` (an array of strings) but a few endpoints return `{ "errors": [{"code": ..., "title": ..., "meta": {...}}] }` (an array of structured error objects — used by `POST /apps/{app_id}/users` 409 conflict, see `CreateUserConflictResponse`), `{ "errors": "..." }` (string), or `{ "success": false }` (no `errors` field at all). Robust error-handling code should tolerate all four shapes. The `e.error_messages()` method does this for you, normalizing every shape to a flat `Vec` (empty for non-response errors or a body with no `errors`). ### Polymorphic 200 from POST /notifications @@ -105,9 +112,10 @@ async fn main() { match default_api::cancel_notification(&configuration, app_id, notification_id).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("cancel_notification failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("cancel_notification failed: {:?}", e.error_messages()); } Err(e) => eprintln!("cancel_notification failed: {:?}", e), } @@ -167,9 +175,10 @@ async fn main() { match default_api::copy_template_to_app(&configuration, template_id, app_id, copy_template_request).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("copy_template_to_app failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("copy_template_to_app failed: {:?}", e.error_messages()); } Err(e) => eprintln!("copy_template_to_app failed: {:?}", e), } @@ -231,9 +240,10 @@ async fn main() { match default_api::create_alias(&configuration, app_id, alias_label, alias_id, user_identity_body).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("create_alias failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("create_alias failed: {:?}", e.error_messages()); } Err(e) => eprintln!("create_alias failed: {:?}", e), } @@ -295,9 +305,10 @@ async fn main() { match default_api::create_alias_by_subscription(&configuration, app_id, subscription_id, user_identity_body).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("create_alias_by_subscription failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("create_alias_by_subscription failed: {:?}", e.error_messages()); } Err(e) => eprintln!("create_alias_by_subscription failed: {:?}", e), } @@ -357,9 +368,10 @@ async fn main() { match default_api::create_api_key(&configuration, app_id, create_api_key_request).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("create_api_key failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("create_api_key failed: {:?}", e.error_messages()); } Err(e) => eprintln!("create_api_key failed: {:?}", e), } @@ -417,9 +429,10 @@ async fn main() { match default_api::create_app(&configuration, app).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("create_app failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("create_app failed: {:?}", e.error_messages()); } Err(e) => eprintln!("create_app failed: {:?}", e), } @@ -477,9 +490,10 @@ async fn main() { match default_api::create_custom_events(&configuration, app_id, custom_events_request).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("create_custom_events failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("create_custom_events failed: {:?}", e.error_messages()); } Err(e) => eprintln!("create_custom_events failed: {:?}", e), } @@ -577,6 +591,50 @@ async fn main() { } ``` +#### Using `helpers::create_notification_with_retry` (preferred for safe, idempotent retries) + +The `create_notification_with_retry` helper mirrors `create_notification` but generates the `idempotency_key` for you, transparently retries transient failures (HTTP 429 / 503 / connect/timeout errors) with the **same** key, and reports via `was_replayed` whether the server answered from a previously-completed request. + +```rust +use onesignal_rust_api::apis::configuration::Configuration; +use onesignal_rust_api::helpers; +use onesignal_rust_api::models::notification::TargetChannelType; +use onesignal_rust_api::models::{LanguageStringMap, Notification}; + +#[tokio::main] +async fn main() { + let mut configuration = Configuration::new(); + configuration.rest_api_key_token = Some("YOUR_REST_API_KEY".to_string()); + + let mut notification = Notification::new("YOUR_APP_ID".to_string()); + notification.contents = Some(Box::new(LanguageStringMap { + en: Some("Hello from OneSignal!".to_string()), + ..Default::default() + })); + let mut aliases = std::collections::HashMap::new(); + aliases.insert( + "external_id".to_string(), + vec!["YOUR_USER_EXTERNAL_ID".to_string()], + ); + notification.include_aliases = Some(aliases); + notification.target_channel = Some(TargetChannelType::Push); + // No idempotency_key set: the helper generates a UUIDv4 and reuses it across retries. + + // Pass None for default retry options (3 retries, 1s backoff base), or + // Some(CreateNotificationWithRetryOptions { .. }) to override. + match helpers::create_notification_with_retry(&configuration, &mut notification, None).await { + Ok(result) => { + if result.was_replayed { + println!("Server replayed a prior send (no duplicate): {:?}", result.response.id); + } else { + println!("Notification created: {:?}", result.response.id); + } + } + Err(e) => eprintln!("create_notification_with_retry failed: {:?}", e), + } +} +``` + ### Parameters @@ -628,9 +686,10 @@ async fn main() { match default_api::create_segment(&configuration, app_id, segment).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("create_segment failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("create_segment failed: {:?}", e.error_messages()); } Err(e) => eprintln!("create_segment failed: {:?}", e), } @@ -691,9 +750,10 @@ async fn main() { match default_api::create_subscription(&configuration, app_id, alias_label, alias_id, subscription_body).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("create_subscription failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("create_subscription failed: {:?}", e.error_messages()); } Err(e) => eprintln!("create_subscription failed: {:?}", e), } @@ -753,9 +813,10 @@ async fn main() { match default_api::create_template(&configuration, create_template_request).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("create_template failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("create_template failed: {:?}", e.error_messages()); } Err(e) => eprintln!("create_template failed: {:?}", e), } @@ -813,9 +874,10 @@ async fn main() { match default_api::create_user(&configuration, app_id, user).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("create_user failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("create_user failed: {:?}", e.error_messages()); } Err(e) => eprintln!("create_user failed: {:?}", e), } @@ -874,9 +936,10 @@ async fn main() { match default_api::delete_alias(&configuration, app_id, alias_label, alias_id, alias_label_to_delete).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("delete_alias failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("delete_alias failed: {:?}", e.error_messages()); } Err(e) => eprintln!("delete_alias failed: {:?}", e), } @@ -935,9 +998,10 @@ async fn main() { match default_api::delete_api_key(&configuration, app_id, token_id).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("delete_api_key failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("delete_api_key failed: {:?}", e.error_messages()); } Err(e) => eprintln!("delete_api_key failed: {:?}", e), } @@ -994,9 +1058,10 @@ async fn main() { match default_api::delete_segment(&configuration, app_id, segment_id).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("delete_segment failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("delete_segment failed: {:?}", e.error_messages()); } Err(e) => eprintln!("delete_segment failed: {:?}", e), } @@ -1053,9 +1118,10 @@ async fn main() { match default_api::delete_subscription(&configuration, app_id, subscription_id).await { Ok(_) => println!("delete_subscription succeeded"), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("delete_subscription failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("delete_subscription failed: {:?}", e.error_messages()); } Err(e) => eprintln!("delete_subscription failed: {:?}", e), } @@ -1112,9 +1178,10 @@ async fn main() { match default_api::delete_template(&configuration, template_id, app_id).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("delete_template failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("delete_template failed: {:?}", e.error_messages()); } Err(e) => eprintln!("delete_template failed: {:?}", e), } @@ -1172,9 +1239,10 @@ async fn main() { match default_api::delete_user(&configuration, app_id, alias_label, alias_id).await { Ok(_) => println!("delete_user succeeded"), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("delete_user failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("delete_user failed: {:?}", e.error_messages()); } Err(e) => eprintln!("delete_user failed: {:?}", e), } @@ -1232,9 +1300,10 @@ async fn main() { match default_api::export_events(&configuration, notification_id, app_id).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("export_events failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("export_events failed: {:?}", e.error_messages()); } Err(e) => eprintln!("export_events failed: {:?}", e), } @@ -1293,9 +1362,10 @@ async fn main() { match default_api::export_subscriptions(&configuration, app_id, export_subscriptions_request_body).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("export_subscriptions failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("export_subscriptions failed: {:?}", e.error_messages()); } Err(e) => eprintln!("export_subscriptions failed: {:?}", e), } @@ -1353,9 +1423,10 @@ async fn main() { match default_api::get_aliases(&configuration, app_id, alias_label, alias_id).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("get_aliases failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("get_aliases failed: {:?}", e.error_messages()); } Err(e) => eprintln!("get_aliases failed: {:?}", e), } @@ -1413,9 +1484,10 @@ async fn main() { match default_api::get_aliases_by_subscription(&configuration, app_id, subscription_id).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("get_aliases_by_subscription failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("get_aliases_by_subscription failed: {:?}", e.error_messages()); } Err(e) => eprintln!("get_aliases_by_subscription failed: {:?}", e), } @@ -1471,9 +1543,10 @@ async fn main() { match default_api::get_app(&configuration, app_id).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("get_app failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("get_app failed: {:?}", e.error_messages()); } Err(e) => eprintln!("get_app failed: {:?}", e), } @@ -1525,9 +1598,10 @@ async fn main() { match default_api::get_apps(&configuration).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("get_apps failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("get_apps failed: {:?}", e.error_messages()); } Err(e) => eprintln!("get_apps failed: {:?}", e), } @@ -1580,9 +1654,10 @@ async fn main() { match default_api::get_notification(&configuration, app_id, notification_id).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("get_notification failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("get_notification failed: {:?}", e.error_messages()); } Err(e) => eprintln!("get_notification failed: {:?}", e), } @@ -1641,9 +1716,10 @@ async fn main() { match default_api::get_notification_history(&configuration, notification_id, get_notification_history_request_body).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("get_notification_history failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("get_notification_history failed: {:?}", e.error_messages()); } Err(e) => eprintln!("get_notification_history failed: {:?}", e), } @@ -1702,9 +1778,10 @@ async fn main() { match default_api::get_notifications(&configuration, app_id, limit, offset, kind).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("get_notifications failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("get_notifications failed: {:?}", e.error_messages()); } Err(e) => eprintln!("get_notifications failed: {:?}", e), } @@ -1767,9 +1844,10 @@ async fn main() { match default_api::get_outcomes(&configuration, app_id, outcome_names, outcome_names2, outcome_time_range, outcome_platforms, outcome_attribution).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("get_outcomes failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("get_outcomes failed: {:?}", e.error_messages()); } Err(e) => eprintln!("get_outcomes failed: {:?}", e), } @@ -1831,9 +1909,10 @@ async fn main() { match default_api::get_segments(&configuration, app_id, offset, limit).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("get_segments failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("get_segments failed: {:?}", e.error_messages()); } Err(e) => eprintln!("get_segments failed: {:?}", e), } @@ -1892,9 +1971,10 @@ async fn main() { match default_api::get_user(&configuration, app_id, alias_label, alias_id).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("get_user failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("get_user failed: {:?}", e.error_messages()); } Err(e) => eprintln!("get_user failed: {:?}", e), } @@ -1952,9 +2032,10 @@ async fn main() { match default_api::rotate_api_key(&configuration, app_id, token_id).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("rotate_api_key failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("rotate_api_key failed: {:?}", e.error_messages()); } Err(e) => eprintln!("rotate_api_key failed: {:?}", e), } @@ -2014,9 +2095,10 @@ async fn main() { match default_api::start_live_activity(&configuration, app_id, activity_type, start_live_activity_request).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("start_live_activity failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("start_live_activity failed: {:?}", e.error_messages()); } Err(e) => eprintln!("start_live_activity failed: {:?}", e), } @@ -2077,9 +2159,10 @@ async fn main() { match default_api::transfer_subscription(&configuration, app_id, subscription_id, transfer_subscription_request_body).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("transfer_subscription failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("transfer_subscription failed: {:?}", e.error_messages()); } Err(e) => eprintln!("transfer_subscription failed: {:?}", e), } @@ -2138,9 +2221,10 @@ async fn main() { match default_api::unsubscribe_email_with_token(&configuration, app_id, notification_id, token).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("unsubscribe_email_with_token failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("unsubscribe_email_with_token failed: {:?}", e.error_messages()); } Err(e) => eprintln!("unsubscribe_email_with_token failed: {:?}", e), } @@ -2201,9 +2285,10 @@ async fn main() { match default_api::update_api_key(&configuration, app_id, token_id, update_api_key_request).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("update_api_key failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("update_api_key failed: {:?}", e.error_messages()); } Err(e) => eprintln!("update_api_key failed: {:?}", e), } @@ -2263,9 +2348,10 @@ async fn main() { match default_api::update_app(&configuration, app_id, app).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("update_app failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("update_app failed: {:?}", e.error_messages()); } Err(e) => eprintln!("update_app failed: {:?}", e), } @@ -2325,9 +2411,10 @@ async fn main() { match default_api::update_live_activity(&configuration, app_id, activity_id, update_live_activity_request).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("update_live_activity failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("update_live_activity failed: {:?}", e.error_messages()); } Err(e) => eprintln!("update_live_activity failed: {:?}", e), } @@ -2388,9 +2475,10 @@ async fn main() { match default_api::update_subscription(&configuration, app_id, subscription_id, subscription_body).await { Ok(_) => println!("update_subscription succeeded"), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("update_subscription failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("update_subscription failed: {:?}", e.error_messages()); } Err(e) => eprintln!("update_subscription failed: {:?}", e), } @@ -2452,9 +2540,10 @@ async fn main() { match default_api::update_subscription_by_token(&configuration, app_id, token_type, token, subscription_body).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("update_subscription_by_token failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("update_subscription_by_token failed: {:?}", e.error_messages()); } Err(e) => eprintln!("update_subscription_by_token failed: {:?}", e), } @@ -2516,9 +2605,10 @@ async fn main() { match default_api::update_template(&configuration, template_id, app_id, update_template_request).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("update_template failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("update_template failed: {:?}", e.error_messages()); } Err(e) => eprintln!("update_template failed: {:?}", e), } @@ -2580,9 +2670,10 @@ async fn main() { match default_api::update_user(&configuration, app_id, alias_label, alias_id, update_user_request).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("update_user failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("update_user failed: {:?}", e.error_messages()); } Err(e) => eprintln!("update_user failed: {:?}", e), } @@ -2640,9 +2731,10 @@ async fn main() { match default_api::view_api_keys(&configuration, app_id).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("view_api_keys failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("view_api_keys failed: {:?}", e.error_messages()); } Err(e) => eprintln!("view_api_keys failed: {:?}", e), } @@ -2698,9 +2790,10 @@ async fn main() { match default_api::view_template(&configuration, template_id, app_id).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("view_template failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("view_template failed: {:?}", e.error_messages()); } Err(e) => eprintln!("view_template failed: {:?}", e), } @@ -2759,9 +2852,10 @@ async fn main() { match default_api::view_templates(&configuration, app_id, limit, offset, channel).await { Ok(resp) => println!("{:?}", resp), - Err(onesignal_rust_api::apis::Error::ResponseError(content)) => { - eprintln!("view_templates failed: HTTP {}", content.status); - eprintln!("Response Body: {}", content.content); + Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => { + // `e.error_messages()` flattens any error-envelope shape to a Vec; + // the raw response remains on the ResponseError variant. + eprintln!("view_templates failed: {:?}", e.error_messages()); } Err(e) => eprintln!("view_templates failed: {:?}", e), } diff --git a/src/apis/configuration.rs b/src/apis/configuration.rs index da25338..73477cb 100644 --- a/src/apis/configuration.rs +++ b/src/apis/configuration.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ @@ -45,7 +45,7 @@ impl Default for Configuration { fn default() -> Self { Configuration { base_path: "https://api.onesignal.com".to_owned(), - user_agent: Some("OpenAPI-Generator/5.6.0/rust".to_owned()), + user_agent: Some("OpenAPI-Generator/5.7.0/rust".to_owned()), client: reqwest::Client::new(), basic_auth: None, oauth_access_token: None, diff --git a/src/apis/default_api.rs b/src/apis/default_api.rs index b841cdb..7f8db5a 100644 --- a/src/apis/default_api.rs +++ b/src/apis/default_api.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ @@ -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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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.6.0"); + req_builder = req_builder.header("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-rust, version=5.7.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/apis/mod.rs b/src/apis/mod.rs index 7bb75bd..e87ed69 100644 --- a/src/apis/mod.rs +++ b/src/apis/mod.rs @@ -16,6 +16,63 @@ pub enum Error { ResponseError(ResponseContent), } +impl Error { + /// The error messages carried by the response body, normalized to a flat + /// `Vec` regardless of which envelope shape the API returned + /// (`{"errors": "..."}`, `{"errors": ["..."]}`, + /// `{"errors": [{"code": ..., "title": ...}]}`, or an object map such as + /// `{"errors": {"invalid_aliases": {...}}}`, surfaced as `": "` + /// entries). Returns an empty `Vec` for non-response errors (network, serde, + /// IO) or when the body is not a recognizable error envelope. The raw + /// response remains available on the `ResponseError` variant. + pub fn error_messages(&self) -> Vec { + let content = match self { + Error::ResponseError(response) => &response.content, + _ => return Vec::new(), + }; + + let parsed: serde_json::Value = match serde_json::from_str(content) { + Ok(value) => value, + Err(_) => return Vec::new(), + }; + + match parsed.get("errors") { + Some(serde_json::Value::String(message)) => vec![message.clone()], + Some(serde_json::Value::Array(items)) => items + .iter() + .filter_map(|item| match item { + serde_json::Value::String(message) => Some(message.clone()), + serde_json::Value::Object(object) => object + .get("title") + .filter(|value| !value.is_null() && value.as_str() != Some("")) + .or_else(|| object.get("code")) + .and_then(|value| match value { + serde_json::Value::String(message) => Some(message.clone()), + serde_json::Value::Null => None, + other => Some(other.to_string()), + }), + _ => None, + }) + .collect(), + Some(serde_json::Value::Object(map)) => { + // Object-shaped envelopes (e.g. {"invalid_aliases": {...}}) carry + // data under arbitrary keys; surface each so it isn't silently + // dropped. Key order is unspecified, so sort for deterministic output. + let mut messages: Vec = map + .iter() + .map(|(key, value)| match value { + serde_json::Value::String(message) => format!("{}: {}", key, message), + other => format!("{}: {}", key, other), + }) + .collect(); + messages.sort(); + messages + } + _ => Vec::new(), + } + } +} + impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let (module, e) = match self { diff --git a/src/errors.rs b/src/errors.rs new file mode 100644 index 0000000..4d32d57 --- /dev/null +++ b/src/errors.rs @@ -0,0 +1,20 @@ +// Generated from inputs/api/error-catalog.json. Do not edit by hand. +// +// Sentinel error message strings the OneSignal API can return. Each +// constant equals the literal message the server emits, so you can test +// membership against Error::error_messages() (e.g. NO_TARGETING_SPECIFIED). +// +// Note: 200-status sentinels such as NO_SUBSCRIBERS arrive on a successful +// response, not via the exception accessor — read the response's errors +// field for those. + +/// HTTP 403 | retryable: no | emitted by: any API-key-authenticated endpoint (REST or Organization key) | note: Generic auth-failure message the public api.onesignal.com edge returns for any invalid or mismatched key — REST or Organization — so a single sentinel covers both. Supersedes the Rails-monolith INVALID_REST_API_KEY / INVALID_USER_AUTH_KEY strings, which the public host no longer returns verbatim. Note the double space after 'denied.' +pub const INVALID_API_KEY: &str = "Access denied. Please include an 'Authorization: ...' header with a valid API key (https://documentation.onesignal.com/docs/en/keys-and-ids#api-keys)."; +/// HTTP 400, 404 | retryable: no | emitted by: POST /notifications/{id}/history, POST /notifications/{id}/messages, GET /notifications/{id} (export) | note: Verified live 2026-06-16: GET /notifications/{bogus-uuid} returns 404 with this exact message. +pub const NOTIFICATION_NOT_FOUND: &str = "Notification not found"; +/// HTTP 200 | retryable: no | emitted by: POST /notifications | note: Returned with HTTP 200 OK (id is empty), not an error status. The flagship case for the errorMessages accessor — lets callers distinguish a sent notification from a no-op without parsing the polymorphic 200 body. +pub const NO_SUBSCRIBERS: &str = "All included players are not subscribed"; +/// HTTP 400 | retryable: no | emitted by: POST /notifications | note: Verified live 2026-06-16: a no-targeting POST /notifications returns 400 with this exact message. +pub const NO_TARGETING_SPECIFIED: &str = "You must include which players, segments, or tags you wish to send this notification to."; +/// HTTP 503 | retryable: yes | emitted by: any endpoint (pgbouncer rejection) | note: Transient DB/pgbouncer failure — the canonical retryable sentinel. +pub const SERVICE_UNAVAILABLE: &str = "Service temporarily unavailable"; diff --git a/src/helpers.rs b/src/helpers.rs new file mode 100644 index 0000000..303c7bb --- /dev/null +++ b/src/helpers.rs @@ -0,0 +1,178 @@ +//! Helpers for common OneSignal API usage patterns. + +use std::time::Duration; + +use crate::apis::configuration; +use crate::apis::default_api::CreateNotificationError; +use crate::apis::{Error, ResponseContent}; +use crate::models; + +const RETRYABLE_STATUSES: [u16; 2] = [429, 503]; +const MIN_BASE_DELAY: Duration = Duration::from_secs(1); +const MAX_BASE_DELAY: Duration = Duration::from_secs(60); + +/// Options for [`create_notification_with_retry`]. +#[derive(Debug, Clone)] +pub struct CreateNotificationWithRetryOptions { + /// Retries after the initial attempt. Default 3. + pub max_retries: u32, + /// Backoff base used when the response carries no `Retry-After` header. + /// Clamped to [1s, 60s]. Default 1s. + pub base_delay: Duration, +} + +impl Default for CreateNotificationWithRetryOptions { + fn default() -> Self { + Self { + max_retries: 3, + base_delay: Duration::from_secs(1), + } + } +} + +/// Result of [`create_notification_with_retry`]: the create response plus +/// whether the server replayed a previously completed request +/// (`Idempotent-Replayed` response header). +#[derive(Debug, Clone)] +pub struct CreateNotificationWithRetryResult { + pub response: models::CreateNotificationSuccessResponse, + pub was_replayed: bool, +} + +enum AttemptOutcome { + Fatal(Error), + Retryable(Error, Option), +} + +/// Create a notification with safe, idempotent retries. +/// +/// Ensures `notification.idempotency_key` is set (generating a UUIDv4 when +/// absent) so the server can deduplicate, then posts to `/notifications`. +/// Transient failures (HTTP 429, HTTP 503, or connect/timeout errors) are +/// retried with the SAME idempotency key, honoring the `Retry-After` response +/// header when present and falling back to exponential backoff +/// (`base_delay * 2^attempt`) otherwise. Other errors are returned +/// immediately. An existing idempotency key is respected, never overwritten. +/// +/// NOTE: the request logic below mirrors `apis::default_api::create_notification` +/// (which does not expose response headers); keep the two in sync when the +/// generated operation changes. +pub async fn create_notification_with_retry( + configuration: &configuration::Configuration, + notification: &mut models::Notification, + options: Option, +) -> Result> { + let opts = options.unwrap_or_default(); + // Clamp the backoff base so a stray value can neither hammer the API (too + // small) nor stall the caller for an unbounded stretch (too large). + let base_delay = opts.base_delay.clamp(MIN_BASE_DELAY, MAX_BASE_DELAY); + + if notification + .idempotency_key + .as_deref() + .map_or(true, |key| key.is_empty()) + { + notification.idempotency_key = Some(uuid::Uuid::new_v4().to_string()); + } + + let mut attempt: u32 = 0; + loop { + match send_once(configuration, notification).await { + Ok(result) => return Ok(result), + Err(AttemptOutcome::Fatal(error)) => return Err(error), + Err(AttemptOutcome::Retryable(error, retry_after)) => { + if attempt >= opts.max_retries { + return Err(error); + } + let delay = + retry_after.unwrap_or_else(|| base_delay * 2u32.saturating_pow(attempt)); + if !delay.is_zero() { + tokio::time::sleep(delay).await; + } + attempt += 1; + } + } + } +} + +async fn send_once( + configuration: &configuration::Configuration, + notification: &models::Notification, +) -> Result { + let client = &configuration.client; + + let uri_str = format!("{}/notifications", configuration.base_path); + let mut req_builder = client.request(reqwest::Method::POST, uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + // Adds a telemetry header + req_builder = req_builder.header( + "OS-Usage-Data", + concat!( + "kind=sdk, sdk-name=onesignal-rust, version=", + env!("CARGO_PKG_VERSION") + ), + ); + + if let Some(ref token) = configuration.rest_api_key_token { + req_builder = req_builder.header("Authorization", format!("Key {}", token.to_owned())); + } + req_builder = req_builder.json(notification); + + let req = req_builder + .build() + .map_err(|e| AttemptOutcome::Fatal(Error::Reqwest(e)))?; + let resp = match client.execute(req).await { + Ok(resp) => resp, + Err(e) => { + return Err(if e.is_timeout() || e.is_connect() { + AttemptOutcome::Retryable(Error::Reqwest(e), None) + } else { + AttemptOutcome::Fatal(Error::Reqwest(e)) + }); + } + }; + + let status = resp.status(); + let was_replayed = header_value(&resp, "idempotent-replayed") + .map_or(false, |value| value.trim().eq_ignore_ascii_case("true")); + let retry_after = header_value(&resp, "retry-after") + .and_then(|value| value.trim().parse::().ok()) + .map(Duration::from_secs); + + let content = resp + .text() + .await + .map_err(|e| AttemptOutcome::Fatal(Error::Reqwest(e)))?; + + if !status.is_client_error() && !status.is_server_error() { + let response = serde_json::from_str(&content) + .map_err(|e| AttemptOutcome::Fatal(Error::Serde(e)))?; + Ok(CreateNotificationWithRetryResult { + response, + was_replayed, + }) + } else { + let entity: Option = serde_json::from_str(&content).ok(); + let error = Error::ResponseError(ResponseContent { + status, + content, + entity, + }); + Err(if RETRYABLE_STATUSES.contains(&status.as_u16()) { + AttemptOutcome::Retryable(error, retry_after) + } else { + AttemptOutcome::Fatal(error) + }) + } +} + +fn header_value(resp: &reqwest::Response, name: &str) -> Option { + resp.headers() + .get(name) + .and_then(|value| value.to_str().ok()) + .map(|value| value.to_owned()) +} diff --git a/src/lib.rs b/src/lib.rs index c1dd666..e4c6fd5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,4 +7,6 @@ extern crate url; extern crate reqwest; pub mod apis; +pub mod helpers; pub mod models; +pub mod errors; diff --git a/src/models/api_key_token.rs b/src/models/api_key_token.rs index add5132..15178bc 100644 --- a/src/models/api_key_token.rs +++ b/src/models/api_key_token.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/api_key_tokens_list_response.rs b/src/models/api_key_tokens_list_response.rs index fe5c6be..b4d67ad 100644 --- a/src/models/api_key_tokens_list_response.rs +++ b/src/models/api_key_tokens_list_response.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/app.rs b/src/models/app.rs index e859861..75a5611 100644 --- a/src/models/app.rs +++ b/src/models/app.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/basic_notification.rs b/src/models/basic_notification.rs index 2e7b86d..0a4490f 100644 --- a/src/models/basic_notification.rs +++ b/src/models/basic_notification.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/basic_notification_all_of.rs b/src/models/basic_notification_all_of.rs index 494c96a..888dbd9 100644 --- a/src/models/basic_notification_all_of.rs +++ b/src/models/basic_notification_all_of.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/basic_notification_all_of_android_background_layout.rs b/src/models/basic_notification_all_of_android_background_layout.rs index 2280233..19180f0 100644 --- a/src/models/basic_notification_all_of_android_background_layout.rs +++ b/src/models/basic_notification_all_of_android_background_layout.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/button.rs b/src/models/button.rs index 9ff0dfb..462bffd 100644 --- a/src/models/button.rs +++ b/src/models/button.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/copy_template_request.rs b/src/models/copy_template_request.rs index 3d774ec..882b929 100644 --- a/src/models/copy_template_request.rs +++ b/src/models/copy_template_request.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/create_api_key_request.rs b/src/models/create_api_key_request.rs index 94feb0a..6037d5e 100644 --- a/src/models/create_api_key_request.rs +++ b/src/models/create_api_key_request.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/create_api_key_response.rs b/src/models/create_api_key_response.rs index 9042d84..af71b03 100644 --- a/src/models/create_api_key_response.rs +++ b/src/models/create_api_key_response.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/create_notification_success_response.rs b/src/models/create_notification_success_response.rs index 3ae568f..5873529 100644 --- a/src/models/create_notification_success_response.rs +++ b/src/models/create_notification_success_response.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/create_segment_conflict_response.rs b/src/models/create_segment_conflict_response.rs index 9432e95..1caa7c9 100644 --- a/src/models/create_segment_conflict_response.rs +++ b/src/models/create_segment_conflict_response.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/create_segment_success_response.rs b/src/models/create_segment_success_response.rs index 185f65c..5dfaded 100644 --- a/src/models/create_segment_success_response.rs +++ b/src/models/create_segment_success_response.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/create_template_request.rs b/src/models/create_template_request.rs index b21273f..85d8e17 100644 --- a/src/models/create_template_request.rs +++ b/src/models/create_template_request.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/create_user_conflict_response.rs b/src/models/create_user_conflict_response.rs index 8770d5c..6b638ea 100644 --- a/src/models/create_user_conflict_response.rs +++ b/src/models/create_user_conflict_response.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/create_user_conflict_response_errors_inner.rs b/src/models/create_user_conflict_response_errors_inner.rs index faee0fc..0c39dae 100644 --- a/src/models/create_user_conflict_response_errors_inner.rs +++ b/src/models/create_user_conflict_response_errors_inner.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/create_user_conflict_response_errors_items_meta.rs b/src/models/create_user_conflict_response_errors_items_meta.rs index 3405b8c..545300b 100644 --- a/src/models/create_user_conflict_response_errors_items_meta.rs +++ b/src/models/create_user_conflict_response_errors_items_meta.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/custom_event.rs b/src/models/custom_event.rs index d9e09a8..13ad2e6 100644 --- a/src/models/custom_event.rs +++ b/src/models/custom_event.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/custom_events_request.rs b/src/models/custom_events_request.rs index c485e58..c90e018 100644 --- a/src/models/custom_events_request.rs +++ b/src/models/custom_events_request.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/delivery_data.rs b/src/models/delivery_data.rs index 8b925d9..897e3d5 100644 --- a/src/models/delivery_data.rs +++ b/src/models/delivery_data.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/export_events_success_response.rs b/src/models/export_events_success_response.rs index 3ff46a7..e4d8df6 100644 --- a/src/models/export_events_success_response.rs +++ b/src/models/export_events_success_response.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/export_subscriptions_request_body.rs b/src/models/export_subscriptions_request_body.rs index 258f337..94addf3 100644 --- a/src/models/export_subscriptions_request_body.rs +++ b/src/models/export_subscriptions_request_body.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/export_subscriptions_success_response.rs b/src/models/export_subscriptions_success_response.rs index a718aad..04c39cc 100644 --- a/src/models/export_subscriptions_success_response.rs +++ b/src/models/export_subscriptions_success_response.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/filter.rs b/src/models/filter.rs index 2f6e258..8e79be7 100644 --- a/src/models/filter.rs +++ b/src/models/filter.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/filter_expression.rs b/src/models/filter_expression.rs index 6fb1cf5..c903b09 100644 --- a/src/models/filter_expression.rs +++ b/src/models/filter_expression.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/generic_error.rs b/src/models/generic_error.rs index 37a06b6..566c969 100644 --- a/src/models/generic_error.rs +++ b/src/models/generic_error.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/generic_success_bool_response.rs b/src/models/generic_success_bool_response.rs index 2b34025..72235cf 100644 --- a/src/models/generic_success_bool_response.rs +++ b/src/models/generic_success_bool_response.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/get_notification_history_request_body.rs b/src/models/get_notification_history_request_body.rs index 3068080..b442787 100644 --- a/src/models/get_notification_history_request_body.rs +++ b/src/models/get_notification_history_request_body.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/get_segments_success_response.rs b/src/models/get_segments_success_response.rs index 1f12fe4..8d9c995 100644 --- a/src/models/get_segments_success_response.rs +++ b/src/models/get_segments_success_response.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/language_string_map.rs b/src/models/language_string_map.rs index dcb4efc..b111235 100644 --- a/src/models/language_string_map.rs +++ b/src/models/language_string_map.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/notification.rs b/src/models/notification.rs index 841a587..5f54134 100644 --- a/src/models/notification.rs +++ b/src/models/notification.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/notification_all_of.rs b/src/models/notification_all_of.rs index dde9069..0b775ba 100644 --- a/src/models/notification_all_of.rs +++ b/src/models/notification_all_of.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/notification_history_success_response.rs b/src/models/notification_history_success_response.rs index d590673..bab1d44 100644 --- a/src/models/notification_history_success_response.rs +++ b/src/models/notification_history_success_response.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/notification_slice.rs b/src/models/notification_slice.rs index f999e0b..45516f7 100644 --- a/src/models/notification_slice.rs +++ b/src/models/notification_slice.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/notification_target.rs b/src/models/notification_target.rs index bbe385c..7e3f191 100644 --- a/src/models/notification_target.rs +++ b/src/models/notification_target.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/notification_with_meta.rs b/src/models/notification_with_meta.rs index 3c4250e..30a6561 100644 --- a/src/models/notification_with_meta.rs +++ b/src/models/notification_with_meta.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/notification_with_meta_all_of.rs b/src/models/notification_with_meta_all_of.rs index 48c94e7..0817793 100644 --- a/src/models/notification_with_meta_all_of.rs +++ b/src/models/notification_with_meta_all_of.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/operator.rs b/src/models/operator.rs index 599954d..7e7fb18 100644 --- a/src/models/operator.rs +++ b/src/models/operator.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/outcome_data.rs b/src/models/outcome_data.rs index bd4b07a..8d71e3e 100644 --- a/src/models/outcome_data.rs +++ b/src/models/outcome_data.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/outcomes_data.rs b/src/models/outcomes_data.rs index 6eef920..9d87b6a 100644 --- a/src/models/outcomes_data.rs +++ b/src/models/outcomes_data.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/platform_delivery_data.rs b/src/models/platform_delivery_data.rs index 5a81cc5..9d08c7a 100644 --- a/src/models/platform_delivery_data.rs +++ b/src/models/platform_delivery_data.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/platform_delivery_data_email_all_of.rs b/src/models/platform_delivery_data_email_all_of.rs index 9ec4fd6..9c3d060 100644 --- a/src/models/platform_delivery_data_email_all_of.rs +++ b/src/models/platform_delivery_data_email_all_of.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/platform_delivery_data_sms_all_of.rs b/src/models/platform_delivery_data_sms_all_of.rs index 5910b63..c392598 100644 --- a/src/models/platform_delivery_data_sms_all_of.rs +++ b/src/models/platform_delivery_data_sms_all_of.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/properties_body.rs b/src/models/properties_body.rs index 9924310..8613200 100644 --- a/src/models/properties_body.rs +++ b/src/models/properties_body.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/properties_deltas.rs b/src/models/properties_deltas.rs index 3038893..d69ee44 100644 --- a/src/models/properties_deltas.rs +++ b/src/models/properties_deltas.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/properties_object.rs b/src/models/properties_object.rs index c008048..146046b 100644 --- a/src/models/properties_object.rs +++ b/src/models/properties_object.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/purchase.rs b/src/models/purchase.rs index 1657348..340227d 100644 --- a/src/models/purchase.rs +++ b/src/models/purchase.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/rate_limit_error.rs b/src/models/rate_limit_error.rs index 090ca8d..31b40a7 100644 --- a/src/models/rate_limit_error.rs +++ b/src/models/rate_limit_error.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/segment.rs b/src/models/segment.rs index b13f265..4fa80af 100644 --- a/src/models/segment.rs +++ b/src/models/segment.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/segment_data.rs b/src/models/segment_data.rs index 7065ebd..2db13a5 100644 --- a/src/models/segment_data.rs +++ b/src/models/segment_data.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/segment_notification_target.rs b/src/models/segment_notification_target.rs index 8be7ff2..273ae6f 100644 --- a/src/models/segment_notification_target.rs +++ b/src/models/segment_notification_target.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/start_live_activity_request.rs b/src/models/start_live_activity_request.rs index a0542b1..800b3f6 100644 --- a/src/models/start_live_activity_request.rs +++ b/src/models/start_live_activity_request.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/start_live_activity_success_response.rs b/src/models/start_live_activity_success_response.rs index 3449a2e..655db27 100644 --- a/src/models/start_live_activity_success_response.rs +++ b/src/models/start_live_activity_success_response.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/subscription.rs b/src/models/subscription.rs index 647a870..77c4d52 100644 --- a/src/models/subscription.rs +++ b/src/models/subscription.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/subscription_body.rs b/src/models/subscription_body.rs index f196d15..5d55595 100644 --- a/src/models/subscription_body.rs +++ b/src/models/subscription_body.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/subscription_notification_target.rs b/src/models/subscription_notification_target.rs index 2eaedfd..508219c 100644 --- a/src/models/subscription_notification_target.rs +++ b/src/models/subscription_notification_target.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/template_resource.rs b/src/models/template_resource.rs index cec23c6..13030a2 100644 --- a/src/models/template_resource.rs +++ b/src/models/template_resource.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/templates_list_response.rs b/src/models/templates_list_response.rs index b708bcd..70af9ba 100644 --- a/src/models/templates_list_response.rs +++ b/src/models/templates_list_response.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/transfer_subscription_request_body.rs b/src/models/transfer_subscription_request_body.rs index 4b93e1d..c947266 100644 --- a/src/models/transfer_subscription_request_body.rs +++ b/src/models/transfer_subscription_request_body.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/update_api_key_request.rs b/src/models/update_api_key_request.rs index 2707966..08313b8 100644 --- a/src/models/update_api_key_request.rs +++ b/src/models/update_api_key_request.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/update_live_activity_request.rs b/src/models/update_live_activity_request.rs index b266c61..6fbc310 100644 --- a/src/models/update_live_activity_request.rs +++ b/src/models/update_live_activity_request.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/update_live_activity_success_response.rs b/src/models/update_live_activity_success_response.rs index 38b5fa1..ad036e5 100644 --- a/src/models/update_live_activity_success_response.rs +++ b/src/models/update_live_activity_success_response.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/update_template_request.rs b/src/models/update_template_request.rs index 7aa4440..cb6f347 100644 --- a/src/models/update_template_request.rs +++ b/src/models/update_template_request.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/update_user_request.rs b/src/models/update_user_request.rs index 3526b84..c60260e 100644 --- a/src/models/update_user_request.rs +++ b/src/models/update_user_request.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/user.rs b/src/models/user.rs index 7a0a764..f5f758c 100644 --- a/src/models/user.rs +++ b/src/models/user.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/user_identity_body.rs b/src/models/user_identity_body.rs index 278fbbb..2db71c5 100644 --- a/src/models/user_identity_body.rs +++ b/src/models/user_identity_body.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */ diff --git a/src/models/web_button.rs b/src/models/web_button.rs index 994158a..a6dc154 100644 --- a/src/models/web_button.rs +++ b/src/models/web_button.rs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 5.6.0 + * The version of the OpenAPI document: 5.7.0 * Contact: devrel@onesignal.com * Generated by: https://openapi-generator.tech */