Skip to content

Commit 0e5bfaf

Browse files
onesignal-deployOneSignal
and
OneSignal
authored
Update CPP API (#15)
Co-authored-by: OneSignal <[email protected]>
1 parent 7146cea commit 0e5bfaf

File tree

174 files changed

+1261
-2173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+1261
-2173
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ A powerful way to send personalized messages at scale and build effective custom
55
## Overview
66
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI spec](https://openapis.org) from a remote server, you can easily generate an API client.
77

8-
- API version: 1.2.1
9-
- Package version: 2.0.0
8+
- API version: 1.2.2
9+
- Package version: 2.0.2
1010
- Build package: org.openapitools.codegen.languages.CppRestSdkClientCodegen
1111
For more information, please visit [https://onesignal.com](https://onesignal.com)
1212

include/CppRestOneSignalAPIClient/ApiClient.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.

include/CppRestOneSignalAPIClient/ApiConfiguration.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.

include/CppRestOneSignalAPIClient/ApiException.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.

include/CppRestOneSignalAPIClient/HttpContent.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.

include/CppRestOneSignalAPIClient/IHttpBody.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.

include/CppRestOneSignalAPIClient/JsonBody.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.

include/CppRestOneSignalAPIClient/ModelBase.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.

include/CppRestOneSignalAPIClient/MultipartFormData.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.

include/CppRestOneSignalAPIClient/Object.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.

include/CppRestOneSignalAPIClient/api/DefaultApi.h

+21-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.
@@ -24,7 +24,6 @@
2424
#include "CppRestOneSignalAPIClient/ApiClient.h"
2525

2626
#include "CppRestOneSignalAPIClient/model/App.h"
27-
#include "CppRestOneSignalAPIClient/model/BadRequestError.h"
2827
#include "CppRestOneSignalAPIClient/model/BeginLiveActivityRequest.h"
2928
#include "CppRestOneSignalAPIClient/model/CancelNotificationSuccessResponse.h"
3029
#include "CppRestOneSignalAPIClient/model/CreateNotificationSuccessResponse.h"
@@ -37,10 +36,11 @@
3736
#include "CppRestOneSignalAPIClient/model/DeletePlayerSuccessResponse.h"
3837
#include "CppRestOneSignalAPIClient/model/DeleteSegmentNotFoundResponse.h"
3938
#include "CppRestOneSignalAPIClient/model/DeleteSegmentSuccessResponse.h"
39+
#include "CppRestOneSignalAPIClient/model/ExportEventsSuccessResponse.h"
4040
#include "CppRestOneSignalAPIClient/model/ExportPlayersSuccessResponse.h"
4141
#include "CppRestOneSignalAPIClient/model/Export_players_request_body.h"
42+
#include "CppRestOneSignalAPIClient/model/GenericError.h"
4243
#include "CppRestOneSignalAPIClient/model/Get_notification_request_body.h"
43-
#include "CppRestOneSignalAPIClient/model/IdentifyUserConflictResponse.h"
4444
#include "CppRestOneSignalAPIClient/model/Inline_response_200.h"
4545
#include "CppRestOneSignalAPIClient/model/Inline_response_200_3.h"
4646
#include "CppRestOneSignalAPIClient/model/Inline_response_201.h"
@@ -52,6 +52,7 @@
5252
#include "CppRestOneSignalAPIClient/model/OutcomesData.h"
5353
#include "CppRestOneSignalAPIClient/model/Player.h"
5454
#include "CppRestOneSignalAPIClient/model/PlayerSlice.h"
55+
#include "CppRestOneSignalAPIClient/model/RateLimiterError.h"
5556
#include "CppRestOneSignalAPIClient/model/Segment.h"
5657
#include "CppRestOneSignalAPIClient/model/TransferSubscriptionRequestBody.h"
5758
#include "CppRestOneSignalAPIClient/model/UpdateLiveActivityRequest.h"
@@ -140,6 +141,10 @@ class IDefaultApi
140141
utility::string_t activityId,
141142
utility::string_t subscriptionId
142143
) const = 0;
144+
virtual pplx::task<std::shared_ptr<ExportEventsSuccessResponse>> exportEvents(
145+
utility::string_t notificationId,
146+
utility::string_t appId
147+
) const = 0;
143148
virtual pplx::task<std::shared_ptr<ExportPlayersSuccessResponse>> exportPlayers(
144149
utility::string_t appId,
145150
boost::optional<std::shared_ptr<Export_players_request_body>> exportPlayersRequestBody
@@ -432,7 +437,19 @@ class DefaultApi : public IDefaultApi
432437
utility::string_t subscriptionId
433438
) const override;
434439
/// <summary>
435-
/// CSV export
440+
/// Export CSV of Events
441+
/// </summary>
442+
/// <remarks>
443+
/// 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.
444+
/// </remarks>
445+
/// <param name="notificationId">The ID of the notification to export events from.</param>
446+
/// <param name="appId">The ID of the app that the notification belongs to.</param>
447+
pplx::task<std::shared_ptr<ExportEventsSuccessResponse>> exportEvents(
448+
utility::string_t notificationId,
449+
utility::string_t appId
450+
) const override;
451+
/// <summary>
452+
/// Export CSV of Players
436453
/// </summary>
437454
/// <remarks>
438455
/// 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. &amp;#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. &amp;#x1F6A7; Requires Authentication Key Requires your OneSignal App&#39;s REST API Key, available in Keys &amp; IDs. &amp;#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 &#x3D; Chrome 80, 9 &#x3D; Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have &#x60;Linux armv&#x60; | | 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 &#x3D; unsubscribed, f &#x3D; 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. |

include/CppRestOneSignalAPIClient/model/App.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.

include/CppRestOneSignalAPIClient/model/BasicNotification.h

+34-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.
@@ -968,6 +968,24 @@ class BasicNotification
968968

969969
void setEmailFromAddress(const utility::string_t& value);
970970

971+
/// <summary>
972+
/// 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.
973+
/// </summary>
974+
utility::string_t getEmailPreheader() const;
975+
bool emailPreheaderIsSet() const;
976+
void unsetEmail_preheader();
977+
978+
void setEmailPreheader(const utility::string_t& value);
979+
980+
/// <summary>
981+
/// Channel: Email Default is &#x60;false&#x60;. This field is used to send transactional notifications. If set to &#x60;true&#x60;, this notification will also be sent to unsubscribed emails. If a &#x60;template_id&#x60; is provided, the &#x60;include_unsubscribed&#x60; value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP&#39;s list of unsubscribed emails to be cleared.
982+
/// </summary>
983+
bool isIncludeUnsubscribed() const;
984+
bool includeUnsubscribedIsSet() const;
985+
void unsetInclude_unsubscribed();
986+
987+
void setIncludeUnsubscribed(bool value);
988+
971989
/// <summary>
972990
/// Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format.
973991
/// </summary>
@@ -995,6 +1013,15 @@ class BasicNotification
9951013

9961014
void setFilters(const std::vector<std::shared_ptr<Filter>>& value);
9971015

1016+
/// <summary>
1017+
/// 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: {\&quot;order_id\&quot;: 123, \&quot;currency\&quot;: \&quot;USD\&quot;, \&quot;amount\&quot;: 25}
1018+
/// </summary>
1019+
std::shared_ptr<Object> getCustomData() const;
1020+
bool customDataIsSet() const;
1021+
void unsetCustom_data();
1022+
1023+
void setCustomData(const std::shared_ptr<Object>& value);
1024+
9981025

9991026
protected:
10001027
std::vector<utility::string_t> m_Included_segments;
@@ -1197,12 +1224,18 @@ class BasicNotification
11971224
bool m_Email_from_nameIsSet;
11981225
utility::string_t m_Email_from_address;
11991226
bool m_Email_from_addressIsSet;
1227+
utility::string_t m_Email_preheader;
1228+
bool m_Email_preheaderIsSet;
1229+
bool m_Include_unsubscribed;
1230+
bool m_Include_unsubscribedIsSet;
12001231
utility::string_t m_Sms_from;
12011232
bool m_Sms_fromIsSet;
12021233
std::vector<utility::string_t> m_Sms_media_urls;
12031234
bool m_Sms_media_urlsIsSet;
12041235
std::vector<std::shared_ptr<Filter>> m_Filters;
12051236
bool m_FiltersIsSet;
1237+
std::shared_ptr<Object> m_Custom_data;
1238+
bool m_Custom_dataIsSet;
12061239
};
12071240

12081241

include/CppRestOneSignalAPIClient/model/BasicNotification_allOf.h

+34-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.
@@ -838,6 +838,24 @@ class BasicNotification_allOf
838838

839839
void setEmailFromAddress(const utility::string_t& value);
840840

841+
/// <summary>
842+
/// 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.
843+
/// </summary>
844+
utility::string_t getEmailPreheader() const;
845+
bool emailPreheaderIsSet() const;
846+
void unsetEmail_preheader();
847+
848+
void setEmailPreheader(const utility::string_t& value);
849+
850+
/// <summary>
851+
/// Channel: Email Default is &#x60;false&#x60;. This field is used to send transactional notifications. If set to &#x60;true&#x60;, this notification will also be sent to unsubscribed emails. If a &#x60;template_id&#x60; is provided, the &#x60;include_unsubscribed&#x60; value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP&#39;s list of unsubscribed emails to be cleared.
852+
/// </summary>
853+
bool isIncludeUnsubscribed() const;
854+
bool includeUnsubscribedIsSet() const;
855+
void unsetInclude_unsubscribed();
856+
857+
void setIncludeUnsubscribed(bool value);
858+
841859
/// <summary>
842860
/// Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format.
843861
/// </summary>
@@ -865,6 +883,15 @@ class BasicNotification_allOf
865883

866884
void setFilters(const std::vector<std::shared_ptr<Filter>>& value);
867885

886+
/// <summary>
887+
/// 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: {\&quot;order_id\&quot;: 123, \&quot;currency\&quot;: \&quot;USD\&quot;, \&quot;amount\&quot;: 25}
888+
/// </summary>
889+
std::shared_ptr<Object> getCustomData() const;
890+
bool customDataIsSet() const;
891+
void unsetCustom_data();
892+
893+
void setCustomData(const std::shared_ptr<Object>& value);
894+
868895

869896
protected:
870897
utility::string_t m_Id;
@@ -1039,12 +1066,18 @@ class BasicNotification_allOf
10391066
bool m_Email_from_nameIsSet;
10401067
utility::string_t m_Email_from_address;
10411068
bool m_Email_from_addressIsSet;
1069+
utility::string_t m_Email_preheader;
1070+
bool m_Email_preheaderIsSet;
1071+
bool m_Include_unsubscribed;
1072+
bool m_Include_unsubscribedIsSet;
10421073
utility::string_t m_Sms_from;
10431074
bool m_Sms_fromIsSet;
10441075
std::vector<utility::string_t> m_Sms_media_urls;
10451076
bool m_Sms_media_urlsIsSet;
10461077
std::vector<std::shared_ptr<Filter>> m_Filters;
10471078
bool m_FiltersIsSet;
1079+
std::shared_ptr<Object> m_Custom_data;
1080+
bool m_Custom_dataIsSet;
10481081
};
10491082

10501083

include/CppRestOneSignalAPIClient/model/BasicNotification_allOf_android_background_layout.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.

include/CppRestOneSignalAPIClient/model/BeginLiveActivityRequest.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.

include/CppRestOneSignalAPIClient/model/Button.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.

include/CppRestOneSignalAPIClient/model/CancelNotificationSuccessResponse.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.

include/CppRestOneSignalAPIClient/model/CreateNotificationSuccessResponse.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.

include/CppRestOneSignalAPIClient/model/CreatePlayerSuccessResponse.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 1.2.1
5+
* The version of the OpenAPI document: 1.2.2
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI-Generator 6.0.0-SNAPSHOT.

0 commit comments

Comments
 (0)