From fbad2aef227d2fc3d14a21d91a5c79ce7bdbd963 Mon Sep 17 00:00:00 2001 From: OneSignal Date: Thu, 18 Aug 2022 22:21:20 +0000 Subject: [PATCH] Update Java API --- .../pull_request_template.md | 0 README.md | 8 +- api/openapi.yaml | 192 +- docs/BasicNotification.md | 133 + docs/BasicNotificationAllOf.md | 109 + ...tificationAllOfAndroidBackgroundLayout.md} | 2 +- docs/DeletePlayerBadRequestResponse.md | 2 +- docs/DeletePlayerNotFoundResponse.md | 2 +- docs/DeletePlayerSuccessResponse.md | 2 +- docs/DeliveryData.md | 10 +- docs/ExportPlayersRequestBody.md | 2 +- docs/Notification.md | 4 +- docs/NotificationAllOf.md | 97 - docs/NotificationWithMeta.md | 4 +- docs/PlatformDeliveryData.md | 2 + docs/PlatformDeliveryDataEmailAllOf.md | 19 + docs/PlatformDeliveryDataSmsAllOf.md | 15 + .../com/onesignal/client/ApiException.java | 2 +- .../com/onesignal/client/Configuration.java | 2 +- src/main/java/com/onesignal/client/JSON.java | 6 +- src/main/java/com/onesignal/client/Pair.java | 2 +- .../java/com/onesignal/client/StringUtil.java | 2 +- .../com/onesignal/client/auth/ApiKeyAuth.java | 2 +- .../onesignal/client/auth/HttpBearerAuth.java | 2 +- .../client/model/AbstractOpenApiSchema.java | 2 +- .../java/com/onesignal/client/model/App.java | 16 +- .../client/model/BasicNotification.java | 3694 +++++++++++++++++ .../client/model/BasicNotificationAllOf.java | 2875 +++++++++++++ ...ficationAllOfAndroidBackgroundLayout.java} | 48 +- .../com/onesignal/client/model/Button.java | 2 +- .../CancelNotificationSuccessResponse.java | 2 +- .../CreateNotificationBadRequestResponse.java | 2 +- .../CreateNotificationSuccessResponse.java | 2 +- .../model/CreatePlayerSuccessResponse.java | 2 +- .../CreateSegmentBadRequestResponse.java | 2 +- .../model/CreateSegmentConflictResponse.java | 2 +- .../model/CreateSegmentSuccessResponse.java | 2 +- .../model/DeletePlayerBadRequestResponse.java | 12 +- .../model/DeletePlayerNotFoundResponse.java | 10 +- .../model/DeletePlayerSuccessResponse.java | 10 +- .../DeleteSegmentBadRequestResponse.java | 2 +- .../model/DeleteSegmentNotFoundResponse.java | 2 +- .../model/DeleteSegmentSuccessResponse.java | 2 +- .../onesignal/client/model/DeliveryData.java | 22 +- .../model/ExportPlayersRequestBody.java | 10 +- .../model/ExportPlayersSuccessResponse.java | 2 +- .../com/onesignal/client/model/Filter.java | 2 +- .../client/model/FilterExpressions.java | 2 +- .../model/FilterNotificationTarget.java | 2 +- .../model/GetNotificationRequestBody.java | 2 +- .../client/model/InvalidIdentifierError.java | 2 +- .../onesignal/client/model/Notification.java | 80 +- .../client/model/Notification200Errors.java | 2 +- .../client/model/NotificationAllOf.java | 2732 +----------- ...NotificationHistoryBadRequestResponse.java | 2 +- .../NotificationHistorySuccessResponse.java | 2 +- .../client/model/NotificationSlice.java | 2 +- .../client/model/NotificationTarget.java | 3 +- .../client/model/NotificationWithMeta.java | 78 +- .../model/NotificationWithMetaAllOf.java | 2 +- .../com/onesignal/client/model/Operator.java | 2 +- .../onesignal/client/model/OutcomeData.java | 2 +- .../onesignal/client/model/OutcomesData.java | 2 +- .../client/model/PlatformDeliveryData.java | 80 +- .../model/PlatformDeliveryDataEmailAllOf.java | 377 ++ .../model/PlatformDeliveryDataSmsAllOf.java | 257 ++ .../com/onesignal/client/model/Player.java | 2 +- .../model/PlayerNotificationTarget.java | 14 +- .../onesignal/client/model/PlayerSlice.java | 2 +- .../com/onesignal/client/model/Purchase.java | 2 +- .../com/onesignal/client/model/Segment.java | 2 +- .../model/SegmentNotificationTarget.java | 2 +- .../com/onesignal/client/model/StringMap.java | 2 +- .../model/UpdatePlayerSuccessResponse.java | 2 +- .../model/UpdatePlayerTagsRequestBody.java | 2 +- .../UpdatePlayerTagsSuccessResponse.java | 2 +- 76 files changed, 7969 insertions(+), 3040 deletions(-) rename .github/{PULL_REQUEST_TEMPLATE => }/pull_request_template.md (100%) create mode 100644 docs/BasicNotification.md create mode 100644 docs/BasicNotificationAllOf.md rename docs/{NotificationAllOfAndroidBackgroundLayout.md => BasicNotificationAllOfAndroidBackgroundLayout.md} (93%) create mode 100644 docs/PlatformDeliveryDataEmailAllOf.md create mode 100644 docs/PlatformDeliveryDataSmsAllOf.md create mode 100644 src/main/java/com/onesignal/client/model/BasicNotification.java create mode 100644 src/main/java/com/onesignal/client/model/BasicNotificationAllOf.java rename src/main/java/com/onesignal/client/model/{NotificationAllOfAndroidBackgroundLayout.java => BasicNotificationAllOfAndroidBackgroundLayout.java} (73%) create mode 100644 src/main/java/com/onesignal/client/model/PlatformDeliveryDataEmailAllOf.java create mode 100644 src/main/java/com/onesignal/client/model/PlatformDeliveryDataSmsAllOf.java diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/pull_request_template.md similarity index 100% rename from .github/PULL_REQUEST_TEMPLATE/pull_request_template.md rename to .github/pull_request_template.md diff --git a/README.md b/README.md index c37cc83b..3b5c3118 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ OneSignal - API version: 1.0.1 - - Build date: 2022-07-13T21:20:07.400Z[Etc/UTC] + - Build date: 2022-08-18T22:09:10.481Z[Etc/UTC] A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com @@ -158,6 +158,9 @@ Class | Method | HTTP request | Description ## Documentation for Models - [App](docs/App.md) + - [BasicNotification](docs/BasicNotification.md) + - [BasicNotificationAllOf](docs/BasicNotificationAllOf.md) + - [BasicNotificationAllOfAndroidBackgroundLayout](docs/BasicNotificationAllOfAndroidBackgroundLayout.md) - [Button](docs/Button.md) - [CancelNotificationSuccessResponse](docs/CancelNotificationSuccessResponse.md) - [CreateNotificationBadRequestResponse](docs/CreateNotificationBadRequestResponse.md) @@ -183,7 +186,6 @@ Class | Method | HTTP request | Description - [Notification](docs/Notification.md) - [Notification200Errors](docs/Notification200Errors.md) - [NotificationAllOf](docs/NotificationAllOf.md) - - [NotificationAllOfAndroidBackgroundLayout](docs/NotificationAllOfAndroidBackgroundLayout.md) - [NotificationHistoryBadRequestResponse](docs/NotificationHistoryBadRequestResponse.md) - [NotificationHistorySuccessResponse](docs/NotificationHistorySuccessResponse.md) - [NotificationSlice](docs/NotificationSlice.md) @@ -194,6 +196,8 @@ Class | Method | HTTP request | Description - [OutcomeData](docs/OutcomeData.md) - [OutcomesData](docs/OutcomesData.md) - [PlatformDeliveryData](docs/PlatformDeliveryData.md) + - [PlatformDeliveryDataEmailAllOf](docs/PlatformDeliveryDataEmailAllOf.md) + - [PlatformDeliveryDataSmsAllOf](docs/PlatformDeliveryDataSmsAllOf.md) - [Player](docs/Player.md) - [PlayerNotificationTarget](docs/PlayerNotificationTarget.md) - [PlayerSlice](docs/PlayerSlice.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 0b9257ca..0f4dbac9 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -840,7 +840,7 @@ paths: last_active_since: description: Export all devices with a last_active timestamp greater than this time. Unixtime in seconds. - type: integer + type: string segment_name: description: Export al ldevices belonging to the segment. type: string @@ -945,30 +945,36 @@ components: writeOnly: true gcm_key: description: "Android: Your Google Push Messaging Auth Key" + nullable: true type: string chrome_web_origin: description: "Chrome (All Browsers except Safari) (Recommended): The URL\ \ to your website. This field is required if you wish to enable web push\ \ and specify other web push parameters." + nullable: true type: string chrome_key: description: Not for web push. Your Google Push Messaging Auth Key if you use Chrome Apps / Extensions. + nullable: true type: string chrome_web_default_notification_icon: description: "Chrome (All Browsers except Safari): Your default notification\ \ icon. Should be 256x256 pixels, min 80x80." + nullable: true type: string chrome_web_sub_domain: description: "Chrome (All Browsers except Safari): A subdomain of your choice\ \ in order to support Web Push on non-HTTPS websites. This field must\ \ be set in order for the chrome_web_gcm_sender_id property to be processed." + nullable: true type: string apns_env: description: "iOS: Either sandbox or production" enum: - sandbox - production + nullable: true type: string apns_p12: description: "iOS: Your apple push notification p12 certificate file, converted\ @@ -981,6 +987,7 @@ components: type: string writeOnly: true apns_certificates: + nullable: true readOnly: true type: string safari_apns_certificates: @@ -998,8 +1005,10 @@ components: safari_site_origin: description: "Safari (Recommended): The hostname to your website including\ \ http(s)://" + nullable: true type: string safari_push_id: + nullable: true readOnly: true type: string safari_icon_16_16: @@ -1021,6 +1030,7 @@ components: site_name: description: "All Browsers (Recommended): The Site Name. Requires both chrome_web_origin\ \ and safari_site_origin to be set to add or update it." + nullable: true type: string basic_auth_key: readOnly: true @@ -1131,6 +1141,7 @@ components: ]\nLimit of 2,000 entries per REST API call\n" items: type: string + nullable: true type: array include_external_user_ids: description: "Target specific devices by custom user IDs assigned via API.\n\ @@ -1141,6 +1152,7 @@ components: \ a push or email or sms.\n" items: type: string + nullable: true type: array include_email_tokens: description: "Recommended for Sending Emails - Target specific email addresses.\n\ @@ -1220,15 +1232,19 @@ components: - $ref: '#/components/schemas/SegmentNotificationTarget' - $ref: '#/components/schemas/FilterNotificationTarget' - $ref: '#/components/schemas/PlayerNotificationTarget' - Notification: + BasicNotification: allOf: - $ref: '#/components/schemas/NotificationTarget' - - $ref: '#/components/schemas/Notification_allOf' + - $ref: '#/components/schemas/BasicNotification_allOf' - required: - app_id + Notification: + allOf: + - $ref: '#/components/schemas/BasicNotification' + - $ref: '#/components/schemas/Notification_allOf' NotificationWithMeta: allOf: - - $ref: '#/components/schemas/Notification' + - $ref: '#/components/schemas/BasicNotification' - $ref: '#/components/schemas/DeliveryData' - $ref: '#/components/schemas/OutcomesData' - $ref: '#/components/schemas/NotificationWithMeta_allOf' @@ -1414,22 +1430,36 @@ components: $ref: '#/components/schemas/DeliveryData' ios: $ref: '#/components/schemas/DeliveryData' + sms: + allOf: + - $ref: '#/components/schemas/DeliveryData' + - $ref: '#/components/schemas/PlatformDeliveryData_sms_allOf' + email: + allOf: + - $ref: '#/components/schemas/DeliveryData' + - $ref: '#/components/schemas/PlatformDeliveryData_email_allOf' type: object DeliveryData: properties: successful: + description: "Number of messages delivered to push servers, mobile carriers,\ + \ or email service providers." nullable: true type: integer failed: + description: Number of messages sent to unsubscribed devices. nullable: true type: integer errored: + description: Number of errors reported. nullable: true type: integer converted: + description: Number of messages that were clicked. nullable: true type: integer received: + description: Number of devices that received the message. nullable: true type: integer type: object @@ -1614,6 +1644,7 @@ components: type: integer external_user_id: description: a custom user ID + nullable: true type: string external_user_id_auth_hash: description: Only required if you have enabled Identity Verification and @@ -1630,6 +1661,7 @@ components: Android: APA91bHbYHk7aq-Uam_2pyJ2qbZvqllyyh2wjfPRaw5gLEX2SUlQBRvOc6sck1sa7H7nGeLNlDco8lXj83HWWwzV...\n\ For Email Addresses, set the full email address email@email.com and make\ \ sure to set device_type to 11.\n" + nullable: true type: string language: description: "Language code. Typically lower case two letters, except for\ @@ -1641,12 +1673,15 @@ components: type: integer game_version: description: "Version of your app. Example: 1.1\n" + nullable: true type: string device_model: description: "Device make and model. Example: iPhone5,1\n" + nullable: true type: string device_os: description: "Device operating system version. Example: 7.0.4\n" + nullable: true type: string ad_id: description: | @@ -1655,10 +1690,12 @@ components: iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId + nullable: true type: string sdk: description: Name and version of the sdk/plugin that's calling this API method (if any) + nullable: true type: string session_count: description: "Number of times the user has played the game, defaults to\ @@ -1673,6 +1710,7 @@ components: \ through SDK sendTag methods.\nRecommended to only tag devices with 1\ \ kilobyte of data\nPlease consider using your own Database to save more\ \ than 1 kilobyte of data. See: Internal Database & CRM\n" + nullable: true type: object amount_spent: description: "Amount the user has spent in USD, up to two decimal places" @@ -1942,22 +1980,22 @@ components: type: object DeletePlayerSuccessResponse: example: - success: success + success: true properties: success: - type: string + type: boolean type: object DeletePlayerBadRequestResponse: properties: erorrs: items: - type: string + type: boolean type: array type: object DeletePlayerNotFoundResponse: properties: success: - type: string + type: boolean type: object UpdatePlayerSuccessResponse: example: @@ -2021,13 +2059,13 @@ components: last_active_since: description: Export all devices with a last_active timestamp greater than this time. Unixtime in seconds. - type: integer + type: string segment_name: description: Export al ldevices belonging to the segment. type: string title: export_players_request_body type: object - Notification_allOf_android_background_layout: + BasicNotification_allOf_android_background_layout: description: "Channel: Push Notifications\nPlatform: Android\nAllowing setting\ \ a background image for the notification. This is a JSON object containing\ \ the following keys. See our Background Image documentation for image sizes.\n" @@ -2043,7 +2081,7 @@ components: type: string type: object writeOnly: true - Notification_allOf: + BasicNotification_allOf: properties: id: type: string @@ -2055,6 +2093,7 @@ components: Required for SMS Messages. An identifier for tracking message within the OneSignal dashboard or export analytics. Not shown to end user. + nullable: true type: string writeOnly: true aggregation: @@ -2064,7 +2103,6 @@ components: readOnly: true type: string isIos: - default: true description: Indicates whether to send to all devices registered under your app's Apple iOS platform. nullable: true @@ -2187,12 +2225,14 @@ components: \ of data that is passed back to your app. Same as using Additional Data\ \ within the dashboard. Can use up to 2048 bytes of data.\nExample: {\"\ abc\": 123, \"foo\": \"bar\", \"event_performed\": true, \"amount\": 12.1}\n" + nullable: true type: object writeOnly: true huawei_msg_type: description: "Channel: Push Notifications\nPlatform: Huawei\nUse \"data\"\ \ or \"message\" depending on the type of notification you are sending.\ \ More details in Data & Background Notifications.\n" + nullable: true type: string writeOnly: true url: @@ -2201,18 +2241,21 @@ components: \ https or updated NSAppTransportSecurity in plist\nThis field supports\ \ inline substitutions.\nOmit if including web_url or app_url\nExample:\ \ https://onesignal.com\n" + nullable: true type: string writeOnly: true web_url: description: "Channel: Push Notifications\nPlatform: All Browsers\nSame\ \ as url but only sent to web push platforms.\nIncluding Chrome, Firefox,\ \ Safari, Opera, etc.\nExample: https://onesignal.com\n" + nullable: true type: string writeOnly: true app_url: description: "Channel: Push Notifications\nPlatform: All Browsers\nSame\ \ as url but only sent to web push platforms.\nIncluding iOS, Android,\ \ macOS, Windows, ChromeApps, etc.\nExample: https://onesignal.com\n" + nullable: true type: string writeOnly: true ios_attachments: @@ -2222,12 +2265,14 @@ components: \ must press and hold on the notification to view.\nDo not set mutable_content\ \ to download attachments. The OneSignal SDK does this automatically\n\ Example: {\"id1\": \"https://domain.com/image.jpg\"}\n" + nullable: true type: object writeOnly: true template_id: description: "Channel: Push Notifications\nPlatform: All\nUse a template\ \ you setup on our dashboard. The template_id is the UUID found in the\ \ URL when viewing a template on our dashboard.\nExample: be4a8044-bbd6-11e4-a581-000c2940e62c\n" + nullable: true type: string writeOnly: true content_available: @@ -2250,32 +2295,38 @@ components: description: "Channel: Push Notifications\nPlatform: iOS 13+\nUse to target\ \ a specific experience in your App Clip, or to target your notification\ \ to a specific window in a multi-scene App.\n" + nullable: true type: string writeOnly: true big_picture: description: "Channel: Push Notifications\nPlatform: Android\nPicture to\ \ display in the expanded view. Can be a drawable resource name or a URL.\n" + nullable: true type: string writeOnly: true huawei_big_picture: description: "Channel: Push Notifications\nPlatform: Huawei\nPicture to\ \ display in the expanded view. Can be a drawable resource name or a URL.\n" + nullable: true type: string writeOnly: true adm_big_picture: description: "Channel: Push Notifications\nPlatform: Amazon\nPicture to\ \ display in the expanded view. Can be a drawable resource name or a URL.\n" + nullable: true type: string writeOnly: true chrome_big_picture: description: "Channel: Push Notifications\nPlatform: ChromeApp\nLarge picture\ \ to display below the notification text. Must be a local URL.\n" + nullable: true type: string writeOnly: true chrome_web_image: description: "Channel: Push Notifications\nPlatform: Chrome 56+\nSets the\ \ web push notification's large image to be shown below the notification's\ \ title and text. Please see Web Push Notification Icons.\n" + nullable: true type: string writeOnly: true buttons: @@ -2288,6 +2339,7 @@ components: }]\n" items: $ref: '#/components/schemas/Button' + nullable: true type: array writeOnly: true web_buttons: @@ -2299,6 +2351,7 @@ components: url\": \"https://yoursite.com\"}]\n" items: $ref: '#/components/schemas/Button' + nullable: true type: array writeOnly: true ios_category: @@ -2307,6 +2360,7 @@ components: \ / Swift code.\nExample: calendar category which contains actions like\ \ accept and decline\niOS 10+ This will trigger your UNNotificationContentExtension\ \ whose ID matches this category.\n" + nullable: true type: string writeOnly: true android_channel_id: @@ -2319,6 +2373,7 @@ components: description: "Channel: Push Notifications\nPlatform: Huawei\nThe Android\ \ Oreo Notification Category to send the notification under. See the Category\ \ documentation on creating one and getting it's id.\n" + nullable: true type: string writeOnly: true existing_android_channel_id: @@ -2331,15 +2386,17 @@ components: description: "Channel: Push Notifications\nPlatform: Huawei\nUse this if\ \ you have client side Android Oreo Channels you have already defined\ \ in your app with code.\n" + nullable: true type: string writeOnly: true android_background_layout: - $ref: '#/components/schemas/Notification_allOf_android_background_layout' + $ref: '#/components/schemas/BasicNotification_allOf_android_background_layout' small_icon: description: "Channel: Push Notifications\nPlatform: Android\nIcon shown\ \ in the status bar and on the top left of the notification.\nIf not set\ \ a bell icon will be used or ic_stat_onesignal_default if you have set\ \ this resource name.\nSee: How to create small icons\n" + nullable: true type: string writeOnly: true huawei_small_icon: @@ -2347,28 +2404,33 @@ components: \ in the status bar and on the top left of the notification.\nUse an Android\ \ resource path (E.g. /drawable/small_icon).\nDefaults to your app icon\ \ if not set.\n" + nullable: true type: string writeOnly: true large_icon: description: "Channel: Push Notifications\nPlatform: Android\nCan be a drawable\ \ resource name or a URL.\nSee: How to create large icons\n" + nullable: true type: string writeOnly: true huawei_large_icon: description: "Channel: Push Notifications\nPlatform: Huawei\nCan be a drawable\ \ resource name or a URL.\nSee: How to create large icons\n" + nullable: true type: string writeOnly: true adm_small_icon: description: "Channel: Push Notifications\nPlatform: Amazon\nIf not set\ \ a bell icon will be used or ic_stat_onesignal_default if you have set\ \ this resource name.\nSee: How to create small icons\n" + nullable: true type: string writeOnly: true adm_large_icon: description: "Channel: Push Notifications\nPlatform: Amazon\nIf blank the\ \ small_icon is used. Can be a drawable resource name or a URL.\nSee:\ \ How to create large icons\n" + nullable: true type: string writeOnly: true chrome_web_icon: @@ -2377,11 +2439,13 @@ components: \ image types are supported; GIF will not animate. We recommend 256x256\ \ (at least 80x80) to display well on high DPI devices. Firefox will also\ \ use this icon, unless you specify firefox_icon.\n" + nullable: true type: string chrome_web_badge: description: "Channel: Push Notifications\nPlatform: Chrome\nSets the web\ \ push notification icon for Android devices in the notification shade.\ \ Please see Web Push Notification Badge.\n" + nullable: true type: string writeOnly: true firefox_icon: @@ -2391,12 +2455,14 @@ components: \ push notification's icon for Firefox. An image URL linking to a valid\ \ image. Common image types are supported; GIF will not animate. We recommend\ \ 256x256 (at least 80x80) to display well on high DPI devices.\n" + nullable: true type: string writeOnly: true chrome_icon: description: "Channel: Push Notifications\nPlatform: ChromeApp\nThis flag\ \ is not used for web push For web push, please see chrome_web_icon instead.\n\ The local URL to an icon to use. If blank, the app icon will be used.\n" + nullable: true type: string writeOnly: true ios_sound: @@ -2404,6 +2470,7 @@ components: \ is included in your app to play instead of the default device notification\ \ sound. Pass nil to disable vibration and sound for the notification.\n\ Example: \"notification.wav\"\n" + nullable: true type: string writeOnly: true android_sound: @@ -2414,6 +2481,7 @@ components: \ play instead of the default device notification sound. Pass nil to disable\ \ sound for the notification.\nNOTE: Leave off file extension for Android.\n\ Example: \"notification\"\n" + nullable: true type: string writeOnly: true huawei_sound: @@ -2424,6 +2492,7 @@ components: \ app to play instead of the default device notification sound. NOTE:\ \ Leave off file extension for and include the full path.\n\nExample:\ \ \"/res/raw/notification\"\n" + nullable: true type: string writeOnly: true adm_sound: @@ -2434,12 +2503,14 @@ components: \ play instead of the default device notification sound. Pass nil to disable\ \ sound for the notification.\nNOTE: Leave off file extension for Android.\n\ Example: \"notification\"\n" + nullable: true type: string writeOnly: true wp_wns_sound: description: "Channel: Push Notifications\nPlatform: Windows\nSound file\ \ that is included in your app to play instead of the default device notification\ \ sound.\nExample: \"notification.wav\"\n" + nullable: true type: string writeOnly: true android_led_color: @@ -2448,6 +2519,7 @@ components: \ use Notification Categories / Channels noted above instead to support\ \ ALL versions of Android.\nSets the devices LED notification light if\ \ the device has one. ARGB Hex format.\nExample(Blue): \"FF0000FF\"\n" + nullable: true type: string writeOnly: true huawei_led_color: @@ -2457,6 +2529,7 @@ components: \ EMUI 8 (Android 8 based) devices.\nSets the devices LED notification\ \ light if the device has one. RGB Hex format.\nExample(Blue): \"0000FF\"\ \n" + nullable: true type: string writeOnly: true android_accent_color: @@ -2464,12 +2537,14 @@ components: \ color of the notification circle to the left of the notification text.\ \ Only applies to apps targeting Android API level 21+ on Android 5.0+\ \ devices.\nExample(Red): \"FFFF0000\"\n" + nullable: true type: string writeOnly: true huawei_accent_color: description: "Channel: Push Notifications\nPlatform: Huawei\nAccent Color\ \ used on Action Buttons and Group overflow count.\nUses RGB Hex value\ \ (E.g. #9900FF).\nDefaults to device's theme color if not set.\n" + nullable: true type: string writeOnly: true android_visibility: @@ -2508,6 +2583,7 @@ components: \ number specified in ios_badgeCount.\n`Increase` adds the number specified\ \ in ios_badgeCount to the total. Use a negative number to decrease the\ \ badge count.\n" + nullable: true type: string writeOnly: true ios_badgeCount: @@ -2528,6 +2604,7 @@ components: web_push_topic: description: "Channel: Push Notifications\nPlatform: All Browsers\nDisplay\ \ multiple notifications at once with different topics.\n" + nullable: true type: string apns_alert: description: "Channel: Push Notifications\nPlatform: iOS 10+\niOS can localize\ @@ -2535,29 +2612,22 @@ components: \ as loc-key. When using the Create Notification endpoint, you must include\ \ these parameters inside of a field called apns_alert. Please see Apple's\ \ guide on localizing push notifications to learn more.\n" + nullable: true type: object writeOnly: true - send_after: - description: "Channel: All\nSchedule notification for future delivery. API\ - \ defaults to UTC -1100\nExamples: All examples are the exact same date\ - \ & time.\n\"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\"\n\"September 24th\ - \ 2015, 2:00:00 pm UTC-07:00\"\n\"2015-09-24 14:00:00 GMT-0700\"\n\"Sept\ - \ 24 2015 14:00:00 GMT-0700\"\n\"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific\ - \ Daylight Time)\"\nNote: SMS currently only supports send_after parameter.\n" - format: date-time - type: string - writeOnly: true delayed_option: description: "Channel: All\nPossible values are:\ntimezone (Deliver at a\ \ specific time-of-day in each users own timezone)\nlast-active Same as\ \ Intelligent Delivery . (Deliver at the same time of day as each user\ \ last used your app).\nIf send_after is used, this takes effect after\ \ the send_after time has elapsed.\n" + nullable: true type: string writeOnly: true delivery_time_of_day: description: "Channel: All\nUse with delayed_option=timezone.\nExamples:\ \ \"9:00AM\"\n\"21:45\"\n\"9:45:30\"\n" + nullable: true type: string writeOnly: true ttl: @@ -2595,12 +2665,14 @@ components: \ be used to throttle delivery for the notification even though throttling\ \ is not enabled at the application level.\nRefer to throttling for more\ \ details.\n" + nullable: true type: string writeOnly: true android_group: description: "Channel: Push Notifications\nPlatform: Android\nNotifications\ \ with the same group will be stacked together using Android's Notification\ \ Grouping feature.\n" + nullable: true type: string writeOnly: true android_group_message: @@ -2614,12 +2686,14 @@ components: \ either a a 2 character language code or one of zh-Hans/zh-Hant for Simplified\ \ or Traditional Chinese. Read more: supported languages.\nExample: {\"\ en\": \"You have $[notif_count] new messages\"}\n" + nullable: true type: string writeOnly: true adm_group: description: "Channel: Push Notifications\nPlatform: Amazon\nNotifications\ \ with the same group will be stacked together using Android's Notification\ \ Grouping feature.\n" + nullable: true type: string writeOnly: true adm_group_message: @@ -2631,6 +2705,7 @@ components: \ for Simplified or Traditional Chinese. The value of each key is the\ \ message that will be sent to users for that language.\nExample: {\"\ en\": \"You have $[notif_count] new messages\"}\n" + nullable: true type: object writeOnly: true thread_id: @@ -2638,6 +2713,7 @@ components: \ is supported in iOS 12 and above. It allows you to group related notifications\ \ together.\nIf two notifications have the same thread-id, they will both\ \ be added to the same group.\n" + nullable: true type: string writeOnly: true summary_arg: @@ -2660,6 +2736,7 @@ components: writeOnly: true email_subject: description: "Channel: Email\nRequired. The subject of the email.\n" + nullable: true type: string writeOnly: true email_body: @@ -2673,17 +2750,20 @@ components: email_from_name: description: "Channel: Email\nThe name the email is from. If not specified,\ \ will default to \"from name\" set in the OneSignal Dashboard Email Settings.\n" + nullable: true type: string writeOnly: true email_from_address: description: "Channel: Email\nThe email address the email is from. If not\ \ specified, will default to \"from email\" set in the OneSignal Dashboard\ \ Email Settings.\n" + nullable: true type: string writeOnly: true sms_from: description: "Channel: SMS\nPhone Number used to send SMS. Should be a registered\ \ Twilio phone number in E.164 format.\n" + nullable: true type: string writeOnly: true sms_media_urls: @@ -2691,9 +2771,24 @@ components: \ SMS content.\nLimit: 10 media urls with a total max. size of 5MBs.\n" items: type: string + nullable: true type: array writeOnly: true type: object + Notification_allOf: + properties: + send_after: + description: "Channel: All\nSchedule notification for future delivery. API\ + \ defaults to UTC -1100\nExamples: All examples are the exact same date\ + \ & time.\n\"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\"\n\"September 24th\ + \ 2015, 2:00:00 pm UTC-07:00\"\n\"2015-09-24 14:00:00 GMT-0700\"\n\"Sept\ + \ 24 2015 14:00:00 GMT-0700\"\n\"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific\ + \ Daylight Time)\"\nNote: SMS currently only supports send_after parameter.\n" + format: date-time + nullable: true + type: string + writeOnly: true + type: object NotificationWithMeta_allOf: properties: remaining: @@ -2724,6 +2819,7 @@ components: description: Unix timestamp indicating when notification delivery should begin. format: int64 + nullable: true type: integer completed_at: description: Unix timestamp indicating when notification delivery completed. @@ -2747,6 +2843,56 @@ components: nullable: true type: integer type: object + PlatformDeliveryData_sms_allOf: + properties: + provider_successful: + description: Number of messages reported as delivered successfully by the + SMS service provider. + nullable: true + type: integer + provider_failed: + description: Number of recipients who didn't receive your message as reported + by the SMS service provider. + nullable: true + type: integer + provider_errored: + description: Number of errors reported by the SMS service provider. + nullable: true + type: integer + PlatformDeliveryData_email_allOf: + properties: + opened: + description: Number of times an email has been opened. + nullable: true + type: integer + unique_opens: + description: Number of unique recipients who have opened your email. + nullable: true + type: integer + clicks: + description: Number of clicked links from your email. This can include the + recipient clicking email links multiple times. + nullable: true + type: integer + unique_clicks: + description: Number of unique clicks that your recipients have made on links + from your email. + nullable: true + type: integer + bounced: + description: Number of recipients who registered as a hard or soft bounce + and didn't receive your email. + nullable: true + type: integer + reported_spam: + description: Number of recipients who reported this email as spam. + nullable: true + type: integer + unsubscribed: + description: Number of recipients who opted out of your emails using the + unsubscribe link in this email. + nullable: true + type: integer securitySchemes: app_key: scheme: bearer diff --git a/docs/BasicNotification.md b/docs/BasicNotification.md new file mode 100644 index 00000000..ff1e463c --- /dev/null +++ b/docs/BasicNotification.md @@ -0,0 +1,133 @@ + + +# BasicNotification + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**includedSegments** | **List<String>** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] | +|**excludedSegments** | **List<String>** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] | +|**lastSession** | **String** | relation = \">\" or \"<\" hours_ago = number of hours before or after the users last session. Example: \"1.1\" | [optional] | +|**firstSession** | **String** | relation = \">\" or \"<\" hours_ago = number of hours before or after the users first session. Example: \"1.1\" | [optional] | +|**sessionCount** | **String** | relation = \">\", \"<\", \"=\" or \"!=\" value = number sessions. Example: \"1\" | [optional] | +|**sessionTime** | **String** | relation = \">\", \"<\", \"=\" or \"!=\" value = Time in seconds the user has been in your app. Example: \"3600\" | [optional] | +|**amountSpent** | **String** | relation = \">\", \"<\", or \"=\" value = Amount in USD a user has spent on IAP (In App Purchases). Example: \"0.99\" | [optional] | +|**boughtSku** | **String** | relation = \">\", \"<\" or \"=\" key = SKU purchased in your app as an IAP (In App Purchases). Example: \"com.domain.100coinpack\" value = value of SKU to compare to. Example: \"0.99\" | [optional] | +|**tag** | **String** | relation = \">\", \"<\", \"=\", \"!=\", \"exists\", \"not_exists\", \"time_elapsed_gt\" (paid plan only) or \"time_elapsed_lt\" (paid plan only) See Time Operators key = Tag key to compare. value = Tag value to compare. Not required for \"exists\" or \"not_exists\". Example: See Formatting Filters | [optional] | +|**language** | **String** | relation = \"=\" or \"!=\" value = 2 character language code. Example: \"en\". For a list of all language codes see Language & Localization. | [optional] | +|**appVersion** | **String** | relation = \">\", \"<\", \"=\" or \"!=\" value = app version. Example: \"1.0.0\" | [optional] | +|**location** | **String** | radius = in meters lat = latitude long = longitude | [optional] | +|**email** | **String** | value = email address Only for sending Push Notifications Use this for targeting push subscribers associated with an email set with all SDK setEmail methods To send emails to specific email addresses use include_email_tokens parameter | [optional] | +|**country** | **String** | relation = \"=\" value = 2-digit Country code Example: \"field\": \"country\", \"relation\": \"=\", \"value\", \"US\" | [optional] | +|**includePlayerIds** | **List<String>** | Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] | +|**includeExternalUserIds** | **List<String>** | Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. | [optional] | +|**includeEmailTokens** | **List<String>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] | +|**includePhoneNumbers** | **List<String>** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] | +|**includeIosTokens** | **List<String>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] | +|**includeWpWnsUris** | **List<String>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] | +|**includeAmazonRegIds** | **List<String>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call | [optional] | +|**includeChromeRegIds** | **List<String>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] | +|**includeChromeWebRegIds** | **List<String>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] | +|**includeAndroidRegIds** | **List<String>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] | +|**id** | **String** | | [optional] | +|**value** | **Integer** | | [optional] [readonly] | +|**name** | **String** | Required for SMS Messages. An identifier for tracking message within the OneSignal dashboard or export analytics. Not shown to end user. | [optional] | +|**aggregation** | [**AggregationEnum**](#AggregationEnum) | | [optional] [readonly] | +|**isIos** | **Boolean** | Indicates whether to send to all devices registered under your app's Apple iOS platform. | [optional] | +|**isAndroid** | **Boolean** | Indicates whether to send to all devices registered under your app's Google Android platform. | [optional] | +|**isHuawei** | **Boolean** | Indicates whether to send to all devices registered under your app's Huawei Android platform. | [optional] | +|**isAnyWeb** | **Boolean** | Indicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one. | [optional] | +|**isChromeWeb** | **Boolean** | Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform. | [optional] | +|**isFirefox** | **Boolean** | Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform. | [optional] | +|**isSafari** | **Boolean** | Does not support iOS Safari. Indicates whether to send to all Apple's Safari desktop users registered under your Safari web push platform. Read more iOS Safari | [optional] | +|**isWPWNS** | **Boolean** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] | +|**isAdm** | **Boolean** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] | +|**isChrome** | **Boolean** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] | +|**channelForExternalUserIds** | **String** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional] | +|**appId** | **String** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. | | +|**externalId** | **String** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] | +|**contents** | [**StringMap**](StringMap.md) | | [optional] | +|**headings** | [**StringMap**](StringMap.md) | | [optional] | +|**subtitle** | [**StringMap**](StringMap.md) | | [optional] | +|**data** | **Object** | Channel: Push Notifications Platform: Huawei A custom map of data that is passed back to your app. Same as using Additional Data within the dashboard. Can use up to 2048 bytes of data. Example: {\"abc\": 123, \"foo\": \"bar\", \"event_performed\": true, \"amount\": 12.1} | [optional] | +|**huaweiMsgType** | **String** | Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications. | [optional] | +|**url** | **String** | Channel: Push Notifications Platform: All The URL to open in the browser when a user clicks on the notification. Note: iOS needs https or updated NSAppTransportSecurity in plist This field supports inline substitutions. Omit if including web_url or app_url Example: https://onesignal.com | [optional] | +|**webUrl** | **String** | Channel: Push Notifications Platform: All Browsers Same as url but only sent to web push platforms. Including Chrome, Firefox, Safari, Opera, etc. Example: https://onesignal.com | [optional] | +|**appUrl** | **String** | Channel: Push Notifications Platform: All Browsers Same as url but only sent to web push platforms. Including iOS, Android, macOS, Windows, ChromeApps, etc. Example: https://onesignal.com | [optional] | +|**iosAttachments** | **Object** | Channel: Push Notifications Platform: iOS 10+ Adds media attachments to notifications. Set as JSON object, key as a media id of your choice and the value as a valid local filename or URL. User must press and hold on the notification to view. Do not set mutable_content to download attachments. The OneSignal SDK does this automatically Example: {\"id1\": \"https://domain.com/image.jpg\"} | [optional] | +|**templateId** | **String** | Channel: Push Notifications Platform: All Use a template you setup on our dashboard. The template_id is the UUID found in the URL when viewing a template on our dashboard. Example: be4a8044-bbd6-11e4-a581-000c2940e62c | [optional] | +|**contentAvailable** | **Boolean** | Channel: Push Notifications Platform: iOS Sending true wakes your app from background to run custom native code (Apple interprets this as content-available=1). Note: Not applicable if the app is in the \"force-quit\" state (i.e app was swiped away). Omit the contents field to prevent displaying a visible notification. | [optional] | +|**mutableContent** | **Boolean** | Channel: Push Notifications Platform: iOS 10+ Always defaults to true and cannot be turned off. Allows tracking of notification receives and changing of the notification content in your app before it is displayed. Triggers didReceive(_:withContentHandler:) on your UNNotificationServiceExtension. | [optional] | +|**targetContentIdentifier** | **String** | Channel: Push Notifications Platform: iOS 13+ Use to target a specific experience in your App Clip, or to target your notification to a specific window in a multi-scene App. | [optional] | +|**bigPicture** | **String** | Channel: Push Notifications Platform: Android Picture to display in the expanded view. Can be a drawable resource name or a URL. | [optional] | +|**huaweiBigPicture** | **String** | Channel: Push Notifications Platform: Huawei Picture to display in the expanded view. Can be a drawable resource name or a URL. | [optional] | +|**admBigPicture** | **String** | Channel: Push Notifications Platform: Amazon Picture to display in the expanded view. Can be a drawable resource name or a URL. | [optional] | +|**chromeBigPicture** | **String** | Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL. | [optional] | +|**chromeWebImage** | **String** | Channel: Push Notifications Platform: Chrome 56+ Sets the web push notification's large image to be shown below the notification's title and text. Please see Web Push Notification Icons. | [optional] | +|**buttons** | [**List<Button>**](Button.md) | Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}] | [optional] | +|**webButtons** | [**List<Button>**](Button.md) | Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}] | [optional] | +|**iosCategory** | **String** | Channel: Push Notifications Platform: iOS Category APS payload, use with registerUserNotificationSettings:categories in your Objective-C / Swift code. Example: calendar category which contains actions like accept and decline iOS 10+ This will trigger your UNNotificationContentExtension whose ID matches this category. | [optional] | +|**androidChannelId** | **String** | Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] | +|**huaweiChannelId** | **String** | Channel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] | +|**existingAndroidChannelId** | **String** | Channel: Push Notifications Platform: Android Use this if you have client side Android Oreo Channels you have already defined in your app with code. | [optional] | +|**huaweiExistingChannelId** | **String** | Channel: Push Notifications Platform: Huawei Use this if you have client side Android Oreo Channels you have already defined in your app with code. | [optional] | +|**androidBackgroundLayout** | [**BasicNotificationAllOfAndroidBackgroundLayout**](BasicNotificationAllOfAndroidBackgroundLayout.md) | | [optional] | +|**smallIcon** | **String** | Channel: Push Notifications Platform: Android Icon shown in the status bar and on the top left of the notification. If not set a bell icon will be used or ic_stat_onesignal_default if you have set this resource name. See: How to create small icons | [optional] | +|**huaweiSmallIcon** | **String** | Channel: Push Notifications Platform: Huawei Icon shown in the status bar and on the top left of the notification. Use an Android resource path (E.g. /drawable/small_icon). Defaults to your app icon if not set. | [optional] | +|**largeIcon** | **String** | Channel: Push Notifications Platform: Android Can be a drawable resource name or a URL. See: How to create large icons | [optional] | +|**huaweiLargeIcon** | **String** | Channel: Push Notifications Platform: Huawei Can be a drawable resource name or a URL. See: How to create large icons | [optional] | +|**admSmallIcon** | **String** | Channel: Push Notifications Platform: Amazon If not set a bell icon will be used or ic_stat_onesignal_default if you have set this resource name. See: How to create small icons | [optional] | +|**admLargeIcon** | **String** | Channel: Push Notifications Platform: Amazon If blank the small_icon is used. Can be a drawable resource name or a URL. See: How to create large icons | [optional] | +|**chromeWebIcon** | **String** | Channel: Push Notifications Platform: Chrome Sets the web push notification's icon. An image URL linking to a valid image. Common image types are supported; GIF will not animate. We recommend 256x256 (at least 80x80) to display well on high DPI devices. Firefox will also use this icon, unless you specify firefox_icon. | [optional] | +|**chromeWebBadge** | **String** | Channel: Push Notifications Platform: Chrome Sets the web push notification icon for Android devices in the notification shade. Please see Web Push Notification Badge. | [optional] | +|**firefoxIcon** | **String** | Channel: Push Notifications Platform: Firefox Not recommended Few people need to set Firefox-specific icons. We recommend setting chrome_web_icon instead, which Firefox will also use. Sets the web push notification's icon for Firefox. An image URL linking to a valid image. Common image types are supported; GIF will not animate. We recommend 256x256 (at least 80x80) to display well on high DPI devices. | [optional] | +|**chromeIcon** | **String** | Channel: Push Notifications Platform: ChromeApp This flag is not used for web push For web push, please see chrome_web_icon instead. The local URL to an icon to use. If blank, the app icon will be used. | [optional] | +|**iosSound** | **String** | Channel: Push Notifications Platform: iOS Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable vibration and sound for the notification. Example: \"notification.wav\" | [optional] | +|**androidSound** | **String** | Channel: Push Notifications Platform: Android &#9888;&#65039;Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable sound for the notification. NOTE: Leave off file extension for Android. Example: \"notification\" | [optional] | +|**huaweiSound** | **String** | Channel: Push Notifications Platform: Huawei &#9888;&#65039;Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. Sound file that is included in your app to play instead of the default device notification sound. NOTE: Leave off file extension for and include the full path. Example: \"/res/raw/notification\" | [optional] | +|**admSound** | **String** | Channel: Push Notifications Platform: Amazon &#9888;&#65039;Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable sound for the notification. NOTE: Leave off file extension for Android. Example: \"notification\" | [optional] | +|**wpWnsSound** | **String** | Channel: Push Notifications Platform: Windows Sound file that is included in your app to play instead of the default device notification sound. Example: \"notification.wav\" | [optional] | +|**androidLedColor** | **String** | Channel: Push Notifications Platform: Android &#9888;&#65039;Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sets the devices LED notification light if the device has one. ARGB Hex format. Example(Blue): \"FF0000FF\" | [optional] | +|**huaweiLedColor** | **String** | Channel: Push Notifications Platform: Huawei &#9888;&#65039;Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. Sets the devices LED notification light if the device has one. RGB Hex format. Example(Blue): \"0000FF\" | [optional] | +|**androidAccentColor** | **String** | Channel: Push Notifications Platform: Android Sets the background color of the notification circle to the left of the notification text. Only applies to apps targeting Android API level 21+ on Android 5.0+ devices. Example(Red): \"FFFF0000\" | [optional] | +|**huaweiAccentColor** | **String** | Channel: Push Notifications Platform: Huawei Accent Color used on Action Buttons and Group overflow count. Uses RGB Hex value (E.g. #9900FF). Defaults to device's theme color if not set. | [optional] | +|**androidVisibility** | **Integer** | Channel: Push Notifications Platform: Android 5.0_ &#9888;&#65039;Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. 1 = Public (default) (Shows the full message on the lock screen unless the user has disabled all notifications from showing on the lock screen. Please consider the user and mark private if the contents are.) 0 = Private (Hides message contents on lock screen if the user set \"Hide sensitive notification content\" in the system settings) -1 = Secret (Notification does not show on the lock screen at all) | [optional] | +|**huaweiVisibility** | **Integer** | Channel: Push Notifications Platform: Huawei &#9888;&#65039;Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. 1 = Public (default) (Shows the full message on the lock screen unless the user has disabled all notifications from showing on the lock screen. Please consider the user and mark private if the contents are.) 0 = Private (Hides message contents on lock screen if the user set \"Hide sensitive notification content\" in the system settings) -1 = Secret (Notification does not show on the lock screen at all) | [optional] | +|**iosBadgeType** | **String** | Channel: Push Notifications Platform: iOS Describes whether to set or increase/decrease your app's iOS badge count by the ios_badgeCount specified count. Can specify None, SetTo, or Increase. `None` leaves the count unaffected. `SetTo` directly sets the badge count to the number specified in ios_badgeCount. `Increase` adds the number specified in ios_badgeCount to the total. Use a negative number to decrease the badge count. | [optional] | +|**iosBadgeCount** | **Integer** | Channel: Push Notifications Platform: iOS Used with ios_badgeType, describes the value to set or amount to increase/decrease your app's iOS badge count by. You can use a negative number to decrease the badge count when used with an ios_badgeType of Increase. | [optional] | +|**collapseId** | **String** | Channel: Push Notifications Platform: iOS 10+, Android Only one notification with the same id will be shown on the device. Use the same id to update an existing notification instead of showing a new one. Limit of 64 characters. | [optional] | +|**webPushTopic** | **String** | Channel: Push Notifications Platform: All Browsers Display multiple notifications at once with different topics. | [optional] | +|**apnsAlert** | **Object** | Channel: Push Notifications Platform: iOS 10+ iOS can localize push notification messages on the client using special parameters such as loc-key. When using the Create Notification endpoint, you must include these parameters inside of a field called apns_alert. Please see Apple's guide on localizing push notifications to learn more. | [optional] | +|**delayedOption** | **String** | Channel: All Possible values are: timezone (Deliver at a specific time-of-day in each users own timezone) last-active Same as Intelligent Delivery . (Deliver at the same time of day as each user last used your app). If send_after is used, this takes effect after the send_after time has elapsed. | [optional] | +|**deliveryTimeOfDay** | **String** | Channel: All Use with delayed_option=timezone. Examples: \"9:00AM\" \"21:45\" \"9:45:30\" | [optional] | +|**ttl** | **Integer** | Channel: Push Notifications Platform: iOS, Android, Chrome, Firefox, Safari, ChromeWeb Time To Live - In seconds. The notification will be expired if the device does not come back online within this time. The default is 259,200 seconds (3 days). Max value to set is 2419200 seconds (28 days). | [optional] | +|**priority** | **Integer** | Channel: Push Notifications Platform: Android, Chrome, ChromeWeb Delivery priority through the push server (example GCM/FCM). Pass 10 for high priority or any other integer for normal priority. Defaults to normal priority for Android and high for iOS. For Android 6.0+ devices setting priority to high will wake the device out of doze mode. | [optional] | +|**apnsPushTypeOverride** | **String** | Channel: Push Notifications Platform: iOS valid values: voip Set the value to voip for sending VoIP Notifications This field maps to the APNS header apns-push-type. Note: alert and background are automatically set by OneSignal | [optional] | +|**throttleRatePerMinute** | **String** | Channel: All Apps with throttling enabled: - the parameter value will be used to override the default application throttling value set from the dashboard settings. - parameter value 0 indicates not to apply throttling to the notification. - if the parameter is not passed then the default app throttling value will be applied to the notification. Apps with throttling disabled: - this parameter can be used to throttle delivery for the notification even though throttling is not enabled at the application level. Refer to throttling for more details. | [optional] | +|**androidGroup** | **String** | Channel: Push Notifications Platform: Android Notifications with the same group will be stacked together using Android's Notification Grouping feature. | [optional] | +|**androidGroupMessage** | **String** | Channel: Push Notifications Platform: Android Note: This only works for Android 6 and older. Android 7+ allows full expansion of all message. Summary message to display when 2+ notifications are stacked together. Default is \"# new messages\". Include $[notif_count] in your message and it will be replaced with the current number. Languages - The value of each key is the message that will be sent to users for that language. \"en\" (English) is required. The key of each hash is either a a 2 character language code or one of zh-Hans/zh-Hant for Simplified or Traditional Chinese. Read more: supported languages. Example: {\"en\": \"You have $[notif_count] new messages\"} | [optional] | +|**admGroup** | **String** | Channel: Push Notifications Platform: Amazon Notifications with the same group will be stacked together using Android's Notification Grouping feature. | [optional] | +|**admGroupMessage** | **Object** | Channel: Push Notifications Platform: Amazon Summary message to display when 2+ notifications are stacked together. Default is \"# new messages\". Include $[notif_count] in your message and it will be replaced with the current number. \"en\" (English) is required. The key of each hash is either a a 2 character language code or one of zh-Hans/zh-Hant for Simplified or Traditional Chinese. The value of each key is the message that will be sent to users for that language. Example: {\"en\": \"You have $[notif_count] new messages\"} | [optional] | +|**threadId** | **String** | Channel: Push Notifications Platform: iOS 12+ This parameter is supported in iOS 12 and above. It allows you to group related notifications together. If two notifications have the same thread-id, they will both be added to the same group. | [optional] | +|**summaryArg** | **String** | Channel: Push Notifications Platform: iOS 12+ When using thread_id to create grouped notifications in iOS 12+, you can also control the summary. For example, a grouped notification can say \"12 more notifications from John Doe\". The summary_arg lets you set the name of the person/thing the notifications are coming from, and will show up as \"X more notifications from summary_arg\" | [optional] | +|**summaryArgCount** | **Integer** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" | [optional] | +|**emailSubject** | **String** | Channel: Email Required. The subject of the email. | [optional] | +|**emailBody** | **String** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] | +|**emailFromName** | **String** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] | +|**emailFromAddress** | **String** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] | +|**smsFrom** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] | +|**smsMediaUrls** | **List<String>** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] | + + + +## Enum: AggregationEnum + +| Name | Value | +|---- | -----| +| SUM | "sum" | +| COUNT | "count" | + + + diff --git a/docs/BasicNotificationAllOf.md b/docs/BasicNotificationAllOf.md new file mode 100644 index 00000000..4430a914 --- /dev/null +++ b/docs/BasicNotificationAllOf.md @@ -0,0 +1,109 @@ + + +# BasicNotificationAllOf + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**value** | **Integer** | | [optional] [readonly] | +|**name** | **String** | Required for SMS Messages. An identifier for tracking message within the OneSignal dashboard or export analytics. Not shown to end user. | [optional] | +|**aggregation** | [**AggregationEnum**](#AggregationEnum) | | [optional] [readonly] | +|**isIos** | **Boolean** | Indicates whether to send to all devices registered under your app's Apple iOS platform. | [optional] | +|**isAndroid** | **Boolean** | Indicates whether to send to all devices registered under your app's Google Android platform. | [optional] | +|**isHuawei** | **Boolean** | Indicates whether to send to all devices registered under your app's Huawei Android platform. | [optional] | +|**isAnyWeb** | **Boolean** | Indicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one. | [optional] | +|**isChromeWeb** | **Boolean** | Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform. | [optional] | +|**isFirefox** | **Boolean** | Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform. | [optional] | +|**isSafari** | **Boolean** | Does not support iOS Safari. Indicates whether to send to all Apple's Safari desktop users registered under your Safari web push platform. Read more iOS Safari | [optional] | +|**isWPWNS** | **Boolean** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] | +|**isAdm** | **Boolean** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] | +|**isChrome** | **Boolean** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] | +|**channelForExternalUserIds** | **String** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional] | +|**appId** | **String** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. | [optional] | +|**externalId** | **String** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] | +|**contents** | [**StringMap**](StringMap.md) | | [optional] | +|**headings** | [**StringMap**](StringMap.md) | | [optional] | +|**subtitle** | [**StringMap**](StringMap.md) | | [optional] | +|**data** | **Object** | Channel: Push Notifications Platform: Huawei A custom map of data that is passed back to your app. Same as using Additional Data within the dashboard. Can use up to 2048 bytes of data. Example: {\"abc\": 123, \"foo\": \"bar\", \"event_performed\": true, \"amount\": 12.1} | [optional] | +|**huaweiMsgType** | **String** | Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications. | [optional] | +|**url** | **String** | Channel: Push Notifications Platform: All The URL to open in the browser when a user clicks on the notification. Note: iOS needs https or updated NSAppTransportSecurity in plist This field supports inline substitutions. Omit if including web_url or app_url Example: https://onesignal.com | [optional] | +|**webUrl** | **String** | Channel: Push Notifications Platform: All Browsers Same as url but only sent to web push platforms. Including Chrome, Firefox, Safari, Opera, etc. Example: https://onesignal.com | [optional] | +|**appUrl** | **String** | Channel: Push Notifications Platform: All Browsers Same as url but only sent to web push platforms. Including iOS, Android, macOS, Windows, ChromeApps, etc. Example: https://onesignal.com | [optional] | +|**iosAttachments** | **Object** | Channel: Push Notifications Platform: iOS 10+ Adds media attachments to notifications. Set as JSON object, key as a media id of your choice and the value as a valid local filename or URL. User must press and hold on the notification to view. Do not set mutable_content to download attachments. The OneSignal SDK does this automatically Example: {\"id1\": \"https://domain.com/image.jpg\"} | [optional] | +|**templateId** | **String** | Channel: Push Notifications Platform: All Use a template you setup on our dashboard. The template_id is the UUID found in the URL when viewing a template on our dashboard. Example: be4a8044-bbd6-11e4-a581-000c2940e62c | [optional] | +|**contentAvailable** | **Boolean** | Channel: Push Notifications Platform: iOS Sending true wakes your app from background to run custom native code (Apple interprets this as content-available=1). Note: Not applicable if the app is in the \"force-quit\" state (i.e app was swiped away). Omit the contents field to prevent displaying a visible notification. | [optional] | +|**mutableContent** | **Boolean** | Channel: Push Notifications Platform: iOS 10+ Always defaults to true and cannot be turned off. Allows tracking of notification receives and changing of the notification content in your app before it is displayed. Triggers didReceive(_:withContentHandler:) on your UNNotificationServiceExtension. | [optional] | +|**targetContentIdentifier** | **String** | Channel: Push Notifications Platform: iOS 13+ Use to target a specific experience in your App Clip, or to target your notification to a specific window in a multi-scene App. | [optional] | +|**bigPicture** | **String** | Channel: Push Notifications Platform: Android Picture to display in the expanded view. Can be a drawable resource name or a URL. | [optional] | +|**huaweiBigPicture** | **String** | Channel: Push Notifications Platform: Huawei Picture to display in the expanded view. Can be a drawable resource name or a URL. | [optional] | +|**admBigPicture** | **String** | Channel: Push Notifications Platform: Amazon Picture to display in the expanded view. Can be a drawable resource name or a URL. | [optional] | +|**chromeBigPicture** | **String** | Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL. | [optional] | +|**chromeWebImage** | **String** | Channel: Push Notifications Platform: Chrome 56+ Sets the web push notification's large image to be shown below the notification's title and text. Please see Web Push Notification Icons. | [optional] | +|**buttons** | [**List<Button>**](Button.md) | Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}] | [optional] | +|**webButtons** | [**List<Button>**](Button.md) | Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}] | [optional] | +|**iosCategory** | **String** | Channel: Push Notifications Platform: iOS Category APS payload, use with registerUserNotificationSettings:categories in your Objective-C / Swift code. Example: calendar category which contains actions like accept and decline iOS 10+ This will trigger your UNNotificationContentExtension whose ID matches this category. | [optional] | +|**androidChannelId** | **String** | Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] | +|**huaweiChannelId** | **String** | Channel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] | +|**existingAndroidChannelId** | **String** | Channel: Push Notifications Platform: Android Use this if you have client side Android Oreo Channels you have already defined in your app with code. | [optional] | +|**huaweiExistingChannelId** | **String** | Channel: Push Notifications Platform: Huawei Use this if you have client side Android Oreo Channels you have already defined in your app with code. | [optional] | +|**androidBackgroundLayout** | [**BasicNotificationAllOfAndroidBackgroundLayout**](BasicNotificationAllOfAndroidBackgroundLayout.md) | | [optional] | +|**smallIcon** | **String** | Channel: Push Notifications Platform: Android Icon shown in the status bar and on the top left of the notification. If not set a bell icon will be used or ic_stat_onesignal_default if you have set this resource name. See: How to create small icons | [optional] | +|**huaweiSmallIcon** | **String** | Channel: Push Notifications Platform: Huawei Icon shown in the status bar and on the top left of the notification. Use an Android resource path (E.g. /drawable/small_icon). Defaults to your app icon if not set. | [optional] | +|**largeIcon** | **String** | Channel: Push Notifications Platform: Android Can be a drawable resource name or a URL. See: How to create large icons | [optional] | +|**huaweiLargeIcon** | **String** | Channel: Push Notifications Platform: Huawei Can be a drawable resource name or a URL. See: How to create large icons | [optional] | +|**admSmallIcon** | **String** | Channel: Push Notifications Platform: Amazon If not set a bell icon will be used or ic_stat_onesignal_default if you have set this resource name. See: How to create small icons | [optional] | +|**admLargeIcon** | **String** | Channel: Push Notifications Platform: Amazon If blank the small_icon is used. Can be a drawable resource name or a URL. See: How to create large icons | [optional] | +|**chromeWebIcon** | **String** | Channel: Push Notifications Platform: Chrome Sets the web push notification's icon. An image URL linking to a valid image. Common image types are supported; GIF will not animate. We recommend 256x256 (at least 80x80) to display well on high DPI devices. Firefox will also use this icon, unless you specify firefox_icon. | [optional] | +|**chromeWebBadge** | **String** | Channel: Push Notifications Platform: Chrome Sets the web push notification icon for Android devices in the notification shade. Please see Web Push Notification Badge. | [optional] | +|**firefoxIcon** | **String** | Channel: Push Notifications Platform: Firefox Not recommended Few people need to set Firefox-specific icons. We recommend setting chrome_web_icon instead, which Firefox will also use. Sets the web push notification's icon for Firefox. An image URL linking to a valid image. Common image types are supported; GIF will not animate. We recommend 256x256 (at least 80x80) to display well on high DPI devices. | [optional] | +|**chromeIcon** | **String** | Channel: Push Notifications Platform: ChromeApp This flag is not used for web push For web push, please see chrome_web_icon instead. The local URL to an icon to use. If blank, the app icon will be used. | [optional] | +|**iosSound** | **String** | Channel: Push Notifications Platform: iOS Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable vibration and sound for the notification. Example: \"notification.wav\" | [optional] | +|**androidSound** | **String** | Channel: Push Notifications Platform: Android &#9888;&#65039;Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable sound for the notification. NOTE: Leave off file extension for Android. Example: \"notification\" | [optional] | +|**huaweiSound** | **String** | Channel: Push Notifications Platform: Huawei &#9888;&#65039;Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. Sound file that is included in your app to play instead of the default device notification sound. NOTE: Leave off file extension for and include the full path. Example: \"/res/raw/notification\" | [optional] | +|**admSound** | **String** | Channel: Push Notifications Platform: Amazon &#9888;&#65039;Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable sound for the notification. NOTE: Leave off file extension for Android. Example: \"notification\" | [optional] | +|**wpWnsSound** | **String** | Channel: Push Notifications Platform: Windows Sound file that is included in your app to play instead of the default device notification sound. Example: \"notification.wav\" | [optional] | +|**androidLedColor** | **String** | Channel: Push Notifications Platform: Android &#9888;&#65039;Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sets the devices LED notification light if the device has one. ARGB Hex format. Example(Blue): \"FF0000FF\" | [optional] | +|**huaweiLedColor** | **String** | Channel: Push Notifications Platform: Huawei &#9888;&#65039;Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. Sets the devices LED notification light if the device has one. RGB Hex format. Example(Blue): \"0000FF\" | [optional] | +|**androidAccentColor** | **String** | Channel: Push Notifications Platform: Android Sets the background color of the notification circle to the left of the notification text. Only applies to apps targeting Android API level 21+ on Android 5.0+ devices. Example(Red): \"FFFF0000\" | [optional] | +|**huaweiAccentColor** | **String** | Channel: Push Notifications Platform: Huawei Accent Color used on Action Buttons and Group overflow count. Uses RGB Hex value (E.g. #9900FF). Defaults to device's theme color if not set. | [optional] | +|**androidVisibility** | **Integer** | Channel: Push Notifications Platform: Android 5.0_ &#9888;&#65039;Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. 1 = Public (default) (Shows the full message on the lock screen unless the user has disabled all notifications from showing on the lock screen. Please consider the user and mark private if the contents are.) 0 = Private (Hides message contents on lock screen if the user set \"Hide sensitive notification content\" in the system settings) -1 = Secret (Notification does not show on the lock screen at all) | [optional] | +|**huaweiVisibility** | **Integer** | Channel: Push Notifications Platform: Huawei &#9888;&#65039;Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. 1 = Public (default) (Shows the full message on the lock screen unless the user has disabled all notifications from showing on the lock screen. Please consider the user and mark private if the contents are.) 0 = Private (Hides message contents on lock screen if the user set \"Hide sensitive notification content\" in the system settings) -1 = Secret (Notification does not show on the lock screen at all) | [optional] | +|**iosBadgeType** | **String** | Channel: Push Notifications Platform: iOS Describes whether to set or increase/decrease your app's iOS badge count by the ios_badgeCount specified count. Can specify None, SetTo, or Increase. `None` leaves the count unaffected. `SetTo` directly sets the badge count to the number specified in ios_badgeCount. `Increase` adds the number specified in ios_badgeCount to the total. Use a negative number to decrease the badge count. | [optional] | +|**iosBadgeCount** | **Integer** | Channel: Push Notifications Platform: iOS Used with ios_badgeType, describes the value to set or amount to increase/decrease your app's iOS badge count by. You can use a negative number to decrease the badge count when used with an ios_badgeType of Increase. | [optional] | +|**collapseId** | **String** | Channel: Push Notifications Platform: iOS 10+, Android Only one notification with the same id will be shown on the device. Use the same id to update an existing notification instead of showing a new one. Limit of 64 characters. | [optional] | +|**webPushTopic** | **String** | Channel: Push Notifications Platform: All Browsers Display multiple notifications at once with different topics. | [optional] | +|**apnsAlert** | **Object** | Channel: Push Notifications Platform: iOS 10+ iOS can localize push notification messages on the client using special parameters such as loc-key. When using the Create Notification endpoint, you must include these parameters inside of a field called apns_alert. Please see Apple's guide on localizing push notifications to learn more. | [optional] | +|**delayedOption** | **String** | Channel: All Possible values are: timezone (Deliver at a specific time-of-day in each users own timezone) last-active Same as Intelligent Delivery . (Deliver at the same time of day as each user last used your app). If send_after is used, this takes effect after the send_after time has elapsed. | [optional] | +|**deliveryTimeOfDay** | **String** | Channel: All Use with delayed_option=timezone. Examples: \"9:00AM\" \"21:45\" \"9:45:30\" | [optional] | +|**ttl** | **Integer** | Channel: Push Notifications Platform: iOS, Android, Chrome, Firefox, Safari, ChromeWeb Time To Live - In seconds. The notification will be expired if the device does not come back online within this time. The default is 259,200 seconds (3 days). Max value to set is 2419200 seconds (28 days). | [optional] | +|**priority** | **Integer** | Channel: Push Notifications Platform: Android, Chrome, ChromeWeb Delivery priority through the push server (example GCM/FCM). Pass 10 for high priority or any other integer for normal priority. Defaults to normal priority for Android and high for iOS. For Android 6.0+ devices setting priority to high will wake the device out of doze mode. | [optional] | +|**apnsPushTypeOverride** | **String** | Channel: Push Notifications Platform: iOS valid values: voip Set the value to voip for sending VoIP Notifications This field maps to the APNS header apns-push-type. Note: alert and background are automatically set by OneSignal | [optional] | +|**throttleRatePerMinute** | **String** | Channel: All Apps with throttling enabled: - the parameter value will be used to override the default application throttling value set from the dashboard settings. - parameter value 0 indicates not to apply throttling to the notification. - if the parameter is not passed then the default app throttling value will be applied to the notification. Apps with throttling disabled: - this parameter can be used to throttle delivery for the notification even though throttling is not enabled at the application level. Refer to throttling for more details. | [optional] | +|**androidGroup** | **String** | Channel: Push Notifications Platform: Android Notifications with the same group will be stacked together using Android's Notification Grouping feature. | [optional] | +|**androidGroupMessage** | **String** | Channel: Push Notifications Platform: Android Note: This only works for Android 6 and older. Android 7+ allows full expansion of all message. Summary message to display when 2+ notifications are stacked together. Default is \"# new messages\". Include $[notif_count] in your message and it will be replaced with the current number. Languages - The value of each key is the message that will be sent to users for that language. \"en\" (English) is required. The key of each hash is either a a 2 character language code or one of zh-Hans/zh-Hant for Simplified or Traditional Chinese. Read more: supported languages. Example: {\"en\": \"You have $[notif_count] new messages\"} | [optional] | +|**admGroup** | **String** | Channel: Push Notifications Platform: Amazon Notifications with the same group will be stacked together using Android's Notification Grouping feature. | [optional] | +|**admGroupMessage** | **Object** | Channel: Push Notifications Platform: Amazon Summary message to display when 2+ notifications are stacked together. Default is \"# new messages\". Include $[notif_count] in your message and it will be replaced with the current number. \"en\" (English) is required. The key of each hash is either a a 2 character language code or one of zh-Hans/zh-Hant for Simplified or Traditional Chinese. The value of each key is the message that will be sent to users for that language. Example: {\"en\": \"You have $[notif_count] new messages\"} | [optional] | +|**threadId** | **String** | Channel: Push Notifications Platform: iOS 12+ This parameter is supported in iOS 12 and above. It allows you to group related notifications together. If two notifications have the same thread-id, they will both be added to the same group. | [optional] | +|**summaryArg** | **String** | Channel: Push Notifications Platform: iOS 12+ When using thread_id to create grouped notifications in iOS 12+, you can also control the summary. For example, a grouped notification can say \"12 more notifications from John Doe\". The summary_arg lets you set the name of the person/thing the notifications are coming from, and will show up as \"X more notifications from summary_arg\" | [optional] | +|**summaryArgCount** | **Integer** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" | [optional] | +|**emailSubject** | **String** | Channel: Email Required. The subject of the email. | [optional] | +|**emailBody** | **String** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] | +|**emailFromName** | **String** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] | +|**emailFromAddress** | **String** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] | +|**smsFrom** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] | +|**smsMediaUrls** | **List<String>** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] | + + + +## Enum: AggregationEnum + +| Name | Value | +|---- | -----| +| SUM | "sum" | +| COUNT | "count" | + + + diff --git a/docs/NotificationAllOfAndroidBackgroundLayout.md b/docs/BasicNotificationAllOfAndroidBackgroundLayout.md similarity index 93% rename from docs/NotificationAllOfAndroidBackgroundLayout.md rename to docs/BasicNotificationAllOfAndroidBackgroundLayout.md index e804d62a..a0d0054a 100644 --- a/docs/NotificationAllOfAndroidBackgroundLayout.md +++ b/docs/BasicNotificationAllOfAndroidBackgroundLayout.md @@ -1,6 +1,6 @@ -# NotificationAllOfAndroidBackgroundLayout +# BasicNotificationAllOfAndroidBackgroundLayout Channel: Push Notifications Platform: Android Allowing setting a background image for the notification. This is a JSON object containing the following keys. See our Background Image documentation for image sizes. diff --git a/docs/DeletePlayerBadRequestResponse.md b/docs/DeletePlayerBadRequestResponse.md index c3c3c447..9e9e781a 100644 --- a/docs/DeletePlayerBadRequestResponse.md +++ b/docs/DeletePlayerBadRequestResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**erorrs** | **List<String>** | | [optional] | +|**erorrs** | **List<Boolean>** | | [optional] | diff --git a/docs/DeletePlayerNotFoundResponse.md b/docs/DeletePlayerNotFoundResponse.md index 042efece..2b2a865e 100644 --- a/docs/DeletePlayerNotFoundResponse.md +++ b/docs/DeletePlayerNotFoundResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**success** | **String** | | [optional] | +|**success** | **Boolean** | | [optional] | diff --git a/docs/DeletePlayerSuccessResponse.md b/docs/DeletePlayerSuccessResponse.md index a18726b9..3b4c9764 100644 --- a/docs/DeletePlayerSuccessResponse.md +++ b/docs/DeletePlayerSuccessResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**success** | **String** | | [optional] | +|**success** | **Boolean** | | [optional] | diff --git a/docs/DeliveryData.md b/docs/DeliveryData.md index 8c020069..3506cd99 100644 --- a/docs/DeliveryData.md +++ b/docs/DeliveryData.md @@ -7,11 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**successful** | **Integer** | | [optional] | -|**failed** | **Integer** | | [optional] | -|**errored** | **Integer** | | [optional] | -|**converted** | **Integer** | | [optional] | -|**received** | **Integer** | | [optional] | +|**successful** | **Integer** | Number of messages delivered to push servers, mobile carriers, or email service providers. | [optional] | +|**failed** | **Integer** | Number of messages sent to unsubscribed devices. | [optional] | +|**errored** | **Integer** | Number of errors reported. | [optional] | +|**converted** | **Integer** | Number of messages that were clicked. | [optional] | +|**received** | **Integer** | Number of devices that received the message. | [optional] | diff --git a/docs/ExportPlayersRequestBody.md b/docs/ExportPlayersRequestBody.md index 64f49ec6..57675a7c 100644 --- a/docs/ExportPlayersRequestBody.md +++ b/docs/ExportPlayersRequestBody.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**extraFields** | **List<String>** | Additional fields that you wish to include. Currently supports location, country, rooted, notification_types, ip, external_user_id, web_auth, and web_p256. | [optional] | -|**lastActiveSince** | **Integer** | Export all devices with a last_active timestamp greater than this time. Unixtime in seconds. | [optional] | +|**lastActiveSince** | **String** | Export all devices with a last_active timestamp greater than this time. Unixtime in seconds. | [optional] | |**segmentName** | **String** | Export al ldevices belonging to the segment. | [optional] | diff --git a/docs/Notification.md b/docs/Notification.md index 2bc0ea38..5d1eb889 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -73,7 +73,7 @@ |**huaweiChannelId** | **String** | Channel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] | |**existingAndroidChannelId** | **String** | Channel: Push Notifications Platform: Android Use this if you have client side Android Oreo Channels you have already defined in your app with code. | [optional] | |**huaweiExistingChannelId** | **String** | Channel: Push Notifications Platform: Huawei Use this if you have client side Android Oreo Channels you have already defined in your app with code. | [optional] | -|**androidBackgroundLayout** | [**NotificationAllOfAndroidBackgroundLayout**](NotificationAllOfAndroidBackgroundLayout.md) | | [optional] | +|**androidBackgroundLayout** | [**BasicNotificationAllOfAndroidBackgroundLayout**](BasicNotificationAllOfAndroidBackgroundLayout.md) | | [optional] | |**smallIcon** | **String** | Channel: Push Notifications Platform: Android Icon shown in the status bar and on the top left of the notification. If not set a bell icon will be used or ic_stat_onesignal_default if you have set this resource name. See: How to create small icons | [optional] | |**huaweiSmallIcon** | **String** | Channel: Push Notifications Platform: Huawei Icon shown in the status bar and on the top left of the notification. Use an Android resource path (E.g. /drawable/small_icon). Defaults to your app icon if not set. | [optional] | |**largeIcon** | **String** | Channel: Push Notifications Platform: Android Can be a drawable resource name or a URL. See: How to create large icons | [optional] | @@ -100,7 +100,6 @@ |**collapseId** | **String** | Channel: Push Notifications Platform: iOS 10+, Android Only one notification with the same id will be shown on the device. Use the same id to update an existing notification instead of showing a new one. Limit of 64 characters. | [optional] | |**webPushTopic** | **String** | Channel: Push Notifications Platform: All Browsers Display multiple notifications at once with different topics. | [optional] | |**apnsAlert** | **Object** | Channel: Push Notifications Platform: iOS 10+ iOS can localize push notification messages on the client using special parameters such as loc-key. When using the Create Notification endpoint, you must include these parameters inside of a field called apns_alert. Please see Apple's guide on localizing push notifications to learn more. | [optional] | -|**sendAfter** | **OffsetDateTime** | Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. | [optional] | |**delayedOption** | **String** | Channel: All Possible values are: timezone (Deliver at a specific time-of-day in each users own timezone) last-active Same as Intelligent Delivery . (Deliver at the same time of day as each user last used your app). If send_after is used, this takes effect after the send_after time has elapsed. | [optional] | |**deliveryTimeOfDay** | **String** | Channel: All Use with delayed_option=timezone. Examples: \"9:00AM\" \"21:45\" \"9:45:30\" | [optional] | |**ttl** | **Integer** | Channel: Push Notifications Platform: iOS, Android, Chrome, Firefox, Safari, ChromeWeb Time To Live - In seconds. The notification will be expired if the device does not come back online within this time. The default is 259,200 seconds (3 days). Max value to set is 2419200 seconds (28 days). | [optional] | @@ -120,6 +119,7 @@ |**emailFromAddress** | **String** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] | |**smsFrom** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] | |**smsMediaUrls** | **List<String>** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] | +|**sendAfter** | **OffsetDateTime** | Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. | [optional] | diff --git a/docs/NotificationAllOf.md b/docs/NotificationAllOf.md index 47049f9a..92caf8fd 100644 --- a/docs/NotificationAllOf.md +++ b/docs/NotificationAllOf.md @@ -7,104 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**value** | **Integer** | | [optional] [readonly] | -|**name** | **String** | Required for SMS Messages. An identifier for tracking message within the OneSignal dashboard or export analytics. Not shown to end user. | [optional] | -|**aggregation** | [**AggregationEnum**](#AggregationEnum) | | [optional] [readonly] | -|**isIos** | **Boolean** | Indicates whether to send to all devices registered under your app's Apple iOS platform. | [optional] | -|**isAndroid** | **Boolean** | Indicates whether to send to all devices registered under your app's Google Android platform. | [optional] | -|**isHuawei** | **Boolean** | Indicates whether to send to all devices registered under your app's Huawei Android platform. | [optional] | -|**isAnyWeb** | **Boolean** | Indicates whether to send to all subscribed web browser users, including Chrome, Firefox, and Safari. You may use this instead as a combined flag instead of separately enabling isChromeWeb, isFirefox, and isSafari, though the three options are equivalent to this one. | [optional] | -|**isChromeWeb** | **Boolean** | Indicates whether to send to all Google Chrome, Chrome on Android, and Mozilla Firefox users registered under your Chrome & Firefox web push platform. | [optional] | -|**isFirefox** | **Boolean** | Indicates whether to send to all Mozilla Firefox desktop users registered under your Firefox web push platform. | [optional] | -|**isSafari** | **Boolean** | Does not support iOS Safari. Indicates whether to send to all Apple's Safari desktop users registered under your Safari web push platform. Read more iOS Safari | [optional] | -|**isWPWNS** | **Boolean** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] | -|**isAdm** | **Boolean** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] | -|**isChrome** | **Boolean** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] | -|**channelForExternalUserIds** | **String** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional] | -|**appId** | **String** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. | [optional] | -|**externalId** | **String** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] | -|**contents** | [**StringMap**](StringMap.md) | | [optional] | -|**headings** | [**StringMap**](StringMap.md) | | [optional] | -|**subtitle** | [**StringMap**](StringMap.md) | | [optional] | -|**data** | **Object** | Channel: Push Notifications Platform: Huawei A custom map of data that is passed back to your app. Same as using Additional Data within the dashboard. Can use up to 2048 bytes of data. Example: {\"abc\": 123, \"foo\": \"bar\", \"event_performed\": true, \"amount\": 12.1} | [optional] | -|**huaweiMsgType** | **String** | Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications. | [optional] | -|**url** | **String** | Channel: Push Notifications Platform: All The URL to open in the browser when a user clicks on the notification. Note: iOS needs https or updated NSAppTransportSecurity in plist This field supports inline substitutions. Omit if including web_url or app_url Example: https://onesignal.com | [optional] | -|**webUrl** | **String** | Channel: Push Notifications Platform: All Browsers Same as url but only sent to web push platforms. Including Chrome, Firefox, Safari, Opera, etc. Example: https://onesignal.com | [optional] | -|**appUrl** | **String** | Channel: Push Notifications Platform: All Browsers Same as url but only sent to web push platforms. Including iOS, Android, macOS, Windows, ChromeApps, etc. Example: https://onesignal.com | [optional] | -|**iosAttachments** | **Object** | Channel: Push Notifications Platform: iOS 10+ Adds media attachments to notifications. Set as JSON object, key as a media id of your choice and the value as a valid local filename or URL. User must press and hold on the notification to view. Do not set mutable_content to download attachments. The OneSignal SDK does this automatically Example: {\"id1\": \"https://domain.com/image.jpg\"} | [optional] | -|**templateId** | **String** | Channel: Push Notifications Platform: All Use a template you setup on our dashboard. The template_id is the UUID found in the URL when viewing a template on our dashboard. Example: be4a8044-bbd6-11e4-a581-000c2940e62c | [optional] | -|**contentAvailable** | **Boolean** | Channel: Push Notifications Platform: iOS Sending true wakes your app from background to run custom native code (Apple interprets this as content-available=1). Note: Not applicable if the app is in the \"force-quit\" state (i.e app was swiped away). Omit the contents field to prevent displaying a visible notification. | [optional] | -|**mutableContent** | **Boolean** | Channel: Push Notifications Platform: iOS 10+ Always defaults to true and cannot be turned off. Allows tracking of notification receives and changing of the notification content in your app before it is displayed. Triggers didReceive(_:withContentHandler:) on your UNNotificationServiceExtension. | [optional] | -|**targetContentIdentifier** | **String** | Channel: Push Notifications Platform: iOS 13+ Use to target a specific experience in your App Clip, or to target your notification to a specific window in a multi-scene App. | [optional] | -|**bigPicture** | **String** | Channel: Push Notifications Platform: Android Picture to display in the expanded view. Can be a drawable resource name or a URL. | [optional] | -|**huaweiBigPicture** | **String** | Channel: Push Notifications Platform: Huawei Picture to display in the expanded view. Can be a drawable resource name or a URL. | [optional] | -|**admBigPicture** | **String** | Channel: Push Notifications Platform: Amazon Picture to display in the expanded view. Can be a drawable resource name or a URL. | [optional] | -|**chromeBigPicture** | **String** | Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL. | [optional] | -|**chromeWebImage** | **String** | Channel: Push Notifications Platform: Chrome 56+ Sets the web push notification's large image to be shown below the notification's title and text. Please see Web Push Notification Icons. | [optional] | -|**buttons** | [**List<Button>**](Button.md) | Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}] | [optional] | -|**webButtons** | [**List<Button>**](Button.md) | Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}] | [optional] | -|**iosCategory** | **String** | Channel: Push Notifications Platform: iOS Category APS payload, use with registerUserNotificationSettings:categories in your Objective-C / Swift code. Example: calendar category which contains actions like accept and decline iOS 10+ This will trigger your UNNotificationContentExtension whose ID matches this category. | [optional] | -|**androidChannelId** | **String** | Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] | -|**huaweiChannelId** | **String** | Channel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] | -|**existingAndroidChannelId** | **String** | Channel: Push Notifications Platform: Android Use this if you have client side Android Oreo Channels you have already defined in your app with code. | [optional] | -|**huaweiExistingChannelId** | **String** | Channel: Push Notifications Platform: Huawei Use this if you have client side Android Oreo Channels you have already defined in your app with code. | [optional] | -|**androidBackgroundLayout** | [**NotificationAllOfAndroidBackgroundLayout**](NotificationAllOfAndroidBackgroundLayout.md) | | [optional] | -|**smallIcon** | **String** | Channel: Push Notifications Platform: Android Icon shown in the status bar and on the top left of the notification. If not set a bell icon will be used or ic_stat_onesignal_default if you have set this resource name. See: How to create small icons | [optional] | -|**huaweiSmallIcon** | **String** | Channel: Push Notifications Platform: Huawei Icon shown in the status bar and on the top left of the notification. Use an Android resource path (E.g. /drawable/small_icon). Defaults to your app icon if not set. | [optional] | -|**largeIcon** | **String** | Channel: Push Notifications Platform: Android Can be a drawable resource name or a URL. See: How to create large icons | [optional] | -|**huaweiLargeIcon** | **String** | Channel: Push Notifications Platform: Huawei Can be a drawable resource name or a URL. See: How to create large icons | [optional] | -|**admSmallIcon** | **String** | Channel: Push Notifications Platform: Amazon If not set a bell icon will be used or ic_stat_onesignal_default if you have set this resource name. See: How to create small icons | [optional] | -|**admLargeIcon** | **String** | Channel: Push Notifications Platform: Amazon If blank the small_icon is used. Can be a drawable resource name or a URL. See: How to create large icons | [optional] | -|**chromeWebIcon** | **String** | Channel: Push Notifications Platform: Chrome Sets the web push notification's icon. An image URL linking to a valid image. Common image types are supported; GIF will not animate. We recommend 256x256 (at least 80x80) to display well on high DPI devices. Firefox will also use this icon, unless you specify firefox_icon. | [optional] | -|**chromeWebBadge** | **String** | Channel: Push Notifications Platform: Chrome Sets the web push notification icon for Android devices in the notification shade. Please see Web Push Notification Badge. | [optional] | -|**firefoxIcon** | **String** | Channel: Push Notifications Platform: Firefox Not recommended Few people need to set Firefox-specific icons. We recommend setting chrome_web_icon instead, which Firefox will also use. Sets the web push notification's icon for Firefox. An image URL linking to a valid image. Common image types are supported; GIF will not animate. We recommend 256x256 (at least 80x80) to display well on high DPI devices. | [optional] | -|**chromeIcon** | **String** | Channel: Push Notifications Platform: ChromeApp This flag is not used for web push For web push, please see chrome_web_icon instead. The local URL to an icon to use. If blank, the app icon will be used. | [optional] | -|**iosSound** | **String** | Channel: Push Notifications Platform: iOS Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable vibration and sound for the notification. Example: \"notification.wav\" | [optional] | -|**androidSound** | **String** | Channel: Push Notifications Platform: Android &#9888;&#65039;Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable sound for the notification. NOTE: Leave off file extension for Android. Example: \"notification\" | [optional] | -|**huaweiSound** | **String** | Channel: Push Notifications Platform: Huawei &#9888;&#65039;Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. Sound file that is included in your app to play instead of the default device notification sound. NOTE: Leave off file extension for and include the full path. Example: \"/res/raw/notification\" | [optional] | -|**admSound** | **String** | Channel: Push Notifications Platform: Amazon &#9888;&#65039;Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sound file that is included in your app to play instead of the default device notification sound. Pass nil to disable sound for the notification. NOTE: Leave off file extension for Android. Example: \"notification\" | [optional] | -|**wpWnsSound** | **String** | Channel: Push Notifications Platform: Windows Sound file that is included in your app to play instead of the default device notification sound. Example: \"notification.wav\" | [optional] | -|**androidLedColor** | **String** | Channel: Push Notifications Platform: Android &#9888;&#65039;Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. Sets the devices LED notification light if the device has one. ARGB Hex format. Example(Blue): \"FF0000FF\" | [optional] | -|**huaweiLedColor** | **String** | Channel: Push Notifications Platform: Huawei &#9888;&#65039;Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. Sets the devices LED notification light if the device has one. RGB Hex format. Example(Blue): \"0000FF\" | [optional] | -|**androidAccentColor** | **String** | Channel: Push Notifications Platform: Android Sets the background color of the notification circle to the left of the notification text. Only applies to apps targeting Android API level 21+ on Android 5.0+ devices. Example(Red): \"FFFF0000\" | [optional] | -|**huaweiAccentColor** | **String** | Channel: Push Notifications Platform: Huawei Accent Color used on Action Buttons and Group overflow count. Uses RGB Hex value (E.g. #9900FF). Defaults to device's theme color if not set. | [optional] | -|**androidVisibility** | **Integer** | Channel: Push Notifications Platform: Android 5.0_ &#9888;&#65039;Deprecated, this field doesn't work on Android 8 (Oreo) and newer devices! Please use Notification Categories / Channels noted above instead to support ALL versions of Android. 1 = Public (default) (Shows the full message on the lock screen unless the user has disabled all notifications from showing on the lock screen. Please consider the user and mark private if the contents are.) 0 = Private (Hides message contents on lock screen if the user set \"Hide sensitive notification content\" in the system settings) -1 = Secret (Notification does not show on the lock screen at all) | [optional] | -|**huaweiVisibility** | **Integer** | Channel: Push Notifications Platform: Huawei &#9888;&#65039;Deprecated, this field ONLY works on EMUI 5 (Android 7 based) and older devices. Please also set Notification Categories / Channels noted above to support EMUI 8 (Android 8 based) devices. 1 = Public (default) (Shows the full message on the lock screen unless the user has disabled all notifications from showing on the lock screen. Please consider the user and mark private if the contents are.) 0 = Private (Hides message contents on lock screen if the user set \"Hide sensitive notification content\" in the system settings) -1 = Secret (Notification does not show on the lock screen at all) | [optional] | -|**iosBadgeType** | **String** | Channel: Push Notifications Platform: iOS Describes whether to set or increase/decrease your app's iOS badge count by the ios_badgeCount specified count. Can specify None, SetTo, or Increase. `None` leaves the count unaffected. `SetTo` directly sets the badge count to the number specified in ios_badgeCount. `Increase` adds the number specified in ios_badgeCount to the total. Use a negative number to decrease the badge count. | [optional] | -|**iosBadgeCount** | **Integer** | Channel: Push Notifications Platform: iOS Used with ios_badgeType, describes the value to set or amount to increase/decrease your app's iOS badge count by. You can use a negative number to decrease the badge count when used with an ios_badgeType of Increase. | [optional] | -|**collapseId** | **String** | Channel: Push Notifications Platform: iOS 10+, Android Only one notification with the same id will be shown on the device. Use the same id to update an existing notification instead of showing a new one. Limit of 64 characters. | [optional] | -|**webPushTopic** | **String** | Channel: Push Notifications Platform: All Browsers Display multiple notifications at once with different topics. | [optional] | -|**apnsAlert** | **Object** | Channel: Push Notifications Platform: iOS 10+ iOS can localize push notification messages on the client using special parameters such as loc-key. When using the Create Notification endpoint, you must include these parameters inside of a field called apns_alert. Please see Apple's guide on localizing push notifications to learn more. | [optional] | |**sendAfter** | **OffsetDateTime** | Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. | [optional] | -|**delayedOption** | **String** | Channel: All Possible values are: timezone (Deliver at a specific time-of-day in each users own timezone) last-active Same as Intelligent Delivery . (Deliver at the same time of day as each user last used your app). If send_after is used, this takes effect after the send_after time has elapsed. | [optional] | -|**deliveryTimeOfDay** | **String** | Channel: All Use with delayed_option=timezone. Examples: \"9:00AM\" \"21:45\" \"9:45:30\" | [optional] | -|**ttl** | **Integer** | Channel: Push Notifications Platform: iOS, Android, Chrome, Firefox, Safari, ChromeWeb Time To Live - In seconds. The notification will be expired if the device does not come back online within this time. The default is 259,200 seconds (3 days). Max value to set is 2419200 seconds (28 days). | [optional] | -|**priority** | **Integer** | Channel: Push Notifications Platform: Android, Chrome, ChromeWeb Delivery priority through the push server (example GCM/FCM). Pass 10 for high priority or any other integer for normal priority. Defaults to normal priority for Android and high for iOS. For Android 6.0+ devices setting priority to high will wake the device out of doze mode. | [optional] | -|**apnsPushTypeOverride** | **String** | Channel: Push Notifications Platform: iOS valid values: voip Set the value to voip for sending VoIP Notifications This field maps to the APNS header apns-push-type. Note: alert and background are automatically set by OneSignal | [optional] | -|**throttleRatePerMinute** | **String** | Channel: All Apps with throttling enabled: - the parameter value will be used to override the default application throttling value set from the dashboard settings. - parameter value 0 indicates not to apply throttling to the notification. - if the parameter is not passed then the default app throttling value will be applied to the notification. Apps with throttling disabled: - this parameter can be used to throttle delivery for the notification even though throttling is not enabled at the application level. Refer to throttling for more details. | [optional] | -|**androidGroup** | **String** | Channel: Push Notifications Platform: Android Notifications with the same group will be stacked together using Android's Notification Grouping feature. | [optional] | -|**androidGroupMessage** | **String** | Channel: Push Notifications Platform: Android Note: This only works for Android 6 and older. Android 7+ allows full expansion of all message. Summary message to display when 2+ notifications are stacked together. Default is \"# new messages\". Include $[notif_count] in your message and it will be replaced with the current number. Languages - The value of each key is the message that will be sent to users for that language. \"en\" (English) is required. The key of each hash is either a a 2 character language code or one of zh-Hans/zh-Hant for Simplified or Traditional Chinese. Read more: supported languages. Example: {\"en\": \"You have $[notif_count] new messages\"} | [optional] | -|**admGroup** | **String** | Channel: Push Notifications Platform: Amazon Notifications with the same group will be stacked together using Android's Notification Grouping feature. | [optional] | -|**admGroupMessage** | **Object** | Channel: Push Notifications Platform: Amazon Summary message to display when 2+ notifications are stacked together. Default is \"# new messages\". Include $[notif_count] in your message and it will be replaced with the current number. \"en\" (English) is required. The key of each hash is either a a 2 character language code or one of zh-Hans/zh-Hant for Simplified or Traditional Chinese. The value of each key is the message that will be sent to users for that language. Example: {\"en\": \"You have $[notif_count] new messages\"} | [optional] | -|**threadId** | **String** | Channel: Push Notifications Platform: iOS 12+ This parameter is supported in iOS 12 and above. It allows you to group related notifications together. If two notifications have the same thread-id, they will both be added to the same group. | [optional] | -|**summaryArg** | **String** | Channel: Push Notifications Platform: iOS 12+ When using thread_id to create grouped notifications in iOS 12+, you can also control the summary. For example, a grouped notification can say \"12 more notifications from John Doe\". The summary_arg lets you set the name of the person/thing the notifications are coming from, and will show up as \"X more notifications from summary_arg\" | [optional] | -|**summaryArgCount** | **Integer** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" | [optional] | -|**emailSubject** | **String** | Channel: Email Required. The subject of the email. | [optional] | -|**emailBody** | **String** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] | -|**emailFromName** | **String** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] | -|**emailFromAddress** | **String** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional] | -|**smsFrom** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] | -|**smsMediaUrls** | **List<String>** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] | - - - -## Enum: AggregationEnum - -| Name | Value | -|---- | -----| -| SUM | "sum" | -| COUNT | "count" | diff --git a/docs/NotificationWithMeta.md b/docs/NotificationWithMeta.md index f9a01358..730ec9c4 100644 --- a/docs/NotificationWithMeta.md +++ b/docs/NotificationWithMeta.md @@ -73,7 +73,7 @@ |**huaweiChannelId** | **String** | Channel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] | |**existingAndroidChannelId** | **String** | Channel: Push Notifications Platform: Android Use this if you have client side Android Oreo Channels you have already defined in your app with code. | [optional] | |**huaweiExistingChannelId** | **String** | Channel: Push Notifications Platform: Huawei Use this if you have client side Android Oreo Channels you have already defined in your app with code. | [optional] | -|**androidBackgroundLayout** | [**NotificationAllOfAndroidBackgroundLayout**](NotificationAllOfAndroidBackgroundLayout.md) | | [optional] | +|**androidBackgroundLayout** | [**BasicNotificationAllOfAndroidBackgroundLayout**](BasicNotificationAllOfAndroidBackgroundLayout.md) | | [optional] | |**smallIcon** | **String** | Channel: Push Notifications Platform: Android Icon shown in the status bar and on the top left of the notification. If not set a bell icon will be used or ic_stat_onesignal_default if you have set this resource name. See: How to create small icons | [optional] | |**huaweiSmallIcon** | **String** | Channel: Push Notifications Platform: Huawei Icon shown in the status bar and on the top left of the notification. Use an Android resource path (E.g. /drawable/small_icon). Defaults to your app icon if not set. | [optional] | |**largeIcon** | **String** | Channel: Push Notifications Platform: Android Can be a drawable resource name or a URL. See: How to create large icons | [optional] | @@ -100,7 +100,6 @@ |**collapseId** | **String** | Channel: Push Notifications Platform: iOS 10+, Android Only one notification with the same id will be shown on the device. Use the same id to update an existing notification instead of showing a new one. Limit of 64 characters. | [optional] | |**webPushTopic** | **String** | Channel: Push Notifications Platform: All Browsers Display multiple notifications at once with different topics. | [optional] | |**apnsAlert** | **Object** | Channel: Push Notifications Platform: iOS 10+ iOS can localize push notification messages on the client using special parameters such as loc-key. When using the Create Notification endpoint, you must include these parameters inside of a field called apns_alert. Please see Apple's guide on localizing push notifications to learn more. | [optional] | -|**sendAfter** | **Long** | Unix timestamp indicating when notification delivery should begin. | [optional] | |**delayedOption** | **String** | Channel: All Possible values are: timezone (Deliver at a specific time-of-day in each users own timezone) last-active Same as Intelligent Delivery . (Deliver at the same time of day as each user last used your app). If send_after is used, this takes effect after the send_after time has elapsed. | [optional] | |**deliveryTimeOfDay** | **String** | Channel: All Use with delayed_option=timezone. Examples: \"9:00AM\" \"21:45\" \"9:45:30\" | [optional] | |**ttl** | **Integer** | Channel: Push Notifications Platform: iOS, Android, Chrome, Firefox, Safari, ChromeWeb Time To Live - In seconds. The notification will be expired if the device does not come back online within this time. The default is 259,200 seconds (3 days). Max value to set is 2419200 seconds (28 days). | [optional] | @@ -128,6 +127,7 @@ |**outcomes** | [**List<OutcomeData>**](OutcomeData.md) | | [optional] | |**remaining** | **Integer** | Number of notifications that have not been sent out yet. This can mean either our system is still processing the notification or you have delayed options set. | [optional] | |**queuedAt** | **Long** | Unix timestamp indicating when the notification was created. | [optional] | +|**sendAfter** | **Long** | Unix timestamp indicating when notification delivery should begin. | [optional] | |**completedAt** | **Long** | Unix timestamp indicating when notification delivery completed. The delivery duration from start to finish can be calculated with completed_at - send_after. | [optional] | |**platformDeliveryStats** | [**PlatformDeliveryData**](PlatformDeliveryData.md) | | [optional] | diff --git a/docs/PlatformDeliveryData.md b/docs/PlatformDeliveryData.md index 5399fdb9..86d00054 100644 --- a/docs/PlatformDeliveryData.md +++ b/docs/PlatformDeliveryData.md @@ -14,6 +14,8 @@ Hash of delivery statistics broken out by target device platform. |**safariWebPush** | [**DeliveryData**](DeliveryData.md) | | [optional] | |**android** | [**DeliveryData**](DeliveryData.md) | | [optional] | |**ios** | [**DeliveryData**](DeliveryData.md) | | [optional] | +|**sms** | [**DeliveryData**](DeliveryData.md) | | [optional] | +|**email** | [**DeliveryData**](DeliveryData.md) | | [optional] | diff --git a/docs/PlatformDeliveryDataEmailAllOf.md b/docs/PlatformDeliveryDataEmailAllOf.md new file mode 100644 index 00000000..6af7f6a5 --- /dev/null +++ b/docs/PlatformDeliveryDataEmailAllOf.md @@ -0,0 +1,19 @@ + + +# PlatformDeliveryDataEmailAllOf + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**opened** | **Integer** | Number of times an email has been opened. | [optional] | +|**uniqueOpens** | **Integer** | Number of unique recipients who have opened your email. | [optional] | +|**clicks** | **Integer** | Number of clicked links from your email. This can include the recipient clicking email links multiple times. | [optional] | +|**uniqueClicks** | **Integer** | Number of unique clicks that your recipients have made on links from your email. | [optional] | +|**bounced** | **Integer** | Number of recipients who registered as a hard or soft bounce and didn't receive your email. | [optional] | +|**reportedSpam** | **Integer** | Number of recipients who reported this email as spam. | [optional] | +|**unsubscribed** | **Integer** | Number of recipients who opted out of your emails using the unsubscribe link in this email. | [optional] | + + + diff --git a/docs/PlatformDeliveryDataSmsAllOf.md b/docs/PlatformDeliveryDataSmsAllOf.md new file mode 100644 index 00000000..cccc647c --- /dev/null +++ b/docs/PlatformDeliveryDataSmsAllOf.md @@ -0,0 +1,15 @@ + + +# PlatformDeliveryDataSmsAllOf + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**providerSuccessful** | **Integer** | Number of messages reported as delivered successfully by the SMS service provider. | [optional] | +|**providerFailed** | **Integer** | Number of recipients who didn't receive your message as reported by the SMS service provider. | [optional] | +|**providerErrored** | **Integer** | Number of errors reported by the SMS service provider. | [optional] | + + + diff --git a/src/main/java/com/onesignal/client/ApiException.java b/src/main/java/com/onesignal/client/ApiException.java index 7a2074cd..67e0d369 100644 --- a/src/main/java/com/onesignal/client/ApiException.java +++ b/src/main/java/com/onesignal/client/ApiException.java @@ -22,7 +22,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-07-13T21:20:07.400Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-08-18T22:09:10.481Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/com/onesignal/client/Configuration.java b/src/main/java/com/onesignal/client/Configuration.java index d2584f43..4e9ba4ae 100644 --- a/src/main/java/com/onesignal/client/Configuration.java +++ b/src/main/java/com/onesignal/client/Configuration.java @@ -13,7 +13,7 @@ package com.onesignal.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-07-13T21:20:07.400Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-08-18T22:09:10.481Z[Etc/UTC]") public class Configuration { private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/onesignal/client/JSON.java b/src/main/java/com/onesignal/client/JSON.java index 5ad6debd..93f4e04a 100644 --- a/src/main/java/com/onesignal/client/JSON.java +++ b/src/main/java/com/onesignal/client/JSON.java @@ -94,6 +94,9 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri .registerTypeAdapter(LocalDate.class, localDateTypeAdapter) .registerTypeAdapter(byte[].class, byteArrayAdapter) .registerTypeAdapterFactory(new com.onesignal.client.model.App.CustomTypeAdapterFactory()) + .registerTypeAdapterFactory(new com.onesignal.client.model.BasicNotification.CustomTypeAdapterFactory()) + .registerTypeAdapterFactory(new com.onesignal.client.model.BasicNotificationAllOf.CustomTypeAdapterFactory()) + .registerTypeAdapterFactory(new com.onesignal.client.model.BasicNotificationAllOfAndroidBackgroundLayout.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new com.onesignal.client.model.Button.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new com.onesignal.client.model.CancelNotificationSuccessResponse.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new com.onesignal.client.model.CreateNotificationBadRequestResponse.CustomTypeAdapterFactory()) @@ -119,7 +122,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri .registerTypeAdapterFactory(new com.onesignal.client.model.Notification.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new com.onesignal.client.model.Notification200Errors.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new com.onesignal.client.model.NotificationAllOf.CustomTypeAdapterFactory()) - .registerTypeAdapterFactory(new com.onesignal.client.model.NotificationAllOfAndroidBackgroundLayout.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new com.onesignal.client.model.NotificationHistoryBadRequestResponse.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new com.onesignal.client.model.NotificationHistorySuccessResponse.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new com.onesignal.client.model.NotificationSlice.CustomTypeAdapterFactory()) @@ -130,6 +132,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri .registerTypeAdapterFactory(new com.onesignal.client.model.OutcomeData.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new com.onesignal.client.model.OutcomesData.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new com.onesignal.client.model.PlatformDeliveryData.CustomTypeAdapterFactory()) + .registerTypeAdapterFactory(new com.onesignal.client.model.PlatformDeliveryDataEmailAllOf.CustomTypeAdapterFactory()) + .registerTypeAdapterFactory(new com.onesignal.client.model.PlatformDeliveryDataSmsAllOf.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new com.onesignal.client.model.Player.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new com.onesignal.client.model.PlayerNotificationTarget.CustomTypeAdapterFactory()) .registerTypeAdapterFactory(new com.onesignal.client.model.PlayerSlice.CustomTypeAdapterFactory()) diff --git a/src/main/java/com/onesignal/client/Pair.java b/src/main/java/com/onesignal/client/Pair.java index 7633319a..f982e9d3 100644 --- a/src/main/java/com/onesignal/client/Pair.java +++ b/src/main/java/com/onesignal/client/Pair.java @@ -13,7 +13,7 @@ package com.onesignal.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-07-13T21:20:07.400Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-08-18T22:09:10.481Z[Etc/UTC]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/com/onesignal/client/StringUtil.java b/src/main/java/com/onesignal/client/StringUtil.java index 9e93631e..aa340b4c 100644 --- a/src/main/java/com/onesignal/client/StringUtil.java +++ b/src/main/java/com/onesignal/client/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-07-13T21:20:07.400Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-08-18T22:09:10.481Z[Etc/UTC]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/com/onesignal/client/auth/ApiKeyAuth.java b/src/main/java/com/onesignal/client/auth/ApiKeyAuth.java index df8b4c67..c60a5600 100644 --- a/src/main/java/com/onesignal/client/auth/ApiKeyAuth.java +++ b/src/main/java/com/onesignal/client/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-07-13T21:20:07.400Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-08-18T22:09:10.481Z[Etc/UTC]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/com/onesignal/client/auth/HttpBearerAuth.java b/src/main/java/com/onesignal/client/auth/HttpBearerAuth.java index 9f299a10..54f51d39 100644 --- a/src/main/java/com/onesignal/client/auth/HttpBearerAuth.java +++ b/src/main/java/com/onesignal/client/auth/HttpBearerAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-07-13T21:20:07.400Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-08-18T22:09:10.481Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private String bearerToken; diff --git a/src/main/java/com/onesignal/client/model/AbstractOpenApiSchema.java b/src/main/java/com/onesignal/client/model/AbstractOpenApiSchema.java index b71a7613..e863a50e 100644 --- a/src/main/java/com/onesignal/client/model/AbstractOpenApiSchema.java +++ b/src/main/java/com/onesignal/client/model/AbstractOpenApiSchema.java @@ -24,7 +24,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-07-13T21:20:07.400Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-08-18T22:09:10.481Z[Etc/UTC]") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/com/onesignal/client/model/App.java b/src/main/java/com/onesignal/client/model/App.java index 6957a4fe..74f1bb93 100644 --- a/src/main/java/com/onesignal/client/model/App.java +++ b/src/main/java/com/onesignal/client/model/App.java @@ -24,6 +24,7 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; import java.io.Serializable; import com.google.gson.Gson; @@ -49,7 +50,7 @@ /** * App */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-07-13T21:20:07.400Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-08-18T22:09:10.481Z[Etc/UTC]") public class App { private static final long serialVersionUID = 1L; @@ -131,7 +132,7 @@ public static ApnsEnvEnum fromValue(String value) { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return null; } public static class Adapter extends TypeAdapter { @@ -870,11 +871,22 @@ public boolean equals(Object o) { Objects.equals(this.additionalDataIsRootPayload, app.additionalDataIsRootPayload); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(id, name, players, messageablePlayers, updatedAt, createdAt, androidGcmSenderId, gcmKey, chromeWebOrigin, chromeKey, chromeWebDefaultNotificationIcon, chromeWebSubDomain, apnsEnv, apnsP12, apnsP12Password, apnsCertificates, safariApnsCertificates, safariApnsP12, safariApnsP12Password, safariSiteOrigin, safariPushId, safariIcon1616, safariIcon3232, safariIcon6464, safariIcon128128, safariIcon256256, siteName, basicAuthKey, organizationId, additionalDataIsRootPayload); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/src/main/java/com/onesignal/client/model/BasicNotification.java b/src/main/java/com/onesignal/client/model/BasicNotification.java new file mode 100644 index 00000000..4e2a8030 --- /dev/null +++ b/src/main/java/com/onesignal/client/model/BasicNotification.java @@ -0,0 +1,3694 @@ +/* + * OneSignal + * 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: 1.0.1 + * Contact: devrel@onesignal.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.onesignal.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.onesignal.client.model.BasicNotificationAllOf; +import com.onesignal.client.model.BasicNotificationAllOfAndroidBackgroundLayout; +import com.onesignal.client.model.Button; +import com.onesignal.client.model.NotificationTarget; +import com.onesignal.client.model.StringMap; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import java.io.Serializable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.onesignal.client.JSON; + +/** + * BasicNotification + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-08-18T22:09:10.481Z[Etc/UTC]") +public class BasicNotification { + private static final long serialVersionUID = 1L; + + public static final String SERIALIZED_NAME_INCLUDED_SEGMENTS = "included_segments"; + @SerializedName(SERIALIZED_NAME_INCLUDED_SEGMENTS) + private List includedSegments = null; + + public static final String SERIALIZED_NAME_EXCLUDED_SEGMENTS = "excluded_segments"; + @SerializedName(SERIALIZED_NAME_EXCLUDED_SEGMENTS) + private List excludedSegments = null; + + public static final String SERIALIZED_NAME_LAST_SESSION = "last_session"; + @SerializedName(SERIALIZED_NAME_LAST_SESSION) + private String lastSession; + + public static final String SERIALIZED_NAME_FIRST_SESSION = "first_session"; + @SerializedName(SERIALIZED_NAME_FIRST_SESSION) + private String firstSession; + + public static final String SERIALIZED_NAME_SESSION_COUNT = "session_count"; + @SerializedName(SERIALIZED_NAME_SESSION_COUNT) + private String sessionCount; + + public static final String SERIALIZED_NAME_SESSION_TIME = "session_time"; + @SerializedName(SERIALIZED_NAME_SESSION_TIME) + private String sessionTime; + + public static final String SERIALIZED_NAME_AMOUNT_SPENT = "amount_spent"; + @SerializedName(SERIALIZED_NAME_AMOUNT_SPENT) + private String amountSpent; + + public static final String SERIALIZED_NAME_BOUGHT_SKU = "bought_sku"; + @SerializedName(SERIALIZED_NAME_BOUGHT_SKU) + private String boughtSku; + + public static final String SERIALIZED_NAME_TAG = "tag"; + @SerializedName(SERIALIZED_NAME_TAG) + private String tag; + + public static final String SERIALIZED_NAME_LANGUAGE = "language"; + @SerializedName(SERIALIZED_NAME_LANGUAGE) + private String language; + + public static final String SERIALIZED_NAME_APP_VERSION = "app_version"; + @SerializedName(SERIALIZED_NAME_APP_VERSION) + private String appVersion; + + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + private String location; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_COUNTRY = "country"; + @SerializedName(SERIALIZED_NAME_COUNTRY) + private String country; + + public static final String SERIALIZED_NAME_INCLUDE_PLAYER_IDS = "include_player_ids"; + @SerializedName(SERIALIZED_NAME_INCLUDE_PLAYER_IDS) + private List includePlayerIds = null; + + public static final String SERIALIZED_NAME_INCLUDE_EXTERNAL_USER_IDS = "include_external_user_ids"; + @SerializedName(SERIALIZED_NAME_INCLUDE_EXTERNAL_USER_IDS) + private List includeExternalUserIds = null; + + public static final String SERIALIZED_NAME_INCLUDE_EMAIL_TOKENS = "include_email_tokens"; + @SerializedName(SERIALIZED_NAME_INCLUDE_EMAIL_TOKENS) + private List includeEmailTokens = null; + + public static final String SERIALIZED_NAME_INCLUDE_PHONE_NUMBERS = "include_phone_numbers"; + @SerializedName(SERIALIZED_NAME_INCLUDE_PHONE_NUMBERS) + private List includePhoneNumbers = null; + + public static final String SERIALIZED_NAME_INCLUDE_IOS_TOKENS = "include_ios_tokens"; + @SerializedName(SERIALIZED_NAME_INCLUDE_IOS_TOKENS) + private List includeIosTokens = null; + + public static final String SERIALIZED_NAME_INCLUDE_WP_WNS_URIS = "include_wp_wns_uris"; + @SerializedName(SERIALIZED_NAME_INCLUDE_WP_WNS_URIS) + private List includeWpWnsUris = null; + + public static final String SERIALIZED_NAME_INCLUDE_AMAZON_REG_IDS = "include_amazon_reg_ids"; + @SerializedName(SERIALIZED_NAME_INCLUDE_AMAZON_REG_IDS) + private List includeAmazonRegIds = null; + + public static final String SERIALIZED_NAME_INCLUDE_CHROME_REG_IDS = "include_chrome_reg_ids"; + @SerializedName(SERIALIZED_NAME_INCLUDE_CHROME_REG_IDS) + private List includeChromeRegIds = null; + + public static final String SERIALIZED_NAME_INCLUDE_CHROME_WEB_REG_IDS = "include_chrome_web_reg_ids"; + @SerializedName(SERIALIZED_NAME_INCLUDE_CHROME_WEB_REG_IDS) + private List includeChromeWebRegIds = null; + + public static final String SERIALIZED_NAME_INCLUDE_ANDROID_REG_IDS = "include_android_reg_ids"; + @SerializedName(SERIALIZED_NAME_INCLUDE_ANDROID_REG_IDS) + private List includeAndroidRegIds = null; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private Integer value; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + /** + * Gets or Sets aggregation + */ + @JsonAdapter(AggregationEnum.Adapter.class) + public enum AggregationEnum { + SUM("sum"), + + COUNT("count"); + + private String value; + + AggregationEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AggregationEnum fromValue(String value) { + for (AggregationEnum b : AggregationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AggregationEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AggregationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AggregationEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_AGGREGATION = "aggregation"; + @SerializedName(SERIALIZED_NAME_AGGREGATION) + private AggregationEnum aggregation; + + public static final String SERIALIZED_NAME_IS_IOS = "isIos"; + @SerializedName(SERIALIZED_NAME_IS_IOS) + private Boolean isIos; + + public static final String SERIALIZED_NAME_IS_ANDROID = "isAndroid"; + @SerializedName(SERIALIZED_NAME_IS_ANDROID) + private Boolean isAndroid; + + public static final String SERIALIZED_NAME_IS_HUAWEI = "isHuawei"; + @SerializedName(SERIALIZED_NAME_IS_HUAWEI) + private Boolean isHuawei; + + public static final String SERIALIZED_NAME_IS_ANY_WEB = "isAnyWeb"; + @SerializedName(SERIALIZED_NAME_IS_ANY_WEB) + private Boolean isAnyWeb; + + public static final String SERIALIZED_NAME_IS_CHROME_WEB = "isChromeWeb"; + @SerializedName(SERIALIZED_NAME_IS_CHROME_WEB) + private Boolean isChromeWeb; + + public static final String SERIALIZED_NAME_IS_FIREFOX = "isFirefox"; + @SerializedName(SERIALIZED_NAME_IS_FIREFOX) + private Boolean isFirefox; + + public static final String SERIALIZED_NAME_IS_SAFARI = "isSafari"; + @SerializedName(SERIALIZED_NAME_IS_SAFARI) + private Boolean isSafari; + + public static final String SERIALIZED_NAME_IS_W_P_W_N_S = "isWP_WNS"; + @SerializedName(SERIALIZED_NAME_IS_W_P_W_N_S) + private Boolean isWPWNS; + + public static final String SERIALIZED_NAME_IS_ADM = "isAdm"; + @SerializedName(SERIALIZED_NAME_IS_ADM) + private Boolean isAdm; + + public static final String SERIALIZED_NAME_IS_CHROME = "isChrome"; + @SerializedName(SERIALIZED_NAME_IS_CHROME) + private Boolean isChrome; + + public static final String SERIALIZED_NAME_CHANNEL_FOR_EXTERNAL_USER_IDS = "channel_for_external_user_ids"; + @SerializedName(SERIALIZED_NAME_CHANNEL_FOR_EXTERNAL_USER_IDS) + private String channelForExternalUserIds; + + public static final String SERIALIZED_NAME_APP_ID = "app_id"; + @SerializedName(SERIALIZED_NAME_APP_ID) + private String appId; + + public static final String SERIALIZED_NAME_EXTERNAL_ID = "external_id"; + @SerializedName(SERIALIZED_NAME_EXTERNAL_ID) + private String externalId; + + public static final String SERIALIZED_NAME_CONTENTS = "contents"; + @SerializedName(SERIALIZED_NAME_CONTENTS) + private StringMap contents; + + public static final String SERIALIZED_NAME_HEADINGS = "headings"; + @SerializedName(SERIALIZED_NAME_HEADINGS) + private StringMap headings; + + public static final String SERIALIZED_NAME_SUBTITLE = "subtitle"; + @SerializedName(SERIALIZED_NAME_SUBTITLE) + private StringMap subtitle; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private Object data; + + public static final String SERIALIZED_NAME_HUAWEI_MSG_TYPE = "huawei_msg_type"; + @SerializedName(SERIALIZED_NAME_HUAWEI_MSG_TYPE) + private String huaweiMsgType; + + public static final String SERIALIZED_NAME_URL = "url"; + @SerializedName(SERIALIZED_NAME_URL) + private String url; + + public static final String SERIALIZED_NAME_WEB_URL = "web_url"; + @SerializedName(SERIALIZED_NAME_WEB_URL) + private String webUrl; + + public static final String SERIALIZED_NAME_APP_URL = "app_url"; + @SerializedName(SERIALIZED_NAME_APP_URL) + private String appUrl; + + public static final String SERIALIZED_NAME_IOS_ATTACHMENTS = "ios_attachments"; + @SerializedName(SERIALIZED_NAME_IOS_ATTACHMENTS) + private Object iosAttachments; + + public static final String SERIALIZED_NAME_TEMPLATE_ID = "template_id"; + @SerializedName(SERIALIZED_NAME_TEMPLATE_ID) + private String templateId; + + public static final String SERIALIZED_NAME_CONTENT_AVAILABLE = "content_available"; + @SerializedName(SERIALIZED_NAME_CONTENT_AVAILABLE) + private Boolean contentAvailable; + + public static final String SERIALIZED_NAME_MUTABLE_CONTENT = "mutable_content"; + @SerializedName(SERIALIZED_NAME_MUTABLE_CONTENT) + private Boolean mutableContent; + + public static final String SERIALIZED_NAME_TARGET_CONTENT_IDENTIFIER = "target_content_identifier"; + @SerializedName(SERIALIZED_NAME_TARGET_CONTENT_IDENTIFIER) + private String targetContentIdentifier; + + public static final String SERIALIZED_NAME_BIG_PICTURE = "big_picture"; + @SerializedName(SERIALIZED_NAME_BIG_PICTURE) + private String bigPicture; + + public static final String SERIALIZED_NAME_HUAWEI_BIG_PICTURE = "huawei_big_picture"; + @SerializedName(SERIALIZED_NAME_HUAWEI_BIG_PICTURE) + private String huaweiBigPicture; + + public static final String SERIALIZED_NAME_ADM_BIG_PICTURE = "adm_big_picture"; + @SerializedName(SERIALIZED_NAME_ADM_BIG_PICTURE) + private String admBigPicture; + + public static final String SERIALIZED_NAME_CHROME_BIG_PICTURE = "chrome_big_picture"; + @SerializedName(SERIALIZED_NAME_CHROME_BIG_PICTURE) + private String chromeBigPicture; + + public static final String SERIALIZED_NAME_CHROME_WEB_IMAGE = "chrome_web_image"; + @SerializedName(SERIALIZED_NAME_CHROME_WEB_IMAGE) + private String chromeWebImage; + + public static final String SERIALIZED_NAME_BUTTONS = "buttons"; + @SerializedName(SERIALIZED_NAME_BUTTONS) + private List