diff --git a/DefaultApi.md b/DefaultApi.md index 53b5825..3d23a1b 100644 --- a/DefaultApi.md +++ b/DefaultApi.md @@ -562,6 +562,7 @@ let body:.DefaultApiCreateUserRequest = { sku: "sku_example", amount: "amount_example", iso: "iso_example", + count: 3.14, }, ], ip: "ip_example", @@ -2370,6 +2371,7 @@ let body:.DefaultApiUpdateUserRequest = { sku: "sku_example", amount: "amount_example", iso: "iso_example", + count: 3.14, }, ], ip: "ip_example", @@ -2378,18 +2380,16 @@ let body:.DefaultApiUpdateUserRequest = { deltas: { session_time: 3.14, session_count: 3.14, - amount_spent: 3.14, purchases: [ { sku: "sku_example", amount: "amount_example", iso: "iso_example", + count: 3.14, }, ], }, }, - // string (optional) - subscriptionId: "subscription_id_example", }; apiInstance.updateUser(body).then((data:any) => { @@ -2406,7 +2406,6 @@ Name | Type | Description | Notes **appId** | [**string**] | | defaults to undefined **aliasLabel** | [**string**] | | defaults to undefined **aliasId** | [**string**] | | defaults to undefined - **subscriptionId** | [**string**] | | (optional) defaults to undefined ### Return type diff --git a/README.md b/README.md index 128d762..72e616f 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ const configuration = OneSignal.createConfiguration({ const client = new OneSignal.DefaultApi(configuration); ``` -#### Advanced Usage: Creating a brand new app +#### Advanced Usage: Creating a brand-new app If creating a new app via the client, the response will return the app's API key via the `basic_auth_key` response parameter. You can then use this to modify your configuration object and create a new client that will have both user-level and app-level authentication set up. @@ -86,6 +86,8 @@ const client = new OneSignal.DefaultApi(configuration); --- ## API Reference +> See the full list of [API Endpoints](DefaultApi.MD). + To make stateful changes requests should take on the following pattern: 1. create or get an object 2. make changes to that object @@ -96,28 +98,6 @@ Examples of important OneSignal objects include `App`, `Notification`, `Player`, For example, see the section below on creating an app. First an app object is created via the instantiation of the `App` class. Then, the app instance is modified directly. Finally, we use the `client` to create the app via a remote request. -| Function | HTTP Request | Description | -|---------------------------------------------------------|------------------------------------------------|-----------------------------------------------------| -| [cancelNotification](#canceling-a-notification) | Delete `/notifications/{notification_id}` | Stop a scheduled or currently outgoing notification | -| [createApp](#creating-an-app) | Post `/apps` | Create an app | -| [createNotification](#creating-a-notification) | Post `/notifications` | Create notification | -| [createPlayer](#creating-a-player) | Post `/players` | Add a device | -| [createSegments](#creating-a-segment) | Post `/apps/{app_id}/segments` | Create Segments | -| [deletePlayer](#deleting-a-player) | Delete `/players/{player_id}` | Delete a user record | -| [deleteSegments](#deleting-a-segment) | Delete `/apps/{app_id}/segments/{segment_id}` | Delete Segments | -| [exportPlayers](#exporting-a-player) | Post `/players/csv_export?app_id={app_id}` | CSV export | -| [getApp](#getting-an-app) | Get `/apps/{app_id}` | View an app | -| [getApps](#getting-multiple-apps) | Get `/apps` | View apps | -| [getNotification](#getting-a-notification) | Get `/notifications/{notification_id}` | View notification | -| [getNotificationHistory](#getting-notification-history) | Post `/notifications/{notification_id}/history` | Notification History | -| [getNotifications](#getting-a-notification) | Get `/notifications` | View notifications | -| [getOutcomes](#getting-outcomes) | Get `/apps/{app_id}/outcomes` | View Outcomes | -| [getPlayer](#getting-a-player) | Get `/players/{player_id}` | View device | -| [getPlayers](#getting-players) | Get `/players` | View devices | -| [updateApp](#getting-an-app) | Put `/apps/{app_id}` | Update an app | -| [updatePlayer](#updating-a-player) | Put `/players/{player_id}` | Edit device | -| [updatePlayerTags](#updating-player-tags) | Put `/apps/{app_id}/users/{external_user_id}` | Edit tags with external user id | - ### Creating an app Creates a new OneSignal app. @@ -604,6 +584,6 @@ Give a ⭐️ if this project helped you! ## 📝 License -Copyright © 2022 [OneSignal](https://github.com/OneSignal). +Copyright © 2023 [OneSignal](https://github.com/OneSignal). This project is [MIT](https://github.com/OneSignal/node-onesignal/blob/main/LICENSE) licensed. diff --git a/apis/DefaultApi.ts b/apis/DefaultApi.ts index eff3902..66f6479 100644 --- a/apis/DefaultApi.ts +++ b/apis/DefaultApi.ts @@ -1971,9 +1971,8 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { * @param aliasLabel * @param aliasId * @param updateUserRequest - * @param subscriptionId */ - public async updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, subscriptionId?: string, _options?: Configuration): Promise { + public async updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise { let _config = _options || this.configuration; // verify required parameter 'appId' is not null or undefined @@ -2000,7 +1999,6 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { } - // Path Params const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}' .replace('{' + 'app_id' + '}', encodeURIComponent(String(appId))) @@ -2011,9 +2009,6 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") - // Header Params - requestContext.setHeaderParam("subscription_id", ObjectSerializer.serialize(subscriptionId, "string", "")); - // Body Params const contentType = ObjectSerializer.getPreferredMediaType([ diff --git a/models/App.ts b/models/App.ts index a05a32e..0fc0507 100644 --- a/models/App.ts +++ b/models/App.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/BadRequestError.ts b/models/BadRequestError.ts index 43fde26..18a939c 100644 --- a/models/BadRequestError.ts +++ b/models/BadRequestError.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/BasicNotification.ts b/models/BasicNotification.ts index ac99fbf..3568853 100644 --- a/models/BasicNotification.ts +++ b/models/BasicNotification.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/BasicNotificationAllOf.ts b/models/BasicNotificationAllOf.ts index 070da6a..3b21a19 100644 --- a/models/BasicNotificationAllOf.ts +++ b/models/BasicNotificationAllOf.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/BasicNotificationAllOfAndroidBackgroundLayout.ts b/models/BasicNotificationAllOfAndroidBackgroundLayout.ts index 374d08d..42cb535 100644 --- a/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +++ b/models/BasicNotificationAllOfAndroidBackgroundLayout.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/BeginLiveActivityRequest.ts b/models/BeginLiveActivityRequest.ts index c5a6fa9..b4ca39a 100644 --- a/models/BeginLiveActivityRequest.ts +++ b/models/BeginLiveActivityRequest.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/Button.ts b/models/Button.ts index acb93bb..64b36b9 100644 --- a/models/Button.ts +++ b/models/Button.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/CancelNotificationSuccessResponse.ts b/models/CancelNotificationSuccessResponse.ts index aed48f2..cf62f4a 100644 --- a/models/CancelNotificationSuccessResponse.ts +++ b/models/CancelNotificationSuccessResponse.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/CreateNotificationSuccessResponse.ts b/models/CreateNotificationSuccessResponse.ts index 0e38f5e..8b3fb8d 100644 --- a/models/CreateNotificationSuccessResponse.ts +++ b/models/CreateNotificationSuccessResponse.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ @@ -10,11 +10,11 @@ import { Notification200Errors } from './Notification200Errors'; import { HttpFile } from '../http/http'; export class CreateNotificationSuccessResponse { - 'id': string; + 'id'?: string; /** * Estimated number of subscribers targetted by notification. */ - 'recipients': number; + 'recipients'?: number; 'external_id'?: string; 'errors'?: Notification200Errors; diff --git a/models/CreatePlayerSuccessResponse.ts b/models/CreatePlayerSuccessResponse.ts index 3b86bde..1cf3974 100644 --- a/models/CreatePlayerSuccessResponse.ts +++ b/models/CreatePlayerSuccessResponse.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/CreateSegmentConflictResponse.ts b/models/CreateSegmentConflictResponse.ts index 88efd9a..1523b01 100644 --- a/models/CreateSegmentConflictResponse.ts +++ b/models/CreateSegmentConflictResponse.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/CreateSegmentSuccessResponse.ts b/models/CreateSegmentSuccessResponse.ts index 6f04de4..9de2811 100644 --- a/models/CreateSegmentSuccessResponse.ts +++ b/models/CreateSegmentSuccessResponse.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/CreateSubscriptionRequestBody.ts b/models/CreateSubscriptionRequestBody.ts index 885343c..ce84eb4 100644 --- a/models/CreateSubscriptionRequestBody.ts +++ b/models/CreateSubscriptionRequestBody.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/CreateUserConflictResponse.ts b/models/CreateUserConflictResponse.ts index 5783428..bad7aa4 100644 --- a/models/CreateUserConflictResponse.ts +++ b/models/CreateUserConflictResponse.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/CreateUserConflictResponseErrorsInner.ts b/models/CreateUserConflictResponseErrorsInner.ts index fbf991a..3746139 100644 --- a/models/CreateUserConflictResponseErrorsInner.ts +++ b/models/CreateUserConflictResponseErrorsInner.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/CreateUserConflictResponseErrorsItemsMeta.ts b/models/CreateUserConflictResponseErrorsItemsMeta.ts index 15dad35..860e158 100644 --- a/models/CreateUserConflictResponseErrorsItemsMeta.ts +++ b/models/CreateUserConflictResponseErrorsItemsMeta.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/DeletePlayerNotFoundResponse.ts b/models/DeletePlayerNotFoundResponse.ts index dbd5865..520acfa 100644 --- a/models/DeletePlayerNotFoundResponse.ts +++ b/models/DeletePlayerNotFoundResponse.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/DeletePlayerSuccessResponse.ts b/models/DeletePlayerSuccessResponse.ts index 14eccdc..66c0cad 100644 --- a/models/DeletePlayerSuccessResponse.ts +++ b/models/DeletePlayerSuccessResponse.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/DeleteSegmentNotFoundResponse.ts b/models/DeleteSegmentNotFoundResponse.ts index 6a41e5a..2242a1f 100644 --- a/models/DeleteSegmentNotFoundResponse.ts +++ b/models/DeleteSegmentNotFoundResponse.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/DeleteSegmentSuccessResponse.ts b/models/DeleteSegmentSuccessResponse.ts index 1b8bc4b..c787957 100644 --- a/models/DeleteSegmentSuccessResponse.ts +++ b/models/DeleteSegmentSuccessResponse.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/DeliveryData.ts b/models/DeliveryData.ts index 66bac5e..a28fe28 100644 --- a/models/DeliveryData.ts +++ b/models/DeliveryData.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/ExportPlayersRequestBody.ts b/models/ExportPlayersRequestBody.ts index f0348a3..d0f1d13 100644 --- a/models/ExportPlayersRequestBody.ts +++ b/models/ExportPlayersRequestBody.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/ExportPlayersSuccessResponse.ts b/models/ExportPlayersSuccessResponse.ts index 5f36a22..53269fa 100644 --- a/models/ExportPlayersSuccessResponse.ts +++ b/models/ExportPlayersSuccessResponse.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/Filter.ts b/models/Filter.ts index a6c8398..c655c05 100644 --- a/models/Filter.ts +++ b/models/Filter.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/FilterExpressions.ts b/models/FilterExpressions.ts index bdeaa36..f24112d 100644 --- a/models/FilterExpressions.ts +++ b/models/FilterExpressions.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/GetNotificationRequestBody.ts b/models/GetNotificationRequestBody.ts index acef746..ad691f9 100644 --- a/models/GetNotificationRequestBody.ts +++ b/models/GetNotificationRequestBody.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/IdentifyUserConflictResponse.ts b/models/IdentifyUserConflictResponse.ts index ce2b8d1..29a23fb 100644 --- a/models/IdentifyUserConflictResponse.ts +++ b/models/IdentifyUserConflictResponse.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/IdentifyUserConflictResponseErrorsInner.ts b/models/IdentifyUserConflictResponseErrorsInner.ts index 4ad3c58..07f86a5 100644 --- a/models/IdentifyUserConflictResponseErrorsInner.ts +++ b/models/IdentifyUserConflictResponseErrorsInner.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/InlineResponse200.ts b/models/InlineResponse200.ts index 8e877dc..d529682 100644 --- a/models/InlineResponse200.ts +++ b/models/InlineResponse200.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/InlineResponse2003.ts b/models/InlineResponse2003.ts index fdee68b..888faf1 100644 --- a/models/InlineResponse2003.ts +++ b/models/InlineResponse2003.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/InlineResponse201.ts b/models/InlineResponse201.ts index 3f3ead8..40abd86 100644 --- a/models/InlineResponse201.ts +++ b/models/InlineResponse201.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/InlineResponse202.ts b/models/InlineResponse202.ts index b61326c..be56a61 100644 --- a/models/InlineResponse202.ts +++ b/models/InlineResponse202.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/InvalidIdentifierError.ts b/models/InvalidIdentifierError.ts index ed17ae6..71dd353 100644 --- a/models/InvalidIdentifierError.ts +++ b/models/InvalidIdentifierError.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/Notification.ts b/models/Notification.ts index 5668698..451b31a 100644 --- a/models/Notification.ts +++ b/models/Notification.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/Notification200Errors.ts b/models/Notification200Errors.ts index 2afdccb..4c75682 100644 --- a/models/Notification200Errors.ts +++ b/models/Notification200Errors.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/NotificationAllOf.ts b/models/NotificationAllOf.ts index 2fba4b5..c1e5e1b 100644 --- a/models/NotificationAllOf.ts +++ b/models/NotificationAllOf.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/NotificationHistorySuccessResponse.ts b/models/NotificationHistorySuccessResponse.ts index b227a2a..a2eb612 100644 --- a/models/NotificationHistorySuccessResponse.ts +++ b/models/NotificationHistorySuccessResponse.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/NotificationSlice.ts b/models/NotificationSlice.ts index 3614834..d428f14 100644 --- a/models/NotificationSlice.ts +++ b/models/NotificationSlice.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/NotificationTarget.ts b/models/NotificationTarget.ts index e4b46a3..dcc25a5 100644 --- a/models/NotificationTarget.ts +++ b/models/NotificationTarget.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/NotificationWithMeta.ts b/models/NotificationWithMeta.ts index 403345f..e3c739e 100644 --- a/models/NotificationWithMeta.ts +++ b/models/NotificationWithMeta.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/NotificationWithMetaAllOf.ts b/models/NotificationWithMetaAllOf.ts index c920c95..748e06a 100644 --- a/models/NotificationWithMetaAllOf.ts +++ b/models/NotificationWithMetaAllOf.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/Operator.ts b/models/Operator.ts index b0bc7c6..060702a 100644 --- a/models/Operator.ts +++ b/models/Operator.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/OutcomeData.ts b/models/OutcomeData.ts index a2c12af..adf9b8c 100644 --- a/models/OutcomeData.ts +++ b/models/OutcomeData.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/OutcomesData.ts b/models/OutcomesData.ts index 2d7e368..de9d940 100644 --- a/models/OutcomesData.ts +++ b/models/OutcomesData.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/PlatformDeliveryData.ts b/models/PlatformDeliveryData.ts index cc49a63..0996ccf 100644 --- a/models/PlatformDeliveryData.ts +++ b/models/PlatformDeliveryData.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/PlatformDeliveryDataEmailAllOf.ts b/models/PlatformDeliveryDataEmailAllOf.ts index a354ad5..8857faf 100644 --- a/models/PlatformDeliveryDataEmailAllOf.ts +++ b/models/PlatformDeliveryDataEmailAllOf.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/PlatformDeliveryDataSmsAllOf.ts b/models/PlatformDeliveryDataSmsAllOf.ts index 08d161b..ecb0be1 100644 --- a/models/PlatformDeliveryDataSmsAllOf.ts +++ b/models/PlatformDeliveryDataSmsAllOf.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/Player.ts b/models/Player.ts index f7dcaef..112ede2 100644 --- a/models/Player.ts +++ b/models/Player.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/PlayerNotificationTarget.ts b/models/PlayerNotificationTarget.ts index 1de58d1..fa3490f 100644 --- a/models/PlayerNotificationTarget.ts +++ b/models/PlayerNotificationTarget.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/PlayerNotificationTargetIncludeAliases.ts b/models/PlayerNotificationTargetIncludeAliases.ts index ced93dd..294a9a9 100644 --- a/models/PlayerNotificationTargetIncludeAliases.ts +++ b/models/PlayerNotificationTargetIncludeAliases.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/PlayerSlice.ts b/models/PlayerSlice.ts index 3126ee9..e13e69e 100644 --- a/models/PlayerSlice.ts +++ b/models/PlayerSlice.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/PropertiesDeltas.ts b/models/PropertiesDeltas.ts index b82e99e..6d45b96 100644 --- a/models/PropertiesDeltas.ts +++ b/models/PropertiesDeltas.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ @@ -12,7 +12,6 @@ import { HttpFile } from '../http/http'; export class PropertiesDeltas { 'session_time'?: number; 'session_count'?: number; - 'amount_spent'?: number; 'purchases'?: Array; static readonly discriminator: string | undefined = undefined; @@ -30,12 +29,6 @@ export class PropertiesDeltas { "type": "number", "format": "" }, - { - "name": "amount_spent", - "baseName": "amount_spent", - "type": "number", - "format": "" - }, { "name": "purchases", "baseName": "purchases", diff --git a/models/PropertiesObject.ts b/models/PropertiesObject.ts index d56cd41..e79d7ad 100644 --- a/models/PropertiesObject.ts +++ b/models/PropertiesObject.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/Purchase.ts b/models/Purchase.ts index 0b85dca..9d0bf9a 100644 --- a/models/Purchase.ts +++ b/models/Purchase.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ @@ -21,6 +21,7 @@ export class Purchase { * The 3-letter ISO 4217 currency code. Required for correct storage and conversion of amount. */ 'iso': string; + 'count'?: number; static readonly discriminator: string | undefined = undefined; @@ -42,6 +43,12 @@ export class Purchase { "baseName": "iso", "type": "string", "format": "" + }, + { + "name": "count", + "baseName": "count", + "type": "number", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/models/Segment.ts b/models/Segment.ts index 3caf9ea..466750a 100644 --- a/models/Segment.ts +++ b/models/Segment.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/SegmentNotificationTarget.ts b/models/SegmentNotificationTarget.ts index 322fcc3..4d9f3fa 100644 --- a/models/SegmentNotificationTarget.ts +++ b/models/SegmentNotificationTarget.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/StringMap.ts b/models/StringMap.ts index 7fa4ab5..4f484c5 100644 --- a/models/StringMap.ts +++ b/models/StringMap.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/SubscriptionObject.ts b/models/SubscriptionObject.ts index 62a421c..2cc5167 100644 --- a/models/SubscriptionObject.ts +++ b/models/SubscriptionObject.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/TransferSubscriptionRequestBody.ts b/models/TransferSubscriptionRequestBody.ts index 692c852..a197e56 100644 --- a/models/TransferSubscriptionRequestBody.ts +++ b/models/TransferSubscriptionRequestBody.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/UpdateLiveActivityRequest.ts b/models/UpdateLiveActivityRequest.ts index 91f637a..a1f8521 100644 --- a/models/UpdateLiveActivityRequest.ts +++ b/models/UpdateLiveActivityRequest.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/UpdateLiveActivitySuccessResponse.ts b/models/UpdateLiveActivitySuccessResponse.ts index 4c65b6c..df9fcb6 100644 --- a/models/UpdateLiveActivitySuccessResponse.ts +++ b/models/UpdateLiveActivitySuccessResponse.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/UpdatePlayerSuccessResponse.ts b/models/UpdatePlayerSuccessResponse.ts index 28dac66..ac52b65 100644 --- a/models/UpdatePlayerSuccessResponse.ts +++ b/models/UpdatePlayerSuccessResponse.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/UpdatePlayerTagsRequestBody.ts b/models/UpdatePlayerTagsRequestBody.ts index c78f15e..729652a 100644 --- a/models/UpdatePlayerTagsRequestBody.ts +++ b/models/UpdatePlayerTagsRequestBody.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/UpdatePlayerTagsSuccessResponse.ts b/models/UpdatePlayerTagsSuccessResponse.ts index f02b092..f74ba4f 100644 --- a/models/UpdatePlayerTagsSuccessResponse.ts +++ b/models/UpdatePlayerTagsSuccessResponse.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/UpdateSubscriptionRequestBody.ts b/models/UpdateSubscriptionRequestBody.ts index 5d92e14..b3261d9 100644 --- a/models/UpdateSubscriptionRequestBody.ts +++ b/models/UpdateSubscriptionRequestBody.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/UpdateUserRequest.ts b/models/UpdateUserRequest.ts index 812ab6c..e8d00d0 100644 --- a/models/UpdateUserRequest.ts +++ b/models/UpdateUserRequest.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/User.ts b/models/User.ts index 52af98e..e7675d7 100644 --- a/models/User.ts +++ b/models/User.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/UserIdentityRequestBody.ts b/models/UserIdentityRequestBody.ts index cebcff1..9b97885 100644 --- a/models/UserIdentityRequestBody.ts +++ b/models/UserIdentityRequestBody.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/UserIdentityResponse.ts b/models/UserIdentityResponse.ts index 84fc235..0c20cce 100644 --- a/models/UserIdentityResponse.ts +++ b/models/UserIdentityResponse.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/models/UserSubscriptionOptions.ts b/models/UserSubscriptionOptions.ts index a3c134b..74beca9 100644 --- a/models/UserSubscriptionOptions.ts +++ b/models/UserSubscriptionOptions.ts @@ -2,7 +2,7 @@ * OneSignal * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com * - * API Version: 1.1.0 + * API Version: 1.2.1 * Contact: devrel@onesignal.com */ diff --git a/package.json b/package.json index 1398d82..e234492 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@onesignal/node-onesignal", - "version": "1.0.0-beta9", + "version": "2.0.0-beta1", "description": "OpenAPI client for @onesignal/node-onesignal", "author": "OpenAPI-Generator Contributors", "keywords": [ @@ -21,7 +21,7 @@ "prepare": "npm run build" }, "dependencies": { - "@types/node": "^18.15.0", + "@types/node": "^18.15.11", "@types/node-fetch": "^2.5.7", "btoa": "^1.2.1", "es6-promise": "^4.2.4", diff --git a/types/ObjectParamAPI.ts b/types/ObjectParamAPI.ts index d2b6a72..1771678 100644 --- a/types/ObjectParamAPI.ts +++ b/types/ObjectParamAPI.ts @@ -734,12 +734,6 @@ export interface DefaultApiUpdateUserRequest { * @memberof DefaultApiupdateUser */ updateUserRequest: UpdateUserRequest - /** - * - * @type string - * @memberof DefaultApiupdateUser - */ - subscriptionId?: string } export class ObjectDefaultApi { @@ -1056,7 +1050,7 @@ export class ObjectDefaultApi { * @param param the request object */ public updateUser(param: DefaultApiUpdateUserRequest, options?: Configuration): Promise { - return this.api.updateUser(param.appId, param.aliasLabel, param.aliasId, param.updateUserRequest, param.subscriptionId, options).toPromise(); + return this.api.updateUser(param.appId, param.aliasLabel, param.aliasId, param.updateUserRequest, options).toPromise(); } } diff --git a/types/ObservableAPI.ts b/types/ObservableAPI.ts index bc928ab..452e32d 100644 --- a/types/ObservableAPI.ts +++ b/types/ObservableAPI.ts @@ -976,10 +976,9 @@ export class ObservableDefaultApi { * @param aliasLabel * @param aliasId * @param updateUserRequest - * @param subscriptionId */ - public updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, subscriptionId?: string, _options?: Configuration): Observable { - const requestContextPromise = this.requestFactory.updateUser(appId, aliasLabel, aliasId, updateUserRequest, subscriptionId, _options); + public updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Observable { + const requestContextPromise = this.requestFactory.updateUser(appId, aliasLabel, aliasId, updateUserRequest, _options); // build promise chain let middlewarePreObservable = from(requestContextPromise); diff --git a/types/PromiseAPI.ts b/types/PromiseAPI.ts index f772854..f084f06 100644 --- a/types/PromiseAPI.ts +++ b/types/PromiseAPI.ts @@ -482,10 +482,9 @@ export class PromiseDefaultApi { * @param aliasLabel * @param aliasId * @param updateUserRequest - * @param subscriptionId */ - public updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, subscriptionId?: string, _options?: Configuration): Promise { - const result = this.api.updateUser(appId, aliasLabel, aliasId, updateUserRequest, subscriptionId, _options); + public updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise { + const result = this.api.updateUser(appId, aliasLabel, aliasId, updateUserRequest, _options); return result.toPromise(); } diff --git a/yarn.lock b/yarn.lock index 73c639f..6ff89da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,17 +3,17 @@ "@types/node-fetch@^2.5.7": - version "2.6.2" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.2.tgz#d1a9c5fd049d9415dce61571557104dec3ec81da" - integrity sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A== + version "2.6.3" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.3.tgz#175d977f5e24d93ad0f57602693c435c57ad7e80" + integrity sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w== dependencies: "@types/node" "*" form-data "^3.0.0" -"@types/node@*", "@types/node@^18.15.0": - version "18.15.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.0.tgz#286a65e3fdffd691e170541e6ecb0410b16a38be" - integrity sha512-z6nr0TTEOBGkzLGmbypWOGnpSpSIBorEhC4L+4HeQ2iezKCi4f77kyslRwvHeNitymGQ+oFyIWGP96l/DPSV9w== +"@types/node@*", "@types/node@^18.15.11": + version "18.15.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.11.tgz#b3b790f09cb1696cffcec605de025b088fa4225f" + integrity sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q== "@types/url-parse@1.4.4": version "1.4.4"