From 3cff5729623ca25967036d767f6d1fd66e804f30 Mon Sep 17 00:00:00 2001 From: OneSignal Date: Tue, 1 Aug 2023 23:28:05 +0000 Subject: [PATCH] Update .NET API --- README.md | 14 +- docs/BasicNotification.md | 3 + docs/BasicNotificationAllOf.md | 3 + docs/CreateSegmentBadRequestResponse.md | 11 - docs/DefaultApi.md | 153 +++++++- docs/DeletePlayerBadRequestResponse.md | 10 - ...rror.md => ExportEventsSuccessResponse.md} | 4 +- docs/FilterNotificationTarget.md | 21 -- ...nBadRequestResponse.md => GenericError.md} | 4 +- ...orsInner.md => GenericErrorErrorsInner.md} | 2 +- docs/IdentifyUserConflictResponse.md | 10 - docs/Notification.md | 3 + docs/NotificationHistoryBadRequestResponse.md | 11 - docs/NotificationWithMeta.md | 3 + ...RequestResponse.md => RateLimiterError.md} | 4 +- src/OneSignalApi/Api/DefaultApi.cs | 250 ++++++++++++- src/OneSignalApi/Client/ApiClient.cs | 4 +- src/OneSignalApi/Client/ApiException.cs | 2 +- src/OneSignalApi/Client/ApiResponse.cs | 2 +- src/OneSignalApi/Client/ClientUtils.cs | 2 +- src/OneSignalApi/Client/Configuration.cs | 10 +- src/OneSignalApi/Client/ExceptionFactory.cs | 2 +- .../Client/GlobalConfiguration.cs | 2 +- src/OneSignalApi/Client/HttpMethod.cs | 2 +- src/OneSignalApi/Client/IApiAccessor.cs | 2 +- .../Client/IAsynchronousClient.cs | 2 +- .../Client/IReadableConfiguration.cs | 2 +- src/OneSignalApi/Client/ISynchronousClient.cs | 2 +- src/OneSignalApi/Client/Multimap.cs | 2 +- .../Client/OpenAPIDateConverter.cs | 2 +- src/OneSignalApi/Client/RequestOptions.cs | 2 +- src/OneSignalApi/Client/RetryConfiguration.cs | 2 +- .../Model/AbstractOpenAPISchema.cs | 2 +- src/OneSignalApi/Model/App.cs | 2 +- src/OneSignalApi/Model/BasicNotification.cs | 57 ++- .../Model/BasicNotificationAllOf.cs | 57 ++- ...otificationAllOfAndroidBackgroundLayout.cs | 2 +- .../Model/BeginLiveActivityRequest.cs | 2 +- src/OneSignalApi/Model/Button.cs | 2 +- .../CancelNotificationSuccessResponse.cs | 2 +- .../CreateNotificationSuccessResponse.cs | 2 +- .../Model/CreatePlayerSuccessResponse.cs | 2 +- .../Model/CreateSegmentBadRequestResponse.cs | 144 -------- .../Model/CreateSegmentConflictResponse.cs | 2 +- .../Model/CreateSegmentSuccessResponse.cs | 2 +- .../Model/CreateSubscriptionRequestBody.cs | 2 +- .../Model/CreateUserConflictResponse.cs | 2 +- .../CreateUserConflictResponseErrorsInner.cs | 2 +- ...eateUserConflictResponseErrorsItemsMeta.cs | 2 +- .../Model/DeletePlayerNotFoundResponse.cs | 2 +- .../Model/DeletePlayerSuccessResponse.cs | 2 +- .../Model/DeleteSegmentBadRequestResponse.cs | 130 ------- .../Model/DeleteSegmentNotFoundResponse.cs | 2 +- .../Model/DeleteSegmentSuccessResponse.cs | 2 +- src/OneSignalApi/Model/DeliveryData.cs | 2 +- ...onse.cs => ExportEventsSuccessResponse.cs} | 45 ++- .../Model/ExportPlayersRequestBody.cs | 2 +- .../Model/ExportPlayersSuccessResponse.cs | 2 +- src/OneSignalApi/Model/Filter.cs | 2 +- src/OneSignalApi/Model/FilterExpressions.cs | 2 +- .../Model/FilterNotificationTarget.cs | 339 ------------------ .../{BadRequestError.cs => GenericError.cs} | 24 +- ...orsInner.cs => GenericErrorErrorsInner.cs} | 22 +- .../Model/GetNotificationRequestBody.cs | 2 +- .../Model/IdentifyUserConflictResponse.cs | 130 ------- src/OneSignalApi/Model/InlineResponse200.cs | 2 +- src/OneSignalApi/Model/InlineResponse2003.cs | 2 +- src/OneSignalApi/Model/InlineResponse201.cs | 2 +- src/OneSignalApi/Model/InlineResponse202.cs | 2 +- .../Model/InvalidIdentifierError.cs | 2 +- src/OneSignalApi/Model/Notification.cs | 57 ++- .../Model/Notification200Errors.cs | 2 +- src/OneSignalApi/Model/NotificationAllOf.cs | 2 +- .../NotificationHistoryBadRequestResponse.cs | 148 -------- .../NotificationHistorySuccessResponse.cs | 2 +- src/OneSignalApi/Model/NotificationSlice.cs | 2 +- src/OneSignalApi/Model/NotificationTarget.cs | 2 +- .../Model/NotificationWithMeta.cs | 57 ++- .../Model/NotificationWithMetaAllOf.cs | 2 +- src/OneSignalApi/Model/Operator.cs | 2 +- src/OneSignalApi/Model/OutcomeData.cs | 2 +- src/OneSignalApi/Model/OutcomesData.cs | 2 +- .../Model/PlatformDeliveryData.cs | 2 +- .../Model/PlatformDeliveryDataEmailAllOf.cs | 2 +- .../Model/PlatformDeliveryDataSmsAllOf.cs | 2 +- src/OneSignalApi/Model/Player.cs | 2 +- .../Model/PlayerNotificationTarget.cs | 2 +- .../PlayerNotificationTargetIncludeAliases.cs | 2 +- src/OneSignalApi/Model/PlayerSlice.cs | 2 +- src/OneSignalApi/Model/PropertiesDeltas.cs | 2 +- src/OneSignalApi/Model/PropertiesObject.cs | 2 +- src/OneSignalApi/Model/Purchase.cs | 2 +- ...RequestResponse.cs => RateLimiterError.cs} | 24 +- src/OneSignalApi/Model/Segment.cs | 2 +- .../Model/SegmentNotificationTarget.cs | 2 +- src/OneSignalApi/Model/StringMap.cs | 2 +- src/OneSignalApi/Model/SubscriptionObject.cs | 2 +- .../Model/TransferSubscriptionRequestBody.cs | 2 +- .../Model/UpdateLiveActivityRequest.cs | 2 +- .../UpdateLiveActivitySuccessResponse.cs | 2 +- .../Model/UpdatePlayerSuccessResponse.cs | 2 +- .../Model/UpdatePlayerTagsRequestBody.cs | 2 +- .../Model/UpdatePlayerTagsSuccessResponse.cs | 2 +- .../Model/UpdateSubscriptionRequestBody.cs | 2 +- src/OneSignalApi/Model/UpdateUserRequest.cs | 2 +- src/OneSignalApi/Model/User.cs | 2 +- .../Model/UserIdentityRequestBody.cs | 2 +- .../Model/UserIdentityResponse.cs | 2 +- .../Model/UserSubscriptionOptions.cs | 2 +- src/OneSignalApi/OneSignalApi.csproj | 2 +- 110 files changed, 778 insertions(+), 1134 deletions(-) delete mode 100644 docs/CreateSegmentBadRequestResponse.md delete mode 100644 docs/DeletePlayerBadRequestResponse.md rename docs/{BadRequestError.md => ExportEventsSuccessResponse.md} (74%) delete mode 100644 docs/FilterNotificationTarget.md rename docs/{CreateNotificationBadRequestResponse.md => GenericError.md} (67%) rename docs/{IdentifyUserConflictResponseErrorsInner.md => GenericErrorErrorsInner.md} (85%) delete mode 100644 docs/IdentifyUserConflictResponse.md delete mode 100644 docs/NotificationHistoryBadRequestResponse.md rename docs/{DeleteSegmentBadRequestResponse.md => RateLimiterError.md} (66%) delete mode 100644 src/OneSignalApi/Model/CreateSegmentBadRequestResponse.cs delete mode 100644 src/OneSignalApi/Model/DeleteSegmentBadRequestResponse.cs rename src/OneSignalApi/Model/{DeletePlayerBadRequestResponse.cs => ExportEventsSuccessResponse.cs} (66%) delete mode 100644 src/OneSignalApi/Model/FilterNotificationTarget.cs rename src/OneSignalApi/Model/{BadRequestError.cs => GenericError.cs} (82%) rename src/OneSignalApi/Model/{IdentifyUserConflictResponseErrorsInner.cs => GenericErrorErrorsInner.cs} (80%) delete mode 100644 src/OneSignalApi/Model/IdentifyUserConflictResponse.cs delete mode 100644 src/OneSignalApi/Model/NotificationHistoryBadRequestResponse.cs rename src/OneSignalApi/Model/{CreateNotificationBadRequestResponse.cs => RateLimiterError.cs} (78%) diff --git a/README.md b/README.md index c25d35c..ef3af90 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -- API version: 1.2.1 -- SDK version: 2.0.0 +- API version: 1.2.2 +- SDK version: 2.0.2 - Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen For more information, please visit [https://onesignal.com](https://onesignal.com) @@ -140,7 +140,8 @@ Class | Method | HTTP request | Description *DefaultApi* | [**DeleteSubscription**](docs/DefaultApi.md#deletesubscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} | *DefaultApi* | [**DeleteUser**](docs/DefaultApi.md#deleteuser) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} | *DefaultApi* | [**EndLiveActivity**](docs/DefaultApi.md#endliveactivity) | **DELETE** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity -*DefaultApi* | [**ExportPlayers**](docs/DefaultApi.md#exportplayers) | **POST** /players/csv_export?app_id={app_id} | CSV export +*DefaultApi* | [**ExportEvents**](docs/DefaultApi.md#exportevents) | **POST** /notifications/{notification_id}/export_events?app_id={app_id} | Export CSV of Events +*DefaultApi* | [**ExportPlayers**](docs/DefaultApi.md#exportplayers) | **POST** /players/csv_export?app_id={app_id} | Export CSV of Players *DefaultApi* | [**FetchAliases**](docs/DefaultApi.md#fetchaliases) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | *DefaultApi* | [**FetchUser**](docs/DefaultApi.md#fetchuser) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} | *DefaultApi* | [**FetchUserIdentity**](docs/DefaultApi.md#fetchuseridentity) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | @@ -168,7 +169,6 @@ Class | Method | HTTP request | Description ## Documentation for Models - [Model.App](docs/App.md) - - [Model.BadRequestError](docs/BadRequestError.md) - [Model.BasicNotification](docs/BasicNotification.md) - [Model.BasicNotificationAllOf](docs/BasicNotificationAllOf.md) - [Model.BasicNotificationAllOfAndroidBackgroundLayout](docs/BasicNotificationAllOfAndroidBackgroundLayout.md) @@ -188,13 +188,14 @@ Class | Method | HTTP request | Description - [Model.DeleteSegmentNotFoundResponse](docs/DeleteSegmentNotFoundResponse.md) - [Model.DeleteSegmentSuccessResponse](docs/DeleteSegmentSuccessResponse.md) - [Model.DeliveryData](docs/DeliveryData.md) + - [Model.ExportEventsSuccessResponse](docs/ExportEventsSuccessResponse.md) - [Model.ExportPlayersRequestBody](docs/ExportPlayersRequestBody.md) - [Model.ExportPlayersSuccessResponse](docs/ExportPlayersSuccessResponse.md) - [Model.Filter](docs/Filter.md) - [Model.FilterExpressions](docs/FilterExpressions.md) + - [Model.GenericError](docs/GenericError.md) + - [Model.GenericErrorErrorsInner](docs/GenericErrorErrorsInner.md) - [Model.GetNotificationRequestBody](docs/GetNotificationRequestBody.md) - - [Model.IdentifyUserConflictResponse](docs/IdentifyUserConflictResponse.md) - - [Model.IdentifyUserConflictResponseErrorsInner](docs/IdentifyUserConflictResponseErrorsInner.md) - [Model.InlineResponse200](docs/InlineResponse200.md) - [Model.InlineResponse2003](docs/InlineResponse2003.md) - [Model.InlineResponse201](docs/InlineResponse201.md) @@ -221,6 +222,7 @@ Class | Method | HTTP request | Description - [Model.PropertiesDeltas](docs/PropertiesDeltas.md) - [Model.PropertiesObject](docs/PropertiesObject.md) - [Model.Purchase](docs/Purchase.md) + - [Model.RateLimiterError](docs/RateLimiterError.md) - [Model.Segment](docs/Segment.md) - [Model.SegmentNotificationTarget](docs/SegmentNotificationTarget.md) - [Model.StringMap](docs/StringMap.md) diff --git a/docs/BasicNotification.md b/docs/BasicNotification.md index 882090d..0025e5e 100644 --- a/docs/BasicNotification.md +++ b/docs/BasicNotification.md @@ -104,9 +104,12 @@ Name | Type | Description | Notes **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] +**EmailPreheader** | **string** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] +**IncludeUnsubscribed** | **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **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] **Filters** | [**List<Filter>**](Filter.md) | | [optional] +**CustomData** | **Object** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BasicNotificationAllOf.md b/docs/BasicNotificationAllOf.md index 5f10cdb..7f5f785 100644 --- a/docs/BasicNotificationAllOf.md +++ b/docs/BasicNotificationAllOf.md @@ -90,9 +90,12 @@ Name | Type | Description | Notes **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] +**EmailPreheader** | **string** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] +**IncludeUnsubscribed** | **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **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] **Filters** | [**List<Filter>**](Filter.md) | | [optional] +**CustomData** | **Object** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateSegmentBadRequestResponse.md b/docs/CreateSegmentBadRequestResponse.md deleted file mode 100644 index eeef0b1..0000000 --- a/docs/CreateSegmentBadRequestResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneSignalApi.Model.CreateSegmentBadRequestResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | **bool** | | [optional] -**Errors** | **List<string>** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index d3de0a1..9f15377 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -18,7 +18,8 @@ Method | HTTP request | Description [**DeleteSubscription**](DefaultApi.md#deletesubscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} | [**DeleteUser**](DefaultApi.md#deleteuser) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} | [**EndLiveActivity**](DefaultApi.md#endliveactivity) | **DELETE** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity -[**ExportPlayers**](DefaultApi.md#exportplayers) | **POST** /players/csv_export?app_id={app_id} | CSV export +[**ExportEvents**](DefaultApi.md#exportevents) | **POST** /notifications/{notification_id}/export_events?app_id={app_id} | Export CSV of Events +[**ExportPlayers**](DefaultApi.md#exportplayers) | **POST** /players/csv_export?app_id={app_id} | Export CSV of Players [**FetchAliases**](DefaultApi.md#fetchaliases) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | [**FetchUser**](DefaultApi.md#fetchuser) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} | [**FetchUserIdentity**](DefaultApi.md#fetchuseridentity) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | @@ -117,6 +118,7 @@ void (empty response body) |-------------|-------------|------------------| | **204** | OK | - | | **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -194,6 +196,7 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -269,6 +272,7 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -344,6 +348,7 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK, invalid_player_ids, invalid_external_user_ids 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_player_ids\" or \"invalid_external_user_ids\" 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. | - | | **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -419,6 +424,8 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **409** | Conflict | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -497,6 +504,7 @@ Name | Type | Description | Notes | **201** | Created | - | | **400** | Bad Request | - | | **409** | Conflict | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -577,6 +585,9 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **201** | CREATED | - | | **202** | ACCEPTED | - | +| **400** | Bad Request | - | +| **409** | Operation is not permitted due to user having the maximum number of subscriptions assigned | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -651,9 +662,12 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **200** | CREATED | - | | **201** | CREATED | - | | **202** | ACCEPTED | - | +| **400** | Bad Request | - | | **409** | Multiple User Identity Conflict | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -733,6 +747,9 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | OK | - | +| **400** | Bad Request | - | +| **409** | Conflict | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -811,6 +828,7 @@ Name | Type | Description | Notes | **200** | OK | - | | **400** | Bad Request | - | | **404** | Not Found | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -889,6 +907,7 @@ Name | Type | Description | Notes | **200** | OK | - | | **400** | Bad Request | - | | **404** | Not Found | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -956,13 +975,16 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| | **202** | ACCEPTED | - | +| **400** | Bad Request | - | +| **409** | Conflict | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1029,13 +1051,16 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | OK | - | +| **400** | Bad Request | - | +| **409** | Conflict | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1114,6 +1139,86 @@ void (empty response body) |-------------|-------------|------------------| | **204** | OK | - | | **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **ExportEvents** +> ExportEventsSuccessResponse ExportEvents (string notificationId, string appId) + +Export CSV of Events + +Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using OneSignalApi.Api; +using OneSignalApi.Client; +using OneSignalApi.Model; + +namespace Example +{ + public class ExportEventsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://onesignal.com/api/v1"; + // Configure Bearer token for authorization: app_key + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new DefaultApi(config); + var notificationId = "notificationId_example"; // string | The ID of the notification to export events from. + var appId = "appId_example"; // string | The ID of the app that the notification belongs to. + + try + { + // Export CSV of Events + ExportEventsSuccessResponse result = apiInstance.ExportEvents(notificationId, appId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling DefaultApi.ExportEvents: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **notificationId** | **string**| The ID of the notification to export events from. | + **appId** | **string**| The ID of the app that the notification belongs to. | + +### Return type + +[**ExportEventsSuccessResponse**](ExportEventsSuccessResponse.md) + +### Authorization + +[app_key](../README.md#app_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad Request | - | +| **404** | Not Found | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1121,7 +1226,7 @@ void (empty response body) # **ExportPlayers** > ExportPlayersSuccessResponse ExportPlayers (string appId, ExportPlayersRequestBody exportPlayersRequestBody = null) -CSV export +Export CSV of Players Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. 🚧 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. 🚧 Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. 🚧 Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | @@ -1150,7 +1255,7 @@ namespace Example try { - // CSV export + // Export CSV of Players ExportPlayersSuccessResponse result = apiInstance.ExportPlayers(appId, exportPlayersRequestBody); Debug.WriteLine(result); } @@ -1191,6 +1296,7 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1266,6 +1372,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | OK | - | +| **400** | Bad Request | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1343,6 +1450,8 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | OK | - | +| **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1420,6 +1529,8 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | OK | - | +| **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1495,6 +1606,7 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1566,6 +1678,7 @@ This endpoint does not need any parameter. |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1641,6 +1754,8 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | OK | - | +| **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1718,6 +1833,7 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1795,6 +1911,7 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1876,6 +1993,7 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1961,6 +2079,7 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2040,6 +2159,7 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2119,6 +2239,7 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2198,7 +2319,9 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | OK | - | +| **400** | Bad Request | - | | **409** | Conflict | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2276,7 +2399,9 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | OK | - | +| **400** | Bad Request | - | | **409** | Conflict | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2354,6 +2479,9 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | OK | - | +| **400** | Bad Request | - | +| **409** | Conflict | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2431,6 +2559,7 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2510,6 +2639,7 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2587,6 +2717,8 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **409** | Conflict | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2665,6 +2797,9 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | OK | - | +| **400** | Bad Request | - | +| **409** | Conflict | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2734,13 +2869,16 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/json - - **Accept**: Not defined + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| | **202** | ACCEPTED | - | +| **400** | Bad Request | - | +| **409** | Conflict | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2820,6 +2958,9 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| | **202** | ACCEPTED | - | +| **400** | Bad Request | - | +| **409** | Conflict | - | +| **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/DeletePlayerBadRequestResponse.md b/docs/DeletePlayerBadRequestResponse.md deleted file mode 100644 index f91544f..0000000 --- a/docs/DeletePlayerBadRequestResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneSignalApi.Model.DeletePlayerBadRequestResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Erorrs** | **List<bool>** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/BadRequestError.md b/docs/ExportEventsSuccessResponse.md similarity index 74% rename from docs/BadRequestError.md rename to docs/ExportEventsSuccessResponse.md index 7f18136..e53b252 100644 --- a/docs/BadRequestError.md +++ b/docs/ExportEventsSuccessResponse.md @@ -1,10 +1,10 @@ -# OneSignalApi.Model.BadRequestError +# OneSignalApi.Model.ExportEventsSuccessResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Errors** | **List<string>** | | [optional] +**CsvFileUrl** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FilterNotificationTarget.md b/docs/FilterNotificationTarget.md deleted file mode 100644 index d63f227..0000000 --- a/docs/FilterNotificationTarget.md +++ /dev/null @@ -1,21 +0,0 @@ -# OneSignalApi.Model.FilterNotificationTarget - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/CreateNotificationBadRequestResponse.md b/docs/GenericError.md similarity index 67% rename from docs/CreateNotificationBadRequestResponse.md rename to docs/GenericError.md index faf2988..017d46f 100644 --- a/docs/CreateNotificationBadRequestResponse.md +++ b/docs/GenericError.md @@ -1,10 +1,10 @@ -# OneSignalApi.Model.CreateNotificationBadRequestResponse +# OneSignalApi.Model.GenericError ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Errors** | **List<string>** | | [optional] +**Errors** | [**List<GenericErrorErrorsInner>**](GenericErrorErrorsInner.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IdentifyUserConflictResponseErrorsInner.md b/docs/GenericErrorErrorsInner.md similarity index 85% rename from docs/IdentifyUserConflictResponseErrorsInner.md rename to docs/GenericErrorErrorsInner.md index e19b69a..3d9b103 100644 --- a/docs/IdentifyUserConflictResponseErrorsInner.md +++ b/docs/GenericErrorErrorsInner.md @@ -1,4 +1,4 @@ -# OneSignalApi.Model.IdentifyUserConflictResponseErrorsInner +# OneSignalApi.Model.GenericErrorErrorsInner ## Properties diff --git a/docs/IdentifyUserConflictResponse.md b/docs/IdentifyUserConflictResponse.md deleted file mode 100644 index 7bddc69..0000000 --- a/docs/IdentifyUserConflictResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneSignalApi.Model.IdentifyUserConflictResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**List<IdentifyUserConflictResponseErrorsInner>**](IdentifyUserConflictResponseErrorsInner.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/Notification.md b/docs/Notification.md index 7dfc880..5889d43 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -104,9 +104,12 @@ Name | Type | Description | Notes **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] +**EmailPreheader** | **string** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] +**IncludeUnsubscribed** | **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **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] **Filters** | [**List<Filter>**](Filter.md) | | [optional] +**CustomData** | **Object** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] **SendAfter** | **DateTime?** | Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/NotificationHistoryBadRequestResponse.md b/docs/NotificationHistoryBadRequestResponse.md deleted file mode 100644 index 8fd6935..0000000 --- a/docs/NotificationHistoryBadRequestResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneSignalApi.Model.NotificationHistoryBadRequestResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | **string** | | [optional] -**Errors** | **List<string>** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/NotificationWithMeta.md b/docs/NotificationWithMeta.md index 0f8a879..81d2a2c 100644 --- a/docs/NotificationWithMeta.md +++ b/docs/NotificationWithMeta.md @@ -104,9 +104,12 @@ Name | Type | Description | Notes **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] +**EmailPreheader** | **string** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional] +**IncludeUnsubscribed** | **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **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] **Filters** | [**List<Filter>**](Filter.md) | | [optional] +**CustomData** | **Object** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] **Successful** | **int** | Number of notifications that were successfully delivered. | [optional] **Failed** | **int** | Number of notifications that could not be delivered due to those devices being unsubscribed. | [optional] **Errored** | **int** | Number of notifications that could not be delivered due to an error. You can find more information by viewing the notification in the dashboard. | [optional] diff --git a/docs/DeleteSegmentBadRequestResponse.md b/docs/RateLimiterError.md similarity index 66% rename from docs/DeleteSegmentBadRequestResponse.md rename to docs/RateLimiterError.md index 210b44b..a7c6a0f 100644 --- a/docs/DeleteSegmentBadRequestResponse.md +++ b/docs/RateLimiterError.md @@ -1,10 +1,10 @@ -# OneSignalApi.Model.DeleteSegmentBadRequestResponse +# OneSignalApi.Model.RateLimiterError ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Erorrs** | **List<string>** | | [optional] +**Errors** | [**List<GenericErrorErrorsInner>**](GenericErrorErrorsInner.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/OneSignalApi/Api/DefaultApi.cs b/src/OneSignalApi/Api/DefaultApi.cs index bddc775..5651506 100644 --- a/src/OneSignalApi/Api/DefaultApi.cs +++ b/src/OneSignalApi/Api/DefaultApi.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -386,7 +386,32 @@ public interface IDefaultApiSync : IApiAccessor /// ApiResponse of Object(void) ApiResponse EndLiveActivityWithHttpInfo(string appId, string activityId, string subscriptionId, int operationIndex = 0); /// - /// CSV export + /// Export CSV of Events + /// + /// + /// Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. + /// + /// Thrown when fails to make API call + /// The ID of the notification to export events from. + /// The ID of the app that the notification belongs to. + /// Index associated with the operation. + /// ExportEventsSuccessResponse + ExportEventsSuccessResponse ExportEvents(string notificationId, string appId, int operationIndex = 0); + + /// + /// Export CSV of Events + /// + /// + /// Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. + /// + /// Thrown when fails to make API call + /// The ID of the notification to export events from. + /// The ID of the app that the notification belongs to. + /// Index associated with the operation. + /// ApiResponse of ExportEventsSuccessResponse + ApiResponse ExportEventsWithHttpInfo(string notificationId, string appId, int operationIndex = 0); + /// + /// Export CSV of Players /// /// /// Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | @@ -399,7 +424,7 @@ public interface IDefaultApiSync : IApiAccessor ExportPlayersSuccessResponse ExportPlayers(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0); /// - /// CSV export + /// Export CSV of Players /// /// /// Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | @@ -1363,7 +1388,34 @@ public interface IDefaultApiAsync : IApiAccessor /// Task of ApiResponse System.Threading.Tasks.Task> EndLiveActivityWithHttpInfoAsync(string appId, string activityId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// CSV export + /// Export CSV of Events + /// + /// + /// Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. + /// + /// Thrown when fails to make API call + /// The ID of the notification to export events from. + /// The ID of the app that the notification belongs to. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ExportEventsSuccessResponse + System.Threading.Tasks.Task ExportEventsAsync(string notificationId, string appId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Export CSV of Events + /// + /// + /// Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. + /// + /// Thrown when fails to make API call + /// The ID of the notification to export events from. + /// The ID of the app that the notification belongs to. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ExportEventsSuccessResponse) + System.Threading.Tasks.Task> ExportEventsWithHttpInfoAsync(string notificationId, string appId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Export CSV of Players /// /// /// Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | @@ -1377,7 +1429,7 @@ public interface IDefaultApiAsync : IApiAccessor System.Threading.Tasks.Task ExportPlayersAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// CSV export + /// Export CSV of Players /// /// /// Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | @@ -4100,6 +4152,7 @@ public OneSignalApi.Client.ApiResponse DeleteSubscriptionWithHttpInfo(st // to determine the Accept header string[] _accepts = new string[] { + "application/json" }; var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -4186,6 +4239,7 @@ public OneSignalApi.Client.ApiResponse DeleteSubscriptionWithHttpInfo(st // to determine the Accept header string[] _accepts = new string[] { + "application/json" }; var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -4278,6 +4332,7 @@ public OneSignalApi.Client.ApiResponse DeleteUserWithHttpInfo(string app // to determine the Accept header string[] _accepts = new string[] { + "application/json" }; var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -4367,6 +4422,7 @@ public OneSignalApi.Client.ApiResponse DeleteUserWithHttpInfo(string app // to determine the Accept header string[] _accepts = new string[] { + "application/json" }; var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -4595,7 +4651,181 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } /// - /// CSV export Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | + /// Export CSV of Events Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. + /// + /// Thrown when fails to make API call + /// The ID of the notification to export events from. + /// The ID of the app that the notification belongs to. + /// Index associated with the operation. + /// ExportEventsSuccessResponse + public ExportEventsSuccessResponse ExportEvents(string notificationId, string appId, int operationIndex = 0) + { + OneSignalApi.Client.ApiResponse localVarResponse = ExportEventsWithHttpInfo(notificationId, appId); + return localVarResponse.Data; + } + + /// + /// Export CSV of Events Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. + /// + /// Thrown when fails to make API call + /// The ID of the notification to export events from. + /// The ID of the app that the notification belongs to. + /// Index associated with the operation. + /// ApiResponse of ExportEventsSuccessResponse + public OneSignalApi.Client.ApiResponse ExportEventsWithHttpInfo(string notificationId, string appId, int operationIndex = 0) + { + // verify the required parameter 'notificationId' is set + if (notificationId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->ExportEvents"); + } + + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->ExportEvents"); + } + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + + localVarRequestOptions.Operation = "DefaultApi.ExportEvents"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/notifications/{notification_id}/export_events?app_id={app_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ExportEvents", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Export CSV of Events Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. + /// + /// Thrown when fails to make API call + /// The ID of the notification to export events from. + /// The ID of the app that the notification belongs to. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ExportEventsSuccessResponse + public async System.Threading.Tasks.Task ExportEventsAsync(string notificationId, string appId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + OneSignalApi.Client.ApiResponse localVarResponse = await ExportEventsWithHttpInfoAsync(notificationId, appId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Export CSV of Events Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. + /// + /// Thrown when fails to make API call + /// The ID of the notification to export events from. + /// The ID of the app that the notification belongs to. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ExportEventsSuccessResponse) + public async System.Threading.Tasks.Task> ExportEventsWithHttpInfoAsync(string notificationId, string appId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'notificationId' is set + if (notificationId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->ExportEvents"); + } + + // verify the required parameter 'appId' is set + if (appId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->ExportEvents"); + } + + + OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + + localVarRequestOptions.Operation = "DefaultApi.ExportEvents"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (app_key) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/notifications/{notification_id}/export_events?app_id={app_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ExportEvents", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Export CSV of Players Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | /// /// Thrown when fails to make API call /// The app ID that you want to export devices from @@ -4609,7 +4839,7 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } /// - /// CSV export Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | + /// Export CSV of Players Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | /// /// Thrown when fails to make API call /// The app ID that you want to export devices from @@ -4675,7 +4905,7 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } /// - /// CSV export Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | + /// Export CSV of Players Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | /// /// Thrown when fails to make API call /// The app ID that you want to export devices from @@ -4690,7 +4920,7 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } /// - /// CSV export Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | + /// Export CSV of Players Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | /// /// Thrown when fails to make API call /// The app ID that you want to export devices from @@ -8293,6 +8523,7 @@ public OneSignalApi.Client.ApiResponse UpdateSubscriptionWithHttpInfo(st // to determine the Accept header string[] _accepts = new string[] { + "application/json" }; var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -8389,6 +8620,7 @@ public OneSignalApi.Client.ApiResponse UpdateSubscriptionWithHttpInfo(st // to determine the Accept header string[] _accepts = new string[] { + "application/json" }; var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); diff --git a/src/OneSignalApi/Client/ApiClient.cs b/src/OneSignalApi/Client/ApiClient.cs index 95a2509..d0d44e1 100644 --- a/src/OneSignalApi/Client/ApiClient.cs +++ b/src/OneSignalApi/Client/ApiClient.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -304,7 +304,7 @@ private RestRequest NewRequest( } // Always add the One Signal telemetry to the request. - request.AddHeader("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-dotnet, version=1.2.1"); + request.AddHeader("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-dotnet, version=1.2.2"); if (configuration.DefaultHeaders != null) { diff --git a/src/OneSignalApi/Client/ApiException.cs b/src/OneSignalApi/Client/ApiException.cs index 1a8723a..dbdcacb 100644 --- a/src/OneSignalApi/Client/ApiException.cs +++ b/src/OneSignalApi/Client/ApiException.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/ApiResponse.cs b/src/OneSignalApi/Client/ApiResponse.cs index 3bebe58..ef9c24f 100644 --- a/src/OneSignalApi/Client/ApiResponse.cs +++ b/src/OneSignalApi/Client/ApiResponse.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/ClientUtils.cs b/src/OneSignalApi/Client/ClientUtils.cs index 8efaf81..35d4bed 100644 --- a/src/OneSignalApi/Client/ClientUtils.cs +++ b/src/OneSignalApi/Client/ClientUtils.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/Configuration.cs b/src/OneSignalApi/Client/Configuration.cs index a37481e..14cc7bb 100644 --- a/src/OneSignalApi/Client/Configuration.cs +++ b/src/OneSignalApi/Client/Configuration.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -32,7 +32,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "2.0.0"; + public const string Version = "2.0.2"; /// /// Identifier for ISO 8601 DateTime Format @@ -109,7 +109,7 @@ public class Configuration : IReadableConfiguration public Configuration() { Proxy = null; - UserAgent = "OpenAPI-Generator/2.0.0/csharp"; + UserAgent = "OpenAPI-Generator/2.0.2/csharp"; BasePath = "https://onesignal.com/api/v1"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -516,8 +516,8 @@ public static string ToDebugReport() string report = "C# SDK (OneSignalApi) Debug Report:\n"; report += " OS: " + System.Environment.OSVersion + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: 1.2.1\n"; - report += " SDK Package Version: 2.0.0\n"; + report += " Version of the API: 1.2.2\n"; + report += " SDK Package Version: 2.0.2\n"; return report; } diff --git a/src/OneSignalApi/Client/ExceptionFactory.cs b/src/OneSignalApi/Client/ExceptionFactory.cs index 49b318c..2019955 100644 --- a/src/OneSignalApi/Client/ExceptionFactory.cs +++ b/src/OneSignalApi/Client/ExceptionFactory.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/GlobalConfiguration.cs b/src/OneSignalApi/Client/GlobalConfiguration.cs index 05069ea..2855889 100644 --- a/src/OneSignalApi/Client/GlobalConfiguration.cs +++ b/src/OneSignalApi/Client/GlobalConfiguration.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/HttpMethod.cs b/src/OneSignalApi/Client/HttpMethod.cs index 22b54ee..1bbecad 100644 --- a/src/OneSignalApi/Client/HttpMethod.cs +++ b/src/OneSignalApi/Client/HttpMethod.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/IApiAccessor.cs b/src/OneSignalApi/Client/IApiAccessor.cs index 095c894..6229a40 100644 --- a/src/OneSignalApi/Client/IApiAccessor.cs +++ b/src/OneSignalApi/Client/IApiAccessor.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/IAsynchronousClient.cs b/src/OneSignalApi/Client/IAsynchronousClient.cs index d7b63a0..5e2ccda 100644 --- a/src/OneSignalApi/Client/IAsynchronousClient.cs +++ b/src/OneSignalApi/Client/IAsynchronousClient.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/IReadableConfiguration.cs b/src/OneSignalApi/Client/IReadableConfiguration.cs index 020d104..07c09c2 100644 --- a/src/OneSignalApi/Client/IReadableConfiguration.cs +++ b/src/OneSignalApi/Client/IReadableConfiguration.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/ISynchronousClient.cs b/src/OneSignalApi/Client/ISynchronousClient.cs index 512eb1e..747ca16 100644 --- a/src/OneSignalApi/Client/ISynchronousClient.cs +++ b/src/OneSignalApi/Client/ISynchronousClient.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/Multimap.cs b/src/OneSignalApi/Client/Multimap.cs index fb84d24..fcd41d9 100644 --- a/src/OneSignalApi/Client/Multimap.cs +++ b/src/OneSignalApi/Client/Multimap.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/OpenAPIDateConverter.cs b/src/OneSignalApi/Client/OpenAPIDateConverter.cs index 878ba58..a0a0572 100644 --- a/src/OneSignalApi/Client/OpenAPIDateConverter.cs +++ b/src/OneSignalApi/Client/OpenAPIDateConverter.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/RequestOptions.cs b/src/OneSignalApi/Client/RequestOptions.cs index 0b77bcf..0f4f571 100644 --- a/src/OneSignalApi/Client/RequestOptions.cs +++ b/src/OneSignalApi/Client/RequestOptions.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/RetryConfiguration.cs b/src/OneSignalApi/Client/RetryConfiguration.cs index b60399e..0dba1ae 100644 --- a/src/OneSignalApi/Client/RetryConfiguration.cs +++ b/src/OneSignalApi/Client/RetryConfiguration.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/AbstractOpenAPISchema.cs b/src/OneSignalApi/Model/AbstractOpenAPISchema.cs index 2c76e08..02b561a 100644 --- a/src/OneSignalApi/Model/AbstractOpenAPISchema.cs +++ b/src/OneSignalApi/Model/AbstractOpenAPISchema.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/App.cs b/src/OneSignalApi/Model/App.cs index 6a88fc6..70fc644 100644 --- a/src/OneSignalApi/Model/App.cs +++ b/src/OneSignalApi/Model/App.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/BasicNotification.cs b/src/OneSignalApi/Model/BasicNotification.cs index bccafd0..044f2f6 100644 --- a/src/OneSignalApi/Model/BasicNotification.cs +++ b/src/OneSignalApi/Model/BasicNotification.cs @@ -3,7 +3,7 @@ * * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * The version of the OpenAPI document: 1.2.1 + * The version of the OpenAPI document: 1.2.2 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -205,10 +205,13 @@ protected BasicNotification() { } /// 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. . /// Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. . /// Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. . + /// Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. . + /// Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared.. /// Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. . /// 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. . /// filters. - public BasicNotification(List includedSegments = default(List), List excludedSegments = default(List), List includePlayerIds = default(List), List includeExternalUserIds = default(List), List includeEmailTokens = default(List), List includePhoneNumbers = default(List), List includeIosTokens = default(List), List includeWpWnsUris = default(List), List includeAmazonRegIds = default(List), List includeChromeRegIds = default(List), List includeChromeWebRegIds = default(List), List includeAndroidRegIds = default(List), PlayerNotificationTargetIncludeAliases includeAliases = default(PlayerNotificationTargetIncludeAliases), TargetChannelEnum? targetChannel = default(TargetChannelEnum?), string id = default(string), string name = default(string), bool? isIos = default(bool?), bool? isAndroid = default(bool?), bool? isHuawei = default(bool?), bool? isAnyWeb = default(bool?), bool? isChromeWeb = default(bool?), bool? isFirefox = default(bool?), bool? isSafari = default(bool?), bool? isWPWNS = default(bool?), bool? isAdm = default(bool?), bool? isChrome = default(bool?), string channelForExternalUserIds = default(string), string appId = default(string), string externalId = default(string), StringMap contents = default(StringMap), StringMap headings = default(StringMap), StringMap subtitle = default(StringMap), Object data = default(Object), string huaweiMsgType = default(string), string url = default(string), string webUrl = default(string), string appUrl = default(string), Object iosAttachments = default(Object), string templateId = default(string), bool? contentAvailable = default(bool?), bool mutableContent = default(bool), string targetContentIdentifier = default(string), string bigPicture = default(string), string huaweiBigPicture = default(string), string admBigPicture = default(string), string chromeBigPicture = default(string), string chromeWebImage = default(string), List