From f777d19fb176f0589e0dee3f560b4322a9047299 Mon Sep 17 00:00:00 2001 From: OneSignal Date: Thu, 30 Apr 2026 18:49:49 +0000 Subject: [PATCH] feat: add v5.4.0 package updates --- api/openapi.yaml | 101 ++++++++++++------ docs/BasicNotification.md | 4 +- docs/BasicNotificationAllOf.md | 2 +- docs/CreateNotificationSuccessResponse.md | 6 +- docs/DefaultApi.md | 4 +- docs/Notification.md | 4 +- docs/NotificationTarget.md | 2 +- docs/NotificationWithMeta.md | 4 +- docs/StartLiveActivityRequest.md | 2 +- docs/SubscriptionNotificationTarget.md | 2 +- .../com/onesignal/client/api/DefaultApi.java | 14 +-- .../client/model/BasicNotification.java | 8 +- .../client/model/BasicNotificationAllOf.java | 4 +- .../CreateNotificationSuccessResponse.java | 12 +-- .../onesignal/client/model/Notification.java | 8 +- .../client/model/NotificationWithMeta.java | 8 +- .../model/StartLiveActivityRequest.java | 4 +- .../model/SubscriptionNotificationTarget.java | 4 +- 18 files changed, 113 insertions(+), 80 deletions(-) diff --git a/api/openapi.yaml b/api/openapi.yaml index 6adc925e..85c6d9d0 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -84,8 +84,16 @@ paths: summary: View notifications x-accepts: application/json post: - description: | - Sends notifications to your users + description: "Sends notifications to your users.\n\n**Target by External ID\ + \ (push example):** set `include_aliases` to `{ \"external_id\": [\"your-user-id\"\ + ] }` and set `target_channel` to `push` (or `email` / `sms` for those channels).\ + \ Alias object keys must match API labels exactly (for example `external_id`,\ + \ not camelCase).\n\n**Do not confuse** the notification-level `external_id`\ + \ field with External ID targeting: top-level `external_id` / `idempotency_key`\ + \ are for idempotent notification requests only, not for selecting recipients.\n\ + \n**Targeting compatibility:** `include_aliases` must not be combined with\ + \ other targeting modes (segments, filters, subscription IDs, legacy player\ + \ IDs, etc.). Clients should send only one targeting strategy per request.\n" operationId: create_notification requestBody: content: @@ -100,13 +108,17 @@ paths: schema: $ref: '#/components/schemas/CreateNotificationSuccessResponse' description: "OK, invalid_aliases, or No Subscribed Players\nIf a message\ - \ was successfully created, you will get a 200 response and an id for\ - \ the notification.\nIf the 200 response contains \"invalid_aliases\"\ - \ this will mark devices that exist in the provided app_id but are no\ - \ longer subscribed.\nIf no id is returned, then a message was not created\ - \ and the targeted User IDs do not exist under the provided app_id.\n\ - Any User IDs sent in the request that do not exist under the specified\ - \ app_id will be ignored.\n" + \ was successfully created, you will get a 200 response with a non-empty\ + \ `id` for the notification.\nIf the 200 response contains `invalid_aliases`,\ + \ that marks devices that exist in the provided app_id but are no longer\ + \ subscribed.\nIf `id` is an empty string, no notification was created:\ + \ check the `errors` array (for example messages such as \"All included\ + \ players are not subscribed\") even though HTTP status is still 200.\ + \ This can happen when alias keys are wrong, External IDs do not resolve\ + \ to subscribed users, or other validation issues.\nIf no id is returned,\ + \ then a message was not created and the targeted User IDs do not exist\ + \ under the provided app_id.\nAny User IDs sent in the request that do\ + \ not exist under the specified app_id will be ignored.\n" "400": content: application/json: @@ -2648,11 +2660,14 @@ components: \ can be an external_id, onesignal_id, or a custom alias.\nAccepts an\ \ object where keys are alias labels and values are arrays of alias IDs\ \ to include\nExample usage: { \"external_id\": [\"exId1\", \"extId2\"\ - ], \"internal_label\": [\"id1\", \"id2\"] }\nNot compatible with any other\ - \ targeting parameters.\nREQUIRED: REST API Key Authentication\nLimit\ - \ of 2,000 entries per REST API call\nNote: If targeting push, email,\ - \ or sms subscribers with same ids, use with target_channel to indicate\ - \ you are sending a push or email or sms." + ], \"internal_label\": [\"id1\", \"id2\"] }\nKeys must match API spellings\ + \ exactly (for example the label for External ID is the string `external_id`;\ + \ arbitrary keys such as camelCase variants are not aliases and may yield\ + \ no recipients).\nNot compatible with any other targeting parameters.\n\ + REQUIRED: REST API Key Authentication\nLimit of 2,000 entries per REST\ + \ API call\nNote: If targeting push, email, or sms subscribers with same\ + \ ids, use with target_channel to indicate you are sending a push or email\ + \ or sms." nullable: true type: object target_channel: @@ -3570,13 +3585,22 @@ components: errors: "" properties: id: + description: Notification identifier when the request created a notification. + An empty string means no notification was created; read `errors` for details + (HTTP may still be 200). type: string external_id: + description: Optional correlation / idempotency-related value from the API + response. This is not the end-user External ID used for targeting recipients + (that lives under `include_aliases.external_id`). nullable: true type: string errors: - description: "Errors include the identifiers that are invalid, or that there\ - \ are no subscribers." + description: "Polymorphic field: may be an array of human-readable strings\ + \ and/or an object (for example with `invalid_aliases`, `invalid_external_user_ids`,\ + \ or `invalid_player_ids`) depending on the API response; HTTP may still\ + \ be 200 with partial success. Typed SDKs model this loosely so both shapes\ + \ deserialize." type: object GenericSuccessBoolResponse: example: @@ -3806,11 +3830,14 @@ components: \ can be an external_id, onesignal_id, or a custom alias.\nAccepts an\ \ object where keys are alias labels and values are arrays of alias IDs\ \ to include\nExample usage: { \"external_id\": [\"exId1\", \"extId2\"\ - ], \"internal_label\": [\"id1\", \"id2\"] }\nNot compatible with any other\ - \ targeting parameters.\nREQUIRED: REST API Key Authentication\nLimit\ - \ of 2,000 entries per REST API call\nNote: If targeting push, email,\ - \ or sms subscribers with same ids, use with target_channel to indicate\ - \ you are sending a push or email or sms." + ], \"internal_label\": [\"id1\", \"id2\"] }\nKeys must match API spellings\ + \ exactly (for example the label for External ID is the string `external_id`;\ + \ arbitrary keys such as camelCase variants are not aliases and may yield\ + \ no recipients).\nNot compatible with any other targeting parameters.\n\ + REQUIRED: REST API Key Authentication\nLimit of 2,000 entries per REST\ + \ API call\nNote: If targeting push, email, or sms subscribers with same\ + \ ids, use with target_channel to indicate you are sending a push or email\ + \ or sms." nullable: true type: object include_subscription_ids: @@ -3862,10 +3889,13 @@ components: \ be an external_id, onesignal_id, or a custom alias.\nAccepts an object where\ \ keys are alias labels and values are arrays of alias IDs to include\nExample\ \ usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"\ - id1\", \"id2\"] }\nNot compatible with any other targeting parameters.\nREQUIRED:\ - \ REST API Key Authentication\nLimit of 2,000 entries per REST API call\n\ - Note: If targeting push, email, or sms subscribers with same ids, use with\ - \ target_channel to indicate you are sending a push or email or sms." + id1\", \"id2\"] }\nKeys must match API spellings exactly (for example the\ + \ label for External ID is the string `external_id`; arbitrary keys such as\ + \ camelCase variants are not aliases and may yield no recipients).\nNot compatible\ + \ with any other targeting parameters.\nREQUIRED: REST API Key Authentication\n\ + Limit of 2,000 entries per REST API call\nNote: If targeting push, email,\ + \ or sms subscribers with same ids, use with target_channel to indicate you\ + \ are sending a push or email or sms." nullable: true type: object CreateTemplateRequest: @@ -4694,15 +4724,18 @@ components: writeOnly: true external_id: deprecated: true - description: "[DEPRECATED] Correlation and idempotency key.\nA 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.\nThis 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.\n\ - \ See Idempotent Notification Requests for more details\nwriteOnly: true\n" + description: "This field does **not** target users by their External ID.\ + \ To send to External IDs, use `include_aliases` with the label `external_id`\ + \ plus `target_channel` as documented for alias-based targeting.\n\n[DEPRECATED]\ + \ Correlation and idempotency key.\nA 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.\nThis 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.\n See Idempotent Notification\ + \ Requests for more details\nwriteOnly: true\n" nullable: true type: string idempotency_key: diff --git a/docs/BasicNotification.md b/docs/BasicNotification.md index 0d54f41a..9b431ff9 100644 --- a/docs/BasicNotification.md +++ b/docs/BasicNotification.md @@ -18,7 +18,7 @@ |**includeChromeRegIds** | **List<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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_subscription_ids or include_aliases 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_subscription_ids or include_aliases 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] | -|**includeAliases** | **Map<String, List<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] | +|**includeAliases** | **Map<String, List<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] | |**targetChannel** | [**TargetChannelEnum**](#TargetChannelEnum) | | [optional] | |**id** | **String** | | [optional] | |**value** | **Integer** | | [optional] [readonly] | @@ -35,7 +35,7 @@ |**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] | |**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** | [DEPRECATED] 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] | +|**externalId** | **String** | This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [DEPRECATED] 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] | |**idempotencyKey** | **String** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. 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 idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] | |**contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] | |**headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] | diff --git a/docs/BasicNotificationAllOf.md b/docs/BasicNotificationAllOf.md index 720d397f..712406a9 100644 --- a/docs/BasicNotificationAllOf.md +++ b/docs/BasicNotificationAllOf.md @@ -22,7 +22,7 @@ |**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] | |**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** | [DEPRECATED] 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] | +|**externalId** | **String** | This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [DEPRECATED] 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] | |**idempotencyKey** | **String** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. 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 idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] | |**contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] | |**headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] | diff --git a/docs/CreateNotificationSuccessResponse.md b/docs/CreateNotificationSuccessResponse.md index fad90e5b..ff1e64e7 100644 --- a/docs/CreateNotificationSuccessResponse.md +++ b/docs/CreateNotificationSuccessResponse.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**externalId** | **String** | | [optional] | -|**errors** | **Object** | Errors include the identifiers that are invalid, or that there are no subscribers. | [optional] | +|**id** | **String** | Notification identifier when the request created a notification. An empty string means no notification was created; read `errors` for details (HTTP may still be 200). | [optional] | +|**externalId** | **String** | Optional correlation / idempotency-related value from the API response. This is not the end-user External ID used for targeting recipients (that lives under `include_aliases.external_id`). | [optional] | +|**errors** | **Object** | Polymorphic field: may be an array of human-readable strings and/or an object (for example with `invalid_aliases`, `invalid_external_user_ids`, or `invalid_player_ids`) depending on the API response; HTTP may still be 200 with partial success. Typed SDKs model this loosely so both shapes deserialize. | [optional] | diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index 77edf675..cdedc5a1 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -563,7 +563,7 @@ public class Example { Create notification -Sends notifications to your users +Sends notifications to your users. **Target by External ID (push example):** set `include_aliases` to `{ \"external_id\": [\"your-user-id\"] }` and set `target_channel` to `push` (or `email` / `sms` for those channels). Alias object keys must match API labels exactly (for example `external_id`, not camelCase). **Do not confuse** the notification-level `external_id` field with External ID targeting: top-level `external_id` / `idempotency_key` are for idempotent notification requests only, not for selecting recipients. **Targeting compatibility:** `include_aliases` must not be combined with other targeting modes (segments, filters, subscription IDs, legacy player IDs, etc.). Clients should send only one targeting strategy per request. ### Example ```java @@ -635,7 +635,7 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response and an id for the notification. If the 200 response contains \"invalid_aliases\" this will mark devices that exist in the provided app_id but are no longer subscribed. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. | - | +| **200** | OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response with a non-empty `id` for the notification. If the 200 response contains `invalid_aliases`, that marks devices that exist in the provided app_id but are no longer subscribed. If `id` is an empty string, no notification was created: check the `errors` array (for example messages such as \"All included players are not subscribed\") even though HTTP status is still 200. This can happen when alias keys are wrong, External IDs do not resolve to subscribed users, or other validation issues. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. | - | | **400** | Bad Request | - | | **429** | Rate Limit Exceeded | - | diff --git a/docs/Notification.md b/docs/Notification.md index cabbf23d..695ce0aa 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -18,7 +18,7 @@ |**includeChromeRegIds** | **List<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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_subscription_ids or include_aliases 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_subscription_ids or include_aliases 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] | -|**includeAliases** | **Map<String, List<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] | +|**includeAliases** | **Map<String, List<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] | |**targetChannel** | [**TargetChannelEnum**](#TargetChannelEnum) | | [optional] | |**id** | **String** | | [optional] | |**value** | **Integer** | | [optional] [readonly] | @@ -35,7 +35,7 @@ |**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] | |**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** | [DEPRECATED] 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] | +|**externalId** | **String** | This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [DEPRECATED] 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] | |**idempotencyKey** | **String** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. 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 idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] | |**contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] | |**headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] | diff --git a/docs/NotificationTarget.md b/docs/NotificationTarget.md index 77846de8..87eb7a68 100644 --- a/docs/NotificationTarget.md +++ b/docs/NotificationTarget.md @@ -18,7 +18,7 @@ |**includeChromeRegIds** | **List<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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_subscription_ids or include_aliases 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_subscription_ids or include_aliases 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] | -|**includeAliases** | **Map<String, List<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] | +|**includeAliases** | **Map<String, List<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] | |**targetChannel** | [**TargetChannelEnum**](#TargetChannelEnum) | | [optional] | diff --git a/docs/NotificationWithMeta.md b/docs/NotificationWithMeta.md index fe2e4c44..9cf4bd76 100644 --- a/docs/NotificationWithMeta.md +++ b/docs/NotificationWithMeta.md @@ -18,7 +18,7 @@ |**includeChromeRegIds** | **List<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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_subscription_ids or include_aliases 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_subscription_ids or include_aliases 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] | -|**includeAliases** | **Map<String, List<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] | +|**includeAliases** | **Map<String, List<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] | |**targetChannel** | [**TargetChannelEnum**](#TargetChannelEnum) | | [optional] | |**id** | **String** | | [optional] | |**value** | **Integer** | | [optional] [readonly] | @@ -35,7 +35,7 @@ |**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] | |**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** | [DEPRECATED] 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] | +|**externalId** | **String** | This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [DEPRECATED] 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] | |**idempotencyKey** | **String** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. 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 idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] | |**contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] | |**headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] | diff --git a/docs/StartLiveActivityRequest.md b/docs/StartLiveActivityRequest.md index ed9a1a40..bdbd6b18 100644 --- a/docs/StartLiveActivityRequest.md +++ b/docs/StartLiveActivityRequest.md @@ -18,7 +18,7 @@ |**priority** | **Integer** | Delivery priority through the push provider (APNs). Pass 10 for higher priority notifications, or 5 for lower priority notifications. Lower priority notifications are sent based on the power considerations of the end user's device. If not set, defaults to 10. | [optional] | |**iosRelevanceScore** | **BigDecimal** | iOS 15+. A score to indicate how a notification should be displayed when grouped. Use a float between 0-1. | [optional] | |**idempotencyKey** | **String** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. 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 idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] | -|**includeAliases** | **Map<String, List<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] | +|**includeAliases** | **Map<String, List<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] | |**includeSubscriptionIds** | **List<String>** | Specific subscription ids to target. Not compatible with other targeting parameters. | [optional] | |**includedSegments** | **List<String>** | Segment names to include. Only compatible with excluded_segments. | [optional] | |**excludedSegments** | **List<String>** | Segment names to exclude. Only compatible with included_segments. | [optional] | diff --git a/docs/SubscriptionNotificationTarget.md b/docs/SubscriptionNotificationTarget.md index 7c3f05ca..f1149637 100644 --- a/docs/SubscriptionNotificationTarget.md +++ b/docs/SubscriptionNotificationTarget.md @@ -16,7 +16,7 @@ |**includeChromeRegIds** | **List<String>** | Not Recommended: Please consider using include_subscription_ids or include_aliases 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_subscription_ids or include_aliases 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_subscription_ids or include_aliases 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] | -|**includeAliases** | **Map<String, List<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] | +|**includeAliases** | **Map<String, List<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. | [optional] | |**targetChannel** | [**TargetChannelEnum**](#TargetChannelEnum) | | [optional] | diff --git a/src/main/java/com/onesignal/client/api/DefaultApi.java b/src/main/java/com/onesignal/client/api/DefaultApi.java index d65593fe..879548ba 100644 --- a/src/main/java/com/onesignal/client/api/DefaultApi.java +++ b/src/main/java/com/onesignal/client/api/DefaultApi.java @@ -1202,7 +1202,7 @@ public okhttp3.Call createCustomEventsAsync(String appId, CustomEventsRequest cu * @http.response.details - +
Status Code Description Response Headers
200 OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response and an id for the notification. If the 200 response contains \"invalid_aliases\" this will mark devices that exist in the provided app_id but are no longer subscribed. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. -
200 OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response with a non-empty `id` for the notification. If the 200 response contains `invalid_aliases`, that marks devices that exist in the provided app_id but are no longer subscribed. If `id` is an empty string, no notification was created: check the `errors` array (for example messages such as \"All included players are not subscribed\") even though HTTP status is still 200. This can happen when alias keys are wrong, External IDs do not resolve to subscribed users, or other validation issues. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. -
400 Bad Request -
429 Rate Limit Exceeded -
@@ -1271,14 +1271,14 @@ private okhttp3.Call createNotificationValidateBeforeCall(Notification notificat /** * Create notification - * Sends notifications to your users + * Sends notifications to your users. **Target by External ID (push example):** set `include_aliases` to `{ \"external_id\": [\"your-user-id\"] }` and set `target_channel` to `push` (or `email` / `sms` for those channels). Alias object keys must match API labels exactly (for example `external_id`, not camelCase). **Do not confuse** the notification-level `external_id` field with External ID targeting: top-level `external_id` / `idempotency_key` are for idempotent notification requests only, not for selecting recipients. **Targeting compatibility:** `include_aliases` must not be combined with other targeting modes (segments, filters, subscription IDs, legacy player IDs, etc.). Clients should send only one targeting strategy per request. * @param notification (required) * @return CreateNotificationSuccessResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response and an id for the notification. If the 200 response contains \"invalid_aliases\" this will mark devices that exist in the provided app_id but are no longer subscribed. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. -
200 OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response with a non-empty `id` for the notification. If the 200 response contains `invalid_aliases`, that marks devices that exist in the provided app_id but are no longer subscribed. If `id` is an empty string, no notification was created: check the `errors` array (for example messages such as \"All included players are not subscribed\") even though HTTP status is still 200. This can happen when alias keys are wrong, External IDs do not resolve to subscribed users, or other validation issues. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. -
400 Bad Request -
429 Rate Limit Exceeded -
@@ -1290,14 +1290,14 @@ public CreateNotificationSuccessResponse createNotification(Notification notific /** * Create notification - * Sends notifications to your users + * Sends notifications to your users. **Target by External ID (push example):** set `include_aliases` to `{ \"external_id\": [\"your-user-id\"] }` and set `target_channel` to `push` (or `email` / `sms` for those channels). Alias object keys must match API labels exactly (for example `external_id`, not camelCase). **Do not confuse** the notification-level `external_id` field with External ID targeting: top-level `external_id` / `idempotency_key` are for idempotent notification requests only, not for selecting recipients. **Targeting compatibility:** `include_aliases` must not be combined with other targeting modes (segments, filters, subscription IDs, legacy player IDs, etc.). Clients should send only one targeting strategy per request. * @param notification (required) * @return ApiResponse<CreateNotificationSuccessResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response and an id for the notification. If the 200 response contains \"invalid_aliases\" this will mark devices that exist in the provided app_id but are no longer subscribed. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. -
200 OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response with a non-empty `id` for the notification. If the 200 response contains `invalid_aliases`, that marks devices that exist in the provided app_id but are no longer subscribed. If `id` is an empty string, no notification was created: check the `errors` array (for example messages such as \"All included players are not subscribed\") even though HTTP status is still 200. This can happen when alias keys are wrong, External IDs do not resolve to subscribed users, or other validation issues. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. -
400 Bad Request -
429 Rate Limit Exceeded -
@@ -1310,7 +1310,7 @@ public ApiResponse createNotificationWithHttp /** * Create notification (asynchronously) - * Sends notifications to your users + * Sends notifications to your users. **Target by External ID (push example):** set `include_aliases` to `{ \"external_id\": [\"your-user-id\"] }` and set `target_channel` to `push` (or `email` / `sms` for those channels). Alias object keys must match API labels exactly (for example `external_id`, not camelCase). **Do not confuse** the notification-level `external_id` field with External ID targeting: top-level `external_id` / `idempotency_key` are for idempotent notification requests only, not for selecting recipients. **Targeting compatibility:** `include_aliases` must not be combined with other targeting modes (segments, filters, subscription IDs, legacy player IDs, etc.). Clients should send only one targeting strategy per request. * @param notification (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -1318,7 +1318,7 @@ public ApiResponse createNotificationWithHttp * @http.response.details - +
Status Code Description Response Headers
200 OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response and an id for the notification. If the 200 response contains \"invalid_aliases\" this will mark devices that exist in the provided app_id but are no longer subscribed. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. -
200 OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response with a non-empty `id` for the notification. If the 200 response contains `invalid_aliases`, that marks devices that exist in the provided app_id but are no longer subscribed. If `id` is an empty string, no notification was created: check the `errors` array (for example messages such as \"All included players are not subscribed\") even though HTTP status is still 200. This can happen when alias keys are wrong, External IDs do not resolve to subscribed users, or other validation issues. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. -
400 Bad Request -
429 Rate Limit Exceeded -
diff --git a/src/main/java/com/onesignal/client/model/BasicNotification.java b/src/main/java/com/onesignal/client/model/BasicNotification.java index 8c4c3b32..fc8dc995 100644 --- a/src/main/java/com/onesignal/client/model/BasicNotification.java +++ b/src/main/java/com/onesignal/client/model/BasicNotification.java @@ -1053,11 +1053,11 @@ public BasicNotification putIncludeAliasesItem(String key, List includeA } /** - * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. + * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. * @return includeAliases **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms.") + @ApiModelProperty(value = "Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms.") public Map> getIncludeAliases() { return includeAliases; @@ -1426,13 +1426,13 @@ public BasicNotification externalId(String externalId) { } /** - * [DEPRECATED] 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 + * This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [DEPRECATED] 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 * @return externalId * @deprecated **/ @Deprecated @javax.annotation.Nullable - @ApiModelProperty(value = "[DEPRECATED] 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 ") + @ApiModelProperty(value = "This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [DEPRECATED] 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 ") public String getExternalId() { return externalId; diff --git a/src/main/java/com/onesignal/client/model/BasicNotificationAllOf.java b/src/main/java/com/onesignal/client/model/BasicNotificationAllOf.java index 9e246b24..5af02a53 100644 --- a/src/main/java/com/onesignal/client/model/BasicNotificationAllOf.java +++ b/src/main/java/com/onesignal/client/model/BasicNotificationAllOf.java @@ -926,13 +926,13 @@ public BasicNotificationAllOf externalId(String externalId) { } /** - * [DEPRECATED] 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 + * This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [DEPRECATED] 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 * @return externalId * @deprecated **/ @Deprecated @javax.annotation.Nullable - @ApiModelProperty(value = "[DEPRECATED] 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 ") + @ApiModelProperty(value = "This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [DEPRECATED] 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 ") public String getExternalId() { return externalId; diff --git a/src/main/java/com/onesignal/client/model/CreateNotificationSuccessResponse.java b/src/main/java/com/onesignal/client/model/CreateNotificationSuccessResponse.java index 85e41f52..fed834c7 100644 --- a/src/main/java/com/onesignal/client/model/CreateNotificationSuccessResponse.java +++ b/src/main/java/com/onesignal/client/model/CreateNotificationSuccessResponse.java @@ -75,11 +75,11 @@ public CreateNotificationSuccessResponse id(String id) { } /** - * Get id + * Notification identifier when the request created a notification. An empty string means no notification was created; read `errors` for details (HTTP may still be 200). * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") + @ApiModelProperty(value = "Notification identifier when the request created a notification. An empty string means no notification was created; read `errors` for details (HTTP may still be 200).") public String getId() { return id; @@ -98,11 +98,11 @@ public CreateNotificationSuccessResponse externalId(String externalId) { } /** - * Get externalId + * Optional correlation / idempotency-related value from the API response. This is not the end-user External ID used for targeting recipients (that lives under `include_aliases.external_id`). * @return externalId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") + @ApiModelProperty(value = "Optional correlation / idempotency-related value from the API response. This is not the end-user External ID used for targeting recipients (that lives under `include_aliases.external_id`).") public String getExternalId() { return externalId; @@ -121,11 +121,11 @@ public CreateNotificationSuccessResponse errors(Object errors) { } /** - * Errors include the identifiers that are invalid, or that there are no subscribers. + * Polymorphic field: may be an array of human-readable strings and/or an object (for example with `invalid_aliases`, `invalid_external_user_ids`, or `invalid_player_ids`) depending on the API response; HTTP may still be 200 with partial success. Typed SDKs model this loosely so both shapes deserialize. * @return errors **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Errors include the identifiers that are invalid, or that there are no subscribers.") + @ApiModelProperty(value = "Polymorphic field: may be an array of human-readable strings and/or an object (for example with `invalid_aliases`, `invalid_external_user_ids`, or `invalid_player_ids`) depending on the API response; HTTP may still be 200 with partial success. Typed SDKs model this loosely so both shapes deserialize.") public Object getErrors() { return errors; diff --git a/src/main/java/com/onesignal/client/model/Notification.java b/src/main/java/com/onesignal/client/model/Notification.java index 2efce03d..a026b7de 100644 --- a/src/main/java/com/onesignal/client/model/Notification.java +++ b/src/main/java/com/onesignal/client/model/Notification.java @@ -1058,11 +1058,11 @@ public Notification putIncludeAliasesItem(String key, List includeAliase } /** - * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. + * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. * @return includeAliases **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms.") + @ApiModelProperty(value = "Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms.") public Map> getIncludeAliases() { return includeAliases; @@ -1431,13 +1431,13 @@ public Notification externalId(String externalId) { } /** - * [DEPRECATED] 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 + * This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [DEPRECATED] 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 * @return externalId * @deprecated **/ @Deprecated @javax.annotation.Nullable - @ApiModelProperty(value = "[DEPRECATED] 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 ") + @ApiModelProperty(value = "This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [DEPRECATED] 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 ") public String getExternalId() { return externalId; diff --git a/src/main/java/com/onesignal/client/model/NotificationWithMeta.java b/src/main/java/com/onesignal/client/model/NotificationWithMeta.java index 26ea6193..1e9a5029 100644 --- a/src/main/java/com/onesignal/client/model/NotificationWithMeta.java +++ b/src/main/java/com/onesignal/client/model/NotificationWithMeta.java @@ -1105,11 +1105,11 @@ public NotificationWithMeta putIncludeAliasesItem(String key, List inclu } /** - * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. + * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. * @return includeAliases **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms.") + @ApiModelProperty(value = "Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms.") public Map> getIncludeAliases() { return includeAliases; @@ -1478,13 +1478,13 @@ public NotificationWithMeta externalId(String externalId) { } /** - * [DEPRECATED] 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 + * This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [DEPRECATED] 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 * @return externalId * @deprecated **/ @Deprecated @javax.annotation.Nullable - @ApiModelProperty(value = "[DEPRECATED] 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 ") + @ApiModelProperty(value = "This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [DEPRECATED] 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 ") public String getExternalId() { return externalId; diff --git a/src/main/java/com/onesignal/client/model/StartLiveActivityRequest.java b/src/main/java/com/onesignal/client/model/StartLiveActivityRequest.java index 20d5034d..c06a9e5d 100644 --- a/src/main/java/com/onesignal/client/model/StartLiveActivityRequest.java +++ b/src/main/java/com/onesignal/client/model/StartLiveActivityRequest.java @@ -440,11 +440,11 @@ public StartLiveActivityRequest putIncludeAliasesItem(String key, List i } /** - * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. + * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms. * @return includeAliases **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms.") + @ApiModelProperty(value = "Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. 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 target_channel to indicate you are sending a push or email or sms.") public Map> getIncludeAliases() { return includeAliases; diff --git a/src/main/java/com/onesignal/client/model/SubscriptionNotificationTarget.java b/src/main/java/com/onesignal/client/model/SubscriptionNotificationTarget.java index 1c4993f4..78a0ecaf 100644 --- a/src/main/java/com/onesignal/client/model/SubscriptionNotificationTarget.java +++ b/src/main/java/com/onesignal/client/model/SubscriptionNotificationTarget.java @@ -447,11 +447,11 @@ public SubscriptionNotificationTarget putIncludeAliasesItem(String key, List> getIncludeAliases() { return includeAliases;