@onesignal/node-onesignal 1.0.0-beta8 → 1.0.0-beta9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/Zapier.yml +29 -0
- package/CHANGELOG.md +15 -0
- package/DefaultApi.md +1139 -153
- package/README.md +148 -0
- package/apis/DefaultApi.ts +1344 -98
- package/dist/apis/DefaultApi.d.ts +39 -0
- package/dist/apis/DefaultApi.js +1491 -408
- package/dist/apis/DefaultApi.js.map +1 -1
- package/dist/models/BasicNotification.d.ts +4 -0
- package/dist/models/BasicNotification.js +12 -0
- package/dist/models/BasicNotification.js.map +1 -1
- package/dist/models/CreateSubscriptionRequestBody.d.ts +19 -0
- package/dist/models/CreateSubscriptionRequestBody.js +28 -0
- package/dist/models/CreateSubscriptionRequestBody.js.map +1 -0
- package/dist/models/CreateUserConflictResponse.d.ts +18 -0
- package/dist/models/CreateUserConflictResponse.js +22 -0
- package/dist/models/CreateUserConflictResponse.js.map +1 -0
- package/dist/models/CreateUserConflictResponseErrorsInner.d.ts +20 -0
- package/dist/models/CreateUserConflictResponseErrorsInner.js +34 -0
- package/dist/models/CreateUserConflictResponseErrorsInner.js.map +1 -0
- package/dist/models/CreateUserConflictResponseErrorsItemsMeta.d.ts +17 -0
- package/dist/models/CreateUserConflictResponseErrorsItemsMeta.js +22 -0
- package/dist/models/CreateUserConflictResponseErrorsItemsMeta.js.map +1 -0
- package/dist/models/IdentifyUserConflictResponse.d.ts +18 -0
- package/dist/models/IdentifyUserConflictResponse.js +22 -0
- package/dist/models/IdentifyUserConflictResponse.js.map +1 -0
- package/dist/models/IdentifyUserConflictResponseErrorsInner.d.ts +18 -0
- package/dist/models/IdentifyUserConflictResponseErrorsInner.js +28 -0
- package/dist/models/IdentifyUserConflictResponseErrorsInner.js.map +1 -0
- package/dist/models/InlineResponse200.d.ts +19 -0
- package/dist/models/InlineResponse200.js +22 -0
- package/dist/models/InlineResponse200.js.map +1 -0
- package/dist/models/InlineResponse2003.d.ts +17 -0
- package/dist/models/InlineResponse2003.js +22 -0
- package/dist/models/InlineResponse2003.js.map +1 -0
- package/dist/models/InlineResponse201.d.ts +18 -0
- package/dist/models/InlineResponse201.js +22 -0
- package/dist/models/InlineResponse201.js.map +1 -0
- package/dist/models/InlineResponse202.d.ts +18 -0
- package/dist/models/InlineResponse202.js +22 -0
- package/dist/models/InlineResponse202.js.map +1 -0
- package/dist/models/Notification.d.ts +4 -0
- package/dist/models/Notification.js +12 -0
- package/dist/models/Notification.js.map +1 -1
- package/dist/models/NotificationTarget.d.ts +4 -0
- package/dist/models/NotificationTarget.js +12 -0
- package/dist/models/NotificationTarget.js.map +1 -1
- package/dist/models/NotificationWithMeta.d.ts +4 -0
- package/dist/models/NotificationWithMeta.js +12 -0
- package/dist/models/NotificationWithMeta.js.map +1 -1
- package/dist/models/ObjectSerializer.d.ts +21 -0
- package/dist/models/ObjectSerializer.js +69 -0
- package/dist/models/ObjectSerializer.js.map +1 -1
- package/dist/models/Player.d.ts +1 -1
- package/dist/models/Player.js +1 -1
- package/dist/models/Player.js.map +1 -1
- package/dist/models/PlayerNotificationTarget.d.ts +4 -0
- package/dist/models/PlayerNotificationTarget.js +12 -0
- package/dist/models/PlayerNotificationTarget.js.map +1 -1
- package/dist/models/PlayerNotificationTargetIncludeAliases.d.ts +17 -0
- package/dist/models/PlayerNotificationTargetIncludeAliases.js +22 -0
- package/dist/models/PlayerNotificationTargetIncludeAliases.js.map +1 -0
- package/dist/models/PropertiesDeltas.d.ts +21 -0
- package/dist/models/PropertiesDeltas.js +40 -0
- package/dist/models/PropertiesDeltas.js.map +1 -0
- package/dist/models/PropertiesObject.d.ts +30 -0
- package/dist/models/PropertiesObject.js +82 -0
- package/dist/models/PropertiesObject.js.map +1 -0
- package/dist/models/Purchase.d.ts +1 -1
- package/dist/models/Purchase.js +1 -1
- package/dist/models/SubscriptionObject.d.ts +34 -0
- package/dist/models/SubscriptionObject.js +118 -0
- package/dist/models/SubscriptionObject.js.map +1 -0
- package/dist/models/TransferSubscriptionRequestBody.d.ts +19 -0
- package/dist/models/TransferSubscriptionRequestBody.js +22 -0
- package/dist/models/TransferSubscriptionRequestBody.js.map +1 -0
- package/dist/models/UpdateSubscriptionRequestBody.d.ts +18 -0
- package/dist/models/UpdateSubscriptionRequestBody.js +22 -0
- package/dist/models/UpdateSubscriptionRequestBody.js.map +1 -0
- package/dist/models/UpdateUserRequest.d.ts +21 -0
- package/dist/models/UpdateUserRequest.js +34 -0
- package/dist/models/UpdateUserRequest.js.map +1 -0
- package/dist/models/User.d.ts +25 -0
- package/dist/models/User.js +40 -0
- package/dist/models/User.js.map +1 -0
- package/dist/models/UserIdentityRequestBody.d.ts +19 -0
- package/dist/models/UserIdentityRequestBody.js +22 -0
- package/dist/models/UserIdentityRequestBody.js.map +1 -0
- package/dist/models/UserIdentityResponse.d.ts +19 -0
- package/dist/models/UserIdentityResponse.js +22 -0
- package/dist/models/UserIdentityResponse.js.map +1 -0
- package/dist/models/UserSubscriptionOptions.d.ts +17 -0
- package/dist/models/UserSubscriptionOptions.js +22 -0
- package/dist/models/UserSubscriptionOptions.js.map +1 -0
- package/dist/models/all.d.ts +21 -0
- package/dist/models/all.js +21 -0
- package/dist/models/all.js.map +1 -1
- package/dist/types/ObjectParamAPI.d.ts +96 -0
- package/dist/types/ObjectParamAPI.js +42 -0
- package/dist/types/ObjectParamAPI.js.map +1 -1
- package/dist/types/ObservableAPI.d.ts +25 -0
- package/dist/types/ObservableAPI.js +383 -47
- package/dist/types/ObservableAPI.js.map +1 -1
- package/dist/types/PromiseAPI.d.ts +25 -0
- package/dist/types/PromiseAPI.js +56 -0
- package/dist/types/PromiseAPI.js.map +1 -1
- package/models/App.ts +1 -1
- package/models/BadRequestError.ts +1 -1
- package/models/BasicNotification.ts +17 -1
- package/models/BasicNotificationAllOf.ts +1 -1
- package/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +1 -1
- package/models/BeginLiveActivityRequest.ts +1 -1
- package/models/Button.ts +1 -1
- package/models/CancelNotificationSuccessResponse.ts +1 -1
- package/models/CreateNotificationSuccessResponse.ts +1 -1
- package/models/CreatePlayerSuccessResponse.ts +1 -1
- package/models/CreateSegmentConflictResponse.ts +1 -1
- package/models/CreateSegmentSuccessResponse.ts +1 -1
- package/models/CreateSubscriptionRequestBody.ts +39 -0
- package/models/CreateUserConflictResponse.ts +32 -0
- package/models/CreateUserConflictResponseErrorsInner.ts +46 -0
- package/models/CreateUserConflictResponseErrorsItemsMeta.ts +31 -0
- package/models/DeletePlayerNotFoundResponse.ts +1 -1
- package/models/DeletePlayerSuccessResponse.ts +1 -1
- package/models/DeleteSegmentNotFoundResponse.ts +1 -1
- package/models/DeleteSegmentSuccessResponse.ts +1 -1
- package/models/DeliveryData.ts +1 -1
- package/models/ExportPlayersRequestBody.ts +1 -1
- package/models/ExportPlayersSuccessResponse.ts +1 -1
- package/models/Filter.ts +1 -1
- package/models/FilterExpressions.ts +1 -1
- package/models/GetNotificationRequestBody.ts +1 -1
- package/models/IdentifyUserConflictResponse.ts +32 -0
- package/models/IdentifyUserConflictResponseErrorsInner.ts +38 -0
- package/models/InlineResponse200.ts +31 -0
- package/models/InlineResponse2003.ts +31 -0
- package/models/InlineResponse201.ts +32 -0
- package/models/InlineResponse202.ts +32 -0
- package/models/InvalidIdentifierError.ts +1 -1
- package/models/Notification.ts +17 -1
- package/models/Notification200Errors.ts +1 -1
- package/models/NotificationAllOf.ts +1 -1
- package/models/NotificationHistorySuccessResponse.ts +1 -1
- package/models/NotificationSlice.ts +1 -1
- package/models/NotificationTarget.ts +19 -1
- package/models/NotificationWithMeta.ts +17 -1
- package/models/NotificationWithMetaAllOf.ts +1 -1
- package/models/ObjectSerializer.ts +74 -5
- package/models/Operator.ts +1 -1
- package/models/OutcomeData.ts +1 -1
- package/models/OutcomesData.ts +1 -1
- package/models/PlatformDeliveryData.ts +1 -1
- package/models/PlatformDeliveryDataEmailAllOf.ts +1 -1
- package/models/PlatformDeliveryDataSmsAllOf.ts +1 -1
- package/models/Player.ts +3 -3
- package/models/PlayerNotificationTarget.ts +19 -1
- package/models/PlayerNotificationTargetIncludeAliases.ts +31 -0
- package/models/PlayerSlice.ts +1 -1
- package/models/PropertiesDeltas.ts +53 -0
- package/models/PropertiesObject.ts +102 -0
- package/models/Purchase.ts +3 -3
- package/models/Segment.ts +1 -1
- package/models/SegmentNotificationTarget.ts +1 -1
- package/models/StringMap.ts +1 -1
- package/models/SubscriptionObject.ts +146 -0
- package/models/TransferSubscriptionRequestBody.ts +31 -0
- package/models/UpdateLiveActivityRequest.ts +1 -1
- package/models/UpdateLiveActivitySuccessResponse.ts +1 -1
- package/models/UpdatePlayerSuccessResponse.ts +1 -1
- package/models/UpdatePlayerTagsRequestBody.ts +1 -1
- package/models/UpdatePlayerTagsSuccessResponse.ts +1 -1
- package/models/UpdateSubscriptionRequestBody.ts +32 -0
- package/models/UpdateUserRequest.ts +47 -0
- package/models/User.ts +55 -0
- package/models/UserIdentityRequestBody.ts +31 -0
- package/models/UserIdentityResponse.ts +31 -0
- package/models/UserSubscriptionOptions.ts +31 -0
- package/models/all.ts +21 -0
- package/package.json +2 -2
- package/types/ObjectParamAPI.ts +433 -0
- package/types/ObservableAPI.ts +372 -0
- package/types/PromiseAPI.ts +176 -0
package/DefaultApi.md
CHANGED
|
@@ -10,22 +10,36 @@ Method | HTTP request | Description
|
|
|
10
10
|
[**createNotification**](DefaultApi.md#createNotification) | **POST** /notifications | Create notification
|
|
11
11
|
[**createPlayer**](DefaultApi.md#createPlayer) | **POST** /players | Add a device
|
|
12
12
|
[**createSegments**](DefaultApi.md#createSegments) | **POST** /apps/{app_id}/segments | Create Segments
|
|
13
|
+
[**createSubscription**](DefaultApi.md#createSubscription) | **POST** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions |
|
|
14
|
+
[**createUser**](DefaultApi.md#createUser) | **POST** /apps/{app_id}/users |
|
|
15
|
+
[**deleteAlias**](DefaultApi.md#deleteAlias) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} |
|
|
13
16
|
[**deletePlayer**](DefaultApi.md#deletePlayer) | **DELETE** /players/{player_id} | Delete a user record
|
|
14
17
|
[**deleteSegments**](DefaultApi.md#deleteSegments) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segments
|
|
18
|
+
[**deleteSubscription**](DefaultApi.md#deleteSubscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} |
|
|
19
|
+
[**deleteUser**](DefaultApi.md#deleteUser) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
|
|
15
20
|
[**endLiveActivity**](DefaultApi.md#endLiveActivity) | **DELETE** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity
|
|
16
21
|
[**exportPlayers**](DefaultApi.md#exportPlayers) | **POST** /players/csv_export?app_id={app_id} | CSV export
|
|
22
|
+
[**fetchAliases**](DefaultApi.md#fetchAliases) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
|
|
23
|
+
[**fetchUser**](DefaultApi.md#fetchUser) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
|
|
24
|
+
[**fetchUserIdentity**](DefaultApi.md#fetchUserIdentity) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
|
|
17
25
|
[**getApp**](DefaultApi.md#getApp) | **GET** /apps/{app_id} | View an app
|
|
18
26
|
[**getApps**](DefaultApi.md#getApps) | **GET** /apps | View apps
|
|
27
|
+
[**getEligibleIams**](DefaultApi.md#getEligibleIams) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/iams |
|
|
19
28
|
[**getNotification**](DefaultApi.md#getNotification) | **GET** /notifications/{notification_id} | View notification
|
|
20
29
|
[**getNotificationHistory**](DefaultApi.md#getNotificationHistory) | **POST** /notifications/{notification_id}/history | Notification History
|
|
21
30
|
[**getNotifications**](DefaultApi.md#getNotifications) | **GET** /notifications | View notifications
|
|
22
31
|
[**getOutcomes**](DefaultApi.md#getOutcomes) | **GET** /apps/{app_id}/outcomes | View Outcomes
|
|
23
32
|
[**getPlayer**](DefaultApi.md#getPlayer) | **GET** /players/{player_id} | View device
|
|
24
33
|
[**getPlayers**](DefaultApi.md#getPlayers) | **GET** /players | View devices
|
|
34
|
+
[**identifyUserByAlias**](DefaultApi.md#identifyUserByAlias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
|
|
35
|
+
[**identifyUserBySubscriptionId**](DefaultApi.md#identifyUserBySubscriptionId) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
|
|
36
|
+
[**transferSubscription**](DefaultApi.md#transferSubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner |
|
|
25
37
|
[**updateApp**](DefaultApi.md#updateApp) | **PUT** /apps/{app_id} | Update an app
|
|
26
38
|
[**updateLiveActivity**](DefaultApi.md#updateLiveActivity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push
|
|
27
39
|
[**updatePlayer**](DefaultApi.md#updatePlayer) | **PUT** /players/{player_id} | Edit device
|
|
28
40
|
[**updatePlayerTags**](DefaultApi.md#updatePlayerTags) | **PUT** /apps/{app_id}/users/{external_user_id} | Edit tags with external user id
|
|
41
|
+
[**updateSubscription**](DefaultApi.md#updateSubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} |
|
|
42
|
+
[**updateUser**](DefaultApi.md#updateUser) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
|
|
29
43
|
|
|
30
44
|
|
|
31
45
|
# **beginLiveActivity**
|
|
@@ -322,7 +336,7 @@ let body:.DefaultApiCreatePlayerRequest = {
|
|
|
322
336
|
last_active: 1,
|
|
323
337
|
notification_types: 1,
|
|
324
338
|
test_type: 1,
|
|
325
|
-
|
|
339
|
+
long: 3.14,
|
|
326
340
|
lat: 3.14,
|
|
327
341
|
country: "country_example",
|
|
328
342
|
},
|
|
@@ -428,6 +442,258 @@ Name | Type | Description | Notes
|
|
|
428
442
|
|
|
429
443
|
[[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)
|
|
430
444
|
|
|
445
|
+
# **createSubscription**
|
|
446
|
+
> InlineResponse201 createSubscription(createSubscriptionRequestBody)
|
|
447
|
+
|
|
448
|
+
Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User.
|
|
449
|
+
|
|
450
|
+
### Example
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
```typescript
|
|
454
|
+
import { } from '';
|
|
455
|
+
import * as fs from 'fs';
|
|
456
|
+
|
|
457
|
+
const configuration = .createConfiguration();
|
|
458
|
+
const apiInstance = new .DefaultApi(configuration);
|
|
459
|
+
|
|
460
|
+
let body:.DefaultApiCreateSubscriptionRequest = {
|
|
461
|
+
// string
|
|
462
|
+
appId: "app_id_example",
|
|
463
|
+
// string
|
|
464
|
+
aliasLabel: "alias_label_example",
|
|
465
|
+
// string
|
|
466
|
+
aliasId: "alias_id_example",
|
|
467
|
+
// CreateSubscriptionRequestBody
|
|
468
|
+
createSubscriptionRequestBody: {
|
|
469
|
+
subscription: {
|
|
470
|
+
id: "id_example",
|
|
471
|
+
type: "iOSPush",
|
|
472
|
+
token: "token_example",
|
|
473
|
+
enabled: true,
|
|
474
|
+
notification_types: 3.14,
|
|
475
|
+
session_time: 3.14,
|
|
476
|
+
session_count: 3.14,
|
|
477
|
+
sdk: "sdk_example",
|
|
478
|
+
device_model: "device_model_example",
|
|
479
|
+
device_os: "device_os_example",
|
|
480
|
+
rooted: true,
|
|
481
|
+
test_type: 3.14,
|
|
482
|
+
app_version: "app_version_example",
|
|
483
|
+
net_type: 3.14,
|
|
484
|
+
carrier: "carrier_example",
|
|
485
|
+
web_auth: "web_auth_example",
|
|
486
|
+
web_p256: "web_p256_example",
|
|
487
|
+
},
|
|
488
|
+
retain_previous_owner: true,
|
|
489
|
+
},
|
|
490
|
+
};
|
|
491
|
+
|
|
492
|
+
apiInstance.createSubscription(body).then((data:any) => {
|
|
493
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
494
|
+
}).catch((error:any) => console.error(error));
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
### Parameters
|
|
499
|
+
|
|
500
|
+
Name | Type | Description | Notes
|
|
501
|
+
------------- | ------------- | ------------- | -------------
|
|
502
|
+
**createSubscriptionRequestBody** | **CreateSubscriptionRequestBody**| |
|
|
503
|
+
**appId** | [**string**] | | defaults to undefined
|
|
504
|
+
**aliasLabel** | [**string**] | | defaults to undefined
|
|
505
|
+
**aliasId** | [**string**] | | defaults to undefined
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
### Return type
|
|
509
|
+
|
|
510
|
+
**InlineResponse201**
|
|
511
|
+
|
|
512
|
+
### Authorization
|
|
513
|
+
|
|
514
|
+
[app_key](README.md#app_key)
|
|
515
|
+
|
|
516
|
+
### HTTP request headers
|
|
517
|
+
|
|
518
|
+
- **Content-Type**: application/json
|
|
519
|
+
- **Accept**: application/json
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
### HTTP response details
|
|
523
|
+
| Status code | Description | Response headers |
|
|
524
|
+
|-------------|-------------|------------------|
|
|
525
|
+
**201** | CREATED | - |
|
|
526
|
+
**202** | ACCEPTED | - |
|
|
527
|
+
|
|
528
|
+
[[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)
|
|
529
|
+
|
|
530
|
+
# **createUser**
|
|
531
|
+
> User createUser(user)
|
|
532
|
+
|
|
533
|
+
Creates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User.
|
|
534
|
+
|
|
535
|
+
### Example
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
```typescript
|
|
539
|
+
import { } from '';
|
|
540
|
+
import * as fs from 'fs';
|
|
541
|
+
|
|
542
|
+
const configuration = .createConfiguration();
|
|
543
|
+
const apiInstance = new .DefaultApi(configuration);
|
|
544
|
+
|
|
545
|
+
let body:.DefaultApiCreateUserRequest = {
|
|
546
|
+
// string
|
|
547
|
+
appId: "app_id_example",
|
|
548
|
+
// User
|
|
549
|
+
user: {
|
|
550
|
+
properties: {
|
|
551
|
+
tags: {},
|
|
552
|
+
language: "language_example",
|
|
553
|
+
timezone_id: "timezone_id_example",
|
|
554
|
+
lat: 3.14,
|
|
555
|
+
long: 3.14,
|
|
556
|
+
country: "country_example",
|
|
557
|
+
first_active: 3.14,
|
|
558
|
+
last_active: 3.14,
|
|
559
|
+
amount_spent: 3.14,
|
|
560
|
+
purchases: [
|
|
561
|
+
{
|
|
562
|
+
sku: "sku_example",
|
|
563
|
+
amount: "amount_example",
|
|
564
|
+
iso: "iso_example",
|
|
565
|
+
},
|
|
566
|
+
],
|
|
567
|
+
ip: "ip_example",
|
|
568
|
+
},
|
|
569
|
+
identity: {},
|
|
570
|
+
subscriptions: [
|
|
571
|
+
{
|
|
572
|
+
id: "id_example",
|
|
573
|
+
type: "iOSPush",
|
|
574
|
+
token: "token_example",
|
|
575
|
+
enabled: true,
|
|
576
|
+
notification_types: 3.14,
|
|
577
|
+
session_time: 3.14,
|
|
578
|
+
session_count: 3.14,
|
|
579
|
+
sdk: "sdk_example",
|
|
580
|
+
device_model: "device_model_example",
|
|
581
|
+
device_os: "device_os_example",
|
|
582
|
+
rooted: true,
|
|
583
|
+
test_type: 3.14,
|
|
584
|
+
app_version: "app_version_example",
|
|
585
|
+
net_type: 3.14,
|
|
586
|
+
carrier: "carrier_example",
|
|
587
|
+
web_auth: "web_auth_example",
|
|
588
|
+
web_p256: "web_p256_example",
|
|
589
|
+
},
|
|
590
|
+
],
|
|
591
|
+
subscription_options: {
|
|
592
|
+
retain_previous_owner: true,
|
|
593
|
+
},
|
|
594
|
+
},
|
|
595
|
+
};
|
|
596
|
+
|
|
597
|
+
apiInstance.createUser(body).then((data:any) => {
|
|
598
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
599
|
+
}).catch((error:any) => console.error(error));
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
### Parameters
|
|
604
|
+
|
|
605
|
+
Name | Type | Description | Notes
|
|
606
|
+
------------- | ------------- | ------------- | -------------
|
|
607
|
+
**user** | **User**| |
|
|
608
|
+
**appId** | [**string**] | | defaults to undefined
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
### Return type
|
|
612
|
+
|
|
613
|
+
**User**
|
|
614
|
+
|
|
615
|
+
### Authorization
|
|
616
|
+
|
|
617
|
+
[app_key](README.md#app_key)
|
|
618
|
+
|
|
619
|
+
### HTTP request headers
|
|
620
|
+
|
|
621
|
+
- **Content-Type**: application/json
|
|
622
|
+
- **Accept**: application/json
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
### HTTP response details
|
|
626
|
+
| Status code | Description | Response headers |
|
|
627
|
+
|-------------|-------------|------------------|
|
|
628
|
+
**201** | CREATED | - |
|
|
629
|
+
**202** | ACCEPTED | - |
|
|
630
|
+
**409** | Multiple User Identity Conflict | - |
|
|
631
|
+
|
|
632
|
+
[[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)
|
|
633
|
+
|
|
634
|
+
# **deleteAlias**
|
|
635
|
+
> InlineResponse200 deleteAlias()
|
|
636
|
+
|
|
637
|
+
Deletes an alias by alias label
|
|
638
|
+
|
|
639
|
+
### Example
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
```typescript
|
|
643
|
+
import { } from '';
|
|
644
|
+
import * as fs from 'fs';
|
|
645
|
+
|
|
646
|
+
const configuration = .createConfiguration();
|
|
647
|
+
const apiInstance = new .DefaultApi(configuration);
|
|
648
|
+
|
|
649
|
+
let body:.DefaultApiDeleteAliasRequest = {
|
|
650
|
+
// string
|
|
651
|
+
appId: "app_id_example",
|
|
652
|
+
// string
|
|
653
|
+
aliasLabel: "alias_label_example",
|
|
654
|
+
// string
|
|
655
|
+
aliasId: "alias_id_example",
|
|
656
|
+
// string
|
|
657
|
+
aliasLabelToDelete: "alias_label_to_delete_example",
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
apiInstance.deleteAlias(body).then((data:any) => {
|
|
661
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
662
|
+
}).catch((error:any) => console.error(error));
|
|
663
|
+
```
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
### Parameters
|
|
667
|
+
|
|
668
|
+
Name | Type | Description | Notes
|
|
669
|
+
------------- | ------------- | ------------- | -------------
|
|
670
|
+
**appId** | [**string**] | | defaults to undefined
|
|
671
|
+
**aliasLabel** | [**string**] | | defaults to undefined
|
|
672
|
+
**aliasId** | [**string**] | | defaults to undefined
|
|
673
|
+
**aliasLabelToDelete** | [**string**] | | defaults to undefined
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
### Return type
|
|
677
|
+
|
|
678
|
+
**InlineResponse200**
|
|
679
|
+
|
|
680
|
+
### Authorization
|
|
681
|
+
|
|
682
|
+
[app_key](README.md#app_key)
|
|
683
|
+
|
|
684
|
+
### HTTP request headers
|
|
685
|
+
|
|
686
|
+
- **Content-Type**: Not defined
|
|
687
|
+
- **Accept**: application/json
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
### HTTP response details
|
|
691
|
+
| Status code | Description | Response headers |
|
|
692
|
+
|-------------|-------------|------------------|
|
|
693
|
+
**200** | OK | - |
|
|
694
|
+
|
|
695
|
+
[[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)
|
|
696
|
+
|
|
431
697
|
# **deletePlayer**
|
|
432
698
|
> DeletePlayerSuccessResponse deletePlayer()
|
|
433
699
|
|
|
@@ -546,10 +812,10 @@ Name | Type | Description | Notes
|
|
|
546
812
|
|
|
547
813
|
[[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)
|
|
548
814
|
|
|
549
|
-
# **
|
|
550
|
-
> void
|
|
815
|
+
# **deleteSubscription**
|
|
816
|
+
> void deleteSubscription()
|
|
551
817
|
|
|
552
|
-
|
|
818
|
+
Deletes the Subscription.
|
|
553
819
|
|
|
554
820
|
### Example
|
|
555
821
|
|
|
@@ -561,16 +827,14 @@ import * as fs from 'fs';
|
|
|
561
827
|
const configuration = .createConfiguration();
|
|
562
828
|
const apiInstance = new .DefaultApi(configuration);
|
|
563
829
|
|
|
564
|
-
let body:.
|
|
565
|
-
// string
|
|
830
|
+
let body:.DefaultApiDeleteSubscriptionRequest = {
|
|
831
|
+
// string
|
|
566
832
|
appId: "app_id_example",
|
|
567
|
-
// string
|
|
568
|
-
activityId: "activity_id_example",
|
|
569
|
-
// string | Subscription ID
|
|
833
|
+
// string
|
|
570
834
|
subscriptionId: "subscription_id_example",
|
|
571
835
|
};
|
|
572
836
|
|
|
573
|
-
apiInstance.
|
|
837
|
+
apiInstance.deleteSubscription(body).then((data:any) => {
|
|
574
838
|
console.log('API called successfully. Returned data: ' + data);
|
|
575
839
|
}).catch((error:any) => console.error(error));
|
|
576
840
|
```
|
|
@@ -580,9 +844,8 @@ apiInstance.endLiveActivity(body).then((data:any) => {
|
|
|
580
844
|
|
|
581
845
|
Name | Type | Description | Notes
|
|
582
846
|
------------- | ------------- | ------------- | -------------
|
|
583
|
-
**appId** | [**string**] |
|
|
584
|
-
**
|
|
585
|
-
**subscriptionId** | [**string**] | Subscription ID | defaults to undefined
|
|
847
|
+
**appId** | [**string**] | | defaults to undefined
|
|
848
|
+
**subscriptionId** | [**string**] | | defaults to undefined
|
|
586
849
|
|
|
587
850
|
|
|
588
851
|
### Return type
|
|
@@ -596,21 +859,20 @@ Name | Type | Description | Notes
|
|
|
596
859
|
### HTTP request headers
|
|
597
860
|
|
|
598
861
|
- **Content-Type**: Not defined
|
|
599
|
-
- **Accept**:
|
|
862
|
+
- **Accept**: Not defined
|
|
600
863
|
|
|
601
864
|
|
|
602
865
|
### HTTP response details
|
|
603
866
|
| Status code | Description | Response headers |
|
|
604
867
|
|-------------|-------------|------------------|
|
|
605
|
-
**
|
|
606
|
-
**400** | Bad Request | - |
|
|
868
|
+
**202** | ACCEPTED | - |
|
|
607
869
|
|
|
608
870
|
[[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)
|
|
609
871
|
|
|
610
|
-
# **
|
|
611
|
-
>
|
|
872
|
+
# **deleteUser**
|
|
873
|
+
> void deleteUser()
|
|
612
874
|
|
|
613
|
-
|
|
875
|
+
Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases
|
|
614
876
|
|
|
615
877
|
### Example
|
|
616
878
|
|
|
@@ -622,20 +884,16 @@ import * as fs from 'fs';
|
|
|
622
884
|
const configuration = .createConfiguration();
|
|
623
885
|
const apiInstance = new .DefaultApi(configuration);
|
|
624
886
|
|
|
625
|
-
let body:.
|
|
626
|
-
// string
|
|
887
|
+
let body:.DefaultApiDeleteUserRequest = {
|
|
888
|
+
// string
|
|
627
889
|
appId: "app_id_example",
|
|
628
|
-
//
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
],
|
|
633
|
-
last_active_since: "last_active_since_example",
|
|
634
|
-
segment_name: "segment_name_example",
|
|
635
|
-
},
|
|
890
|
+
// string
|
|
891
|
+
aliasLabel: "alias_label_example",
|
|
892
|
+
// string
|
|
893
|
+
aliasId: "alias_id_example",
|
|
636
894
|
};
|
|
637
895
|
|
|
638
|
-
apiInstance.
|
|
896
|
+
apiInstance.deleteUser(body).then((data:any) => {
|
|
639
897
|
console.log('API called successfully. Returned data: ' + data);
|
|
640
898
|
}).catch((error:any) => console.error(error));
|
|
641
899
|
```
|
|
@@ -645,36 +903,36 @@ apiInstance.exportPlayers(body).then((data:any) => {
|
|
|
645
903
|
|
|
646
904
|
Name | Type | Description | Notes
|
|
647
905
|
------------- | ------------- | ------------- | -------------
|
|
648
|
-
**
|
|
649
|
-
**
|
|
906
|
+
**appId** | [**string**] | | defaults to undefined
|
|
907
|
+
**aliasLabel** | [**string**] | | defaults to undefined
|
|
908
|
+
**aliasId** | [**string**] | | defaults to undefined
|
|
650
909
|
|
|
651
910
|
|
|
652
911
|
### Return type
|
|
653
912
|
|
|
654
|
-
**
|
|
913
|
+
**void**
|
|
655
914
|
|
|
656
915
|
### Authorization
|
|
657
916
|
|
|
658
|
-
|
|
917
|
+
No authorization required
|
|
659
918
|
|
|
660
919
|
### HTTP request headers
|
|
661
920
|
|
|
662
|
-
- **Content-Type**:
|
|
663
|
-
- **Accept**:
|
|
921
|
+
- **Content-Type**: Not defined
|
|
922
|
+
- **Accept**: Not defined
|
|
664
923
|
|
|
665
924
|
|
|
666
925
|
### HTTP response details
|
|
667
926
|
| Status code | Description | Response headers |
|
|
668
927
|
|-------------|-------------|------------------|
|
|
669
928
|
**200** | OK | - |
|
|
670
|
-
**400** | Bad Request | - |
|
|
671
929
|
|
|
672
930
|
[[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)
|
|
673
931
|
|
|
674
|
-
# **
|
|
675
|
-
>
|
|
932
|
+
# **endLiveActivity**
|
|
933
|
+
> void endLiveActivity()
|
|
676
934
|
|
|
677
|
-
|
|
935
|
+
Stops a Live Activity
|
|
678
936
|
|
|
679
937
|
### Example
|
|
680
938
|
|
|
@@ -686,12 +944,16 @@ import * as fs from 'fs';
|
|
|
686
944
|
const configuration = .createConfiguration();
|
|
687
945
|
const apiInstance = new .DefaultApi(configuration);
|
|
688
946
|
|
|
689
|
-
let body:.
|
|
690
|
-
// string |
|
|
947
|
+
let body:.DefaultApiEndLiveActivityRequest = {
|
|
948
|
+
// string | The OneSignal App ID for your app. Available in Keys & IDs.
|
|
691
949
|
appId: "app_id_example",
|
|
950
|
+
// string | Live Activity record ID
|
|
951
|
+
activityId: "activity_id_example",
|
|
952
|
+
// string | Subscription ID
|
|
953
|
+
subscriptionId: "subscription_id_example",
|
|
692
954
|
};
|
|
693
955
|
|
|
694
|
-
apiInstance.
|
|
956
|
+
apiInstance.endLiveActivity(body).then((data:any) => {
|
|
695
957
|
console.log('API called successfully. Returned data: ' + data);
|
|
696
958
|
}).catch((error:any) => console.error(error));
|
|
697
959
|
```
|
|
@@ -701,16 +963,18 @@ apiInstance.getApp(body).then((data:any) => {
|
|
|
701
963
|
|
|
702
964
|
Name | Type | Description | Notes
|
|
703
965
|
------------- | ------------- | ------------- | -------------
|
|
704
|
-
**appId** | [**string**] |
|
|
966
|
+
**appId** | [**string**] | The OneSignal App ID for your app. Available in Keys & IDs. | defaults to undefined
|
|
967
|
+
**activityId** | [**string**] | Live Activity record ID | defaults to undefined
|
|
968
|
+
**subscriptionId** | [**string**] | Subscription ID | defaults to undefined
|
|
705
969
|
|
|
706
970
|
|
|
707
971
|
### Return type
|
|
708
972
|
|
|
709
|
-
**
|
|
973
|
+
**void**
|
|
710
974
|
|
|
711
975
|
### Authorization
|
|
712
976
|
|
|
713
|
-
[
|
|
977
|
+
[app_key](README.md#app_key)
|
|
714
978
|
|
|
715
979
|
### HTTP request headers
|
|
716
980
|
|
|
@@ -721,15 +985,15 @@ Name | Type | Description | Notes
|
|
|
721
985
|
### HTTP response details
|
|
722
986
|
| Status code | Description | Response headers |
|
|
723
987
|
|-------------|-------------|------------------|
|
|
724
|
-
**
|
|
988
|
+
**204** | OK | - |
|
|
725
989
|
**400** | Bad Request | - |
|
|
726
990
|
|
|
727
991
|
[[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)
|
|
728
992
|
|
|
729
|
-
# **
|
|
730
|
-
>
|
|
993
|
+
# **exportPlayers**
|
|
994
|
+
> ExportPlayersSuccessResponse exportPlayers()
|
|
731
995
|
|
|
732
|
-
|
|
996
|
+
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. |
|
|
733
997
|
|
|
734
998
|
### Example
|
|
735
999
|
|
|
@@ -741,29 +1005,44 @@ import * as fs from 'fs';
|
|
|
741
1005
|
const configuration = .createConfiguration();
|
|
742
1006
|
const apiInstance = new .DefaultApi(configuration);
|
|
743
1007
|
|
|
744
|
-
let body
|
|
1008
|
+
let body:.DefaultApiExportPlayersRequest = {
|
|
1009
|
+
// string | The app ID that you want to export devices from
|
|
1010
|
+
appId: "app_id_example",
|
|
1011
|
+
// ExportPlayersRequestBody (optional)
|
|
1012
|
+
exportPlayersRequestBody: {
|
|
1013
|
+
extra_fields: [
|
|
1014
|
+
"extra_fields_example",
|
|
1015
|
+
],
|
|
1016
|
+
last_active_since: "last_active_since_example",
|
|
1017
|
+
segment_name: "segment_name_example",
|
|
1018
|
+
},
|
|
1019
|
+
};
|
|
745
1020
|
|
|
746
|
-
apiInstance.
|
|
1021
|
+
apiInstance.exportPlayers(body).then((data:any) => {
|
|
747
1022
|
console.log('API called successfully. Returned data: ' + data);
|
|
748
1023
|
}).catch((error:any) => console.error(error));
|
|
749
1024
|
```
|
|
750
1025
|
|
|
751
1026
|
|
|
752
1027
|
### Parameters
|
|
753
|
-
|
|
1028
|
+
|
|
1029
|
+
Name | Type | Description | Notes
|
|
1030
|
+
------------- | ------------- | ------------- | -------------
|
|
1031
|
+
**exportPlayersRequestBody** | **ExportPlayersRequestBody**| |
|
|
1032
|
+
**appId** | [**string**] | The app ID that you want to export devices from | defaults to undefined
|
|
754
1033
|
|
|
755
1034
|
|
|
756
1035
|
### Return type
|
|
757
1036
|
|
|
758
|
-
**
|
|
1037
|
+
**ExportPlayersSuccessResponse**
|
|
759
1038
|
|
|
760
1039
|
### Authorization
|
|
761
1040
|
|
|
762
|
-
[
|
|
1041
|
+
[app_key](README.md#app_key)
|
|
763
1042
|
|
|
764
1043
|
### HTTP request headers
|
|
765
1044
|
|
|
766
|
-
- **Content-Type**:
|
|
1045
|
+
- **Content-Type**: application/json
|
|
767
1046
|
- **Accept**: application/json
|
|
768
1047
|
|
|
769
1048
|
|
|
@@ -775,8 +1054,346 @@ This endpoint does not need any parameter.
|
|
|
775
1054
|
|
|
776
1055
|
[[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)
|
|
777
1056
|
|
|
778
|
-
# **
|
|
779
|
-
>
|
|
1057
|
+
# **fetchAliases**
|
|
1058
|
+
> UserIdentityResponse fetchAliases()
|
|
1059
|
+
|
|
1060
|
+
Lists all Aliases for the User identified by :subscription_id.
|
|
1061
|
+
|
|
1062
|
+
### Example
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
```typescript
|
|
1066
|
+
import { } from '';
|
|
1067
|
+
import * as fs from 'fs';
|
|
1068
|
+
|
|
1069
|
+
const configuration = .createConfiguration();
|
|
1070
|
+
const apiInstance = new .DefaultApi(configuration);
|
|
1071
|
+
|
|
1072
|
+
let body:.DefaultApiFetchAliasesRequest = {
|
|
1073
|
+
// string
|
|
1074
|
+
appId: "app_id_example",
|
|
1075
|
+
// string
|
|
1076
|
+
subscriptionId: "subscription_id_example",
|
|
1077
|
+
};
|
|
1078
|
+
|
|
1079
|
+
apiInstance.fetchAliases(body).then((data:any) => {
|
|
1080
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1081
|
+
}).catch((error:any) => console.error(error));
|
|
1082
|
+
```
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
### Parameters
|
|
1086
|
+
|
|
1087
|
+
Name | Type | Description | Notes
|
|
1088
|
+
------------- | ------------- | ------------- | -------------
|
|
1089
|
+
**appId** | [**string**] | | defaults to undefined
|
|
1090
|
+
**subscriptionId** | [**string**] | | defaults to undefined
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
### Return type
|
|
1094
|
+
|
|
1095
|
+
**UserIdentityResponse**
|
|
1096
|
+
|
|
1097
|
+
### Authorization
|
|
1098
|
+
|
|
1099
|
+
[app_key](README.md#app_key)
|
|
1100
|
+
|
|
1101
|
+
### HTTP request headers
|
|
1102
|
+
|
|
1103
|
+
- **Content-Type**: Not defined
|
|
1104
|
+
- **Accept**: application/json
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
### HTTP response details
|
|
1108
|
+
| Status code | Description | Response headers |
|
|
1109
|
+
|-------------|-------------|------------------|
|
|
1110
|
+
**200** | OK | - |
|
|
1111
|
+
|
|
1112
|
+
[[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)
|
|
1113
|
+
|
|
1114
|
+
# **fetchUser**
|
|
1115
|
+
> User fetchUser()
|
|
1116
|
+
|
|
1117
|
+
Returns the User’s properties, Aliases, and Subscriptions.
|
|
1118
|
+
|
|
1119
|
+
### Example
|
|
1120
|
+
|
|
1121
|
+
|
|
1122
|
+
```typescript
|
|
1123
|
+
import { } from '';
|
|
1124
|
+
import * as fs from 'fs';
|
|
1125
|
+
|
|
1126
|
+
const configuration = .createConfiguration();
|
|
1127
|
+
const apiInstance = new .DefaultApi(configuration);
|
|
1128
|
+
|
|
1129
|
+
let body:.DefaultApiFetchUserRequest = {
|
|
1130
|
+
// string
|
|
1131
|
+
appId: "app_id_example",
|
|
1132
|
+
// string
|
|
1133
|
+
aliasLabel: "alias_label_example",
|
|
1134
|
+
// string
|
|
1135
|
+
aliasId: "alias_id_example",
|
|
1136
|
+
};
|
|
1137
|
+
|
|
1138
|
+
apiInstance.fetchUser(body).then((data:any) => {
|
|
1139
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1140
|
+
}).catch((error:any) => console.error(error));
|
|
1141
|
+
```
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
### Parameters
|
|
1145
|
+
|
|
1146
|
+
Name | Type | Description | Notes
|
|
1147
|
+
------------- | ------------- | ------------- | -------------
|
|
1148
|
+
**appId** | [**string**] | | defaults to undefined
|
|
1149
|
+
**aliasLabel** | [**string**] | | defaults to undefined
|
|
1150
|
+
**aliasId** | [**string**] | | defaults to undefined
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
### Return type
|
|
1154
|
+
|
|
1155
|
+
**User**
|
|
1156
|
+
|
|
1157
|
+
### Authorization
|
|
1158
|
+
|
|
1159
|
+
[app_key](README.md#app_key)
|
|
1160
|
+
|
|
1161
|
+
### HTTP request headers
|
|
1162
|
+
|
|
1163
|
+
- **Content-Type**: Not defined
|
|
1164
|
+
- **Accept**: application/json
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
### HTTP response details
|
|
1168
|
+
| Status code | Description | Response headers |
|
|
1169
|
+
|-------------|-------------|------------------|
|
|
1170
|
+
**200** | OK | - |
|
|
1171
|
+
|
|
1172
|
+
[[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)
|
|
1173
|
+
|
|
1174
|
+
# **fetchUserIdentity**
|
|
1175
|
+
> InlineResponse200 fetchUserIdentity()
|
|
1176
|
+
|
|
1177
|
+
Lists all Aliases for the User identified by (:alias_label, :alias_id).
|
|
1178
|
+
|
|
1179
|
+
### Example
|
|
1180
|
+
|
|
1181
|
+
|
|
1182
|
+
```typescript
|
|
1183
|
+
import { } from '';
|
|
1184
|
+
import * as fs from 'fs';
|
|
1185
|
+
|
|
1186
|
+
const configuration = .createConfiguration();
|
|
1187
|
+
const apiInstance = new .DefaultApi(configuration);
|
|
1188
|
+
|
|
1189
|
+
let body:.DefaultApiFetchUserIdentityRequest = {
|
|
1190
|
+
// string
|
|
1191
|
+
appId: "app_id_example",
|
|
1192
|
+
// string
|
|
1193
|
+
aliasLabel: "alias_label_example",
|
|
1194
|
+
// string
|
|
1195
|
+
aliasId: "alias_id_example",
|
|
1196
|
+
};
|
|
1197
|
+
|
|
1198
|
+
apiInstance.fetchUserIdentity(body).then((data:any) => {
|
|
1199
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1200
|
+
}).catch((error:any) => console.error(error));
|
|
1201
|
+
```
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
### Parameters
|
|
1205
|
+
|
|
1206
|
+
Name | Type | Description | Notes
|
|
1207
|
+
------------- | ------------- | ------------- | -------------
|
|
1208
|
+
**appId** | [**string**] | | defaults to undefined
|
|
1209
|
+
**aliasLabel** | [**string**] | | defaults to undefined
|
|
1210
|
+
**aliasId** | [**string**] | | defaults to undefined
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
### Return type
|
|
1214
|
+
|
|
1215
|
+
**InlineResponse200**
|
|
1216
|
+
|
|
1217
|
+
### Authorization
|
|
1218
|
+
|
|
1219
|
+
[app_key](README.md#app_key)
|
|
1220
|
+
|
|
1221
|
+
### HTTP request headers
|
|
1222
|
+
|
|
1223
|
+
- **Content-Type**: Not defined
|
|
1224
|
+
- **Accept**: application/json
|
|
1225
|
+
|
|
1226
|
+
|
|
1227
|
+
### HTTP response details
|
|
1228
|
+
| Status code | Description | Response headers |
|
|
1229
|
+
|-------------|-------------|------------------|
|
|
1230
|
+
**200** | OK | - |
|
|
1231
|
+
|
|
1232
|
+
[[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)
|
|
1233
|
+
|
|
1234
|
+
# **getApp**
|
|
1235
|
+
> App getApp()
|
|
1236
|
+
|
|
1237
|
+
View the details of a single OneSignal app
|
|
1238
|
+
|
|
1239
|
+
### Example
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
```typescript
|
|
1243
|
+
import { } from '';
|
|
1244
|
+
import * as fs from 'fs';
|
|
1245
|
+
|
|
1246
|
+
const configuration = .createConfiguration();
|
|
1247
|
+
const apiInstance = new .DefaultApi(configuration);
|
|
1248
|
+
|
|
1249
|
+
let body:.DefaultApiGetAppRequest = {
|
|
1250
|
+
// string | An app id
|
|
1251
|
+
appId: "app_id_example",
|
|
1252
|
+
};
|
|
1253
|
+
|
|
1254
|
+
apiInstance.getApp(body).then((data:any) => {
|
|
1255
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1256
|
+
}).catch((error:any) => console.error(error));
|
|
1257
|
+
```
|
|
1258
|
+
|
|
1259
|
+
|
|
1260
|
+
### Parameters
|
|
1261
|
+
|
|
1262
|
+
Name | Type | Description | Notes
|
|
1263
|
+
------------- | ------------- | ------------- | -------------
|
|
1264
|
+
**appId** | [**string**] | An app id | defaults to undefined
|
|
1265
|
+
|
|
1266
|
+
|
|
1267
|
+
### Return type
|
|
1268
|
+
|
|
1269
|
+
**App**
|
|
1270
|
+
|
|
1271
|
+
### Authorization
|
|
1272
|
+
|
|
1273
|
+
[user_key](README.md#user_key)
|
|
1274
|
+
|
|
1275
|
+
### HTTP request headers
|
|
1276
|
+
|
|
1277
|
+
- **Content-Type**: Not defined
|
|
1278
|
+
- **Accept**: application/json
|
|
1279
|
+
|
|
1280
|
+
|
|
1281
|
+
### HTTP response details
|
|
1282
|
+
| Status code | Description | Response headers |
|
|
1283
|
+
|-------------|-------------|------------------|
|
|
1284
|
+
**200** | OK | - |
|
|
1285
|
+
**400** | Bad Request | - |
|
|
1286
|
+
|
|
1287
|
+
[[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)
|
|
1288
|
+
|
|
1289
|
+
# **getApps**
|
|
1290
|
+
> Array<App> getApps()
|
|
1291
|
+
|
|
1292
|
+
View the details of all of your current OneSignal apps
|
|
1293
|
+
|
|
1294
|
+
### Example
|
|
1295
|
+
|
|
1296
|
+
|
|
1297
|
+
```typescript
|
|
1298
|
+
import { } from '';
|
|
1299
|
+
import * as fs from 'fs';
|
|
1300
|
+
|
|
1301
|
+
const configuration = .createConfiguration();
|
|
1302
|
+
const apiInstance = new .DefaultApi(configuration);
|
|
1303
|
+
|
|
1304
|
+
let body:any = {};
|
|
1305
|
+
|
|
1306
|
+
apiInstance.getApps(body).then((data:any) => {
|
|
1307
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1308
|
+
}).catch((error:any) => console.error(error));
|
|
1309
|
+
```
|
|
1310
|
+
|
|
1311
|
+
|
|
1312
|
+
### Parameters
|
|
1313
|
+
This endpoint does not need any parameter.
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
### Return type
|
|
1317
|
+
|
|
1318
|
+
**Array<App>**
|
|
1319
|
+
|
|
1320
|
+
### Authorization
|
|
1321
|
+
|
|
1322
|
+
[user_key](README.md#user_key)
|
|
1323
|
+
|
|
1324
|
+
### HTTP request headers
|
|
1325
|
+
|
|
1326
|
+
- **Content-Type**: Not defined
|
|
1327
|
+
- **Accept**: application/json
|
|
1328
|
+
|
|
1329
|
+
|
|
1330
|
+
### HTTP response details
|
|
1331
|
+
| Status code | Description | Response headers |
|
|
1332
|
+
|-------------|-------------|------------------|
|
|
1333
|
+
**200** | OK | - |
|
|
1334
|
+
**400** | Bad Request | - |
|
|
1335
|
+
|
|
1336
|
+
[[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)
|
|
1337
|
+
|
|
1338
|
+
# **getEligibleIams**
|
|
1339
|
+
> InlineResponse2003 getEligibleIams()
|
|
1340
|
+
|
|
1341
|
+
Manifest of In-App Messages the Subscription is eligible to display by the SDK.
|
|
1342
|
+
|
|
1343
|
+
### Example
|
|
1344
|
+
|
|
1345
|
+
|
|
1346
|
+
```typescript
|
|
1347
|
+
import { } from '';
|
|
1348
|
+
import * as fs from 'fs';
|
|
1349
|
+
|
|
1350
|
+
const configuration = .createConfiguration();
|
|
1351
|
+
const apiInstance = new .DefaultApi(configuration);
|
|
1352
|
+
|
|
1353
|
+
let body:.DefaultApiGetEligibleIamsRequest = {
|
|
1354
|
+
// string
|
|
1355
|
+
appId: "app_id_example",
|
|
1356
|
+
// string
|
|
1357
|
+
subscriptionId: "subscription_id_example",
|
|
1358
|
+
};
|
|
1359
|
+
|
|
1360
|
+
apiInstance.getEligibleIams(body).then((data:any) => {
|
|
1361
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1362
|
+
}).catch((error:any) => console.error(error));
|
|
1363
|
+
```
|
|
1364
|
+
|
|
1365
|
+
|
|
1366
|
+
### Parameters
|
|
1367
|
+
|
|
1368
|
+
Name | Type | Description | Notes
|
|
1369
|
+
------------- | ------------- | ------------- | -------------
|
|
1370
|
+
**appId** | [**string**] | | defaults to undefined
|
|
1371
|
+
**subscriptionId** | [**string**] | | defaults to undefined
|
|
1372
|
+
|
|
1373
|
+
|
|
1374
|
+
### Return type
|
|
1375
|
+
|
|
1376
|
+
**InlineResponse2003**
|
|
1377
|
+
|
|
1378
|
+
### Authorization
|
|
1379
|
+
|
|
1380
|
+
[app_key](README.md#app_key)
|
|
1381
|
+
|
|
1382
|
+
### HTTP request headers
|
|
1383
|
+
|
|
1384
|
+
- **Content-Type**: Not defined
|
|
1385
|
+
- **Accept**: application/json
|
|
1386
|
+
|
|
1387
|
+
|
|
1388
|
+
### HTTP response details
|
|
1389
|
+
| Status code | Description | Response headers |
|
|
1390
|
+
|-------------|-------------|------------------|
|
|
1391
|
+
**200** | OK | - |
|
|
1392
|
+
|
|
1393
|
+
[[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)
|
|
1394
|
+
|
|
1395
|
+
# **getNotification**
|
|
1396
|
+
> NotificationWithMeta getNotification()
|
|
780
1397
|
|
|
781
1398
|
View the details of a single notification and outcomes associated with it
|
|
782
1399
|
|
|
@@ -797,7 +1414,199 @@ let body:.DefaultApiGetNotificationRequest = {
|
|
|
797
1414
|
notificationId: "notification_id_example",
|
|
798
1415
|
};
|
|
799
1416
|
|
|
800
|
-
apiInstance.getNotification(body).then((data:any) => {
|
|
1417
|
+
apiInstance.getNotification(body).then((data:any) => {
|
|
1418
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1419
|
+
}).catch((error:any) => console.error(error));
|
|
1420
|
+
```
|
|
1421
|
+
|
|
1422
|
+
|
|
1423
|
+
### Parameters
|
|
1424
|
+
|
|
1425
|
+
Name | Type | Description | Notes
|
|
1426
|
+
------------- | ------------- | ------------- | -------------
|
|
1427
|
+
**appId** | [**string**] | | defaults to undefined
|
|
1428
|
+
**notificationId** | [**string**] | | defaults to undefined
|
|
1429
|
+
|
|
1430
|
+
|
|
1431
|
+
### Return type
|
|
1432
|
+
|
|
1433
|
+
**NotificationWithMeta**
|
|
1434
|
+
|
|
1435
|
+
### Authorization
|
|
1436
|
+
|
|
1437
|
+
[app_key](README.md#app_key)
|
|
1438
|
+
|
|
1439
|
+
### HTTP request headers
|
|
1440
|
+
|
|
1441
|
+
- **Content-Type**: Not defined
|
|
1442
|
+
- **Accept**: application/json
|
|
1443
|
+
|
|
1444
|
+
|
|
1445
|
+
### HTTP response details
|
|
1446
|
+
| Status code | Description | Response headers |
|
|
1447
|
+
|-------------|-------------|------------------|
|
|
1448
|
+
**200** | OK | - |
|
|
1449
|
+
**400** | Bad Request | - |
|
|
1450
|
+
|
|
1451
|
+
[[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)
|
|
1452
|
+
|
|
1453
|
+
# **getNotificationHistory**
|
|
1454
|
+
> NotificationHistorySuccessResponse getNotificationHistory(getNotificationRequestBody)
|
|
1455
|
+
|
|
1456
|
+
-> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. 🚧 Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App\'s REST API Key, available in Keys & IDs.
|
|
1457
|
+
|
|
1458
|
+
### Example
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
```typescript
|
|
1462
|
+
import { } from '';
|
|
1463
|
+
import * as fs from 'fs';
|
|
1464
|
+
|
|
1465
|
+
const configuration = .createConfiguration();
|
|
1466
|
+
const apiInstance = new .DefaultApi(configuration);
|
|
1467
|
+
|
|
1468
|
+
let body:.DefaultApiGetNotificationHistoryRequest = {
|
|
1469
|
+
// string | The \"id\" of the message found in the Notification object
|
|
1470
|
+
notificationId: "notification_id_example",
|
|
1471
|
+
// GetNotificationRequestBody
|
|
1472
|
+
getNotificationRequestBody: {
|
|
1473
|
+
events: "sent",
|
|
1474
|
+
email: "email_example",
|
|
1475
|
+
app_id: "app_id_example",
|
|
1476
|
+
},
|
|
1477
|
+
};
|
|
1478
|
+
|
|
1479
|
+
apiInstance.getNotificationHistory(body).then((data:any) => {
|
|
1480
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1481
|
+
}).catch((error:any) => console.error(error));
|
|
1482
|
+
```
|
|
1483
|
+
|
|
1484
|
+
|
|
1485
|
+
### Parameters
|
|
1486
|
+
|
|
1487
|
+
Name | Type | Description | Notes
|
|
1488
|
+
------------- | ------------- | ------------- | -------------
|
|
1489
|
+
**getNotificationRequestBody** | **GetNotificationRequestBody**| |
|
|
1490
|
+
**notificationId** | [**string**] | The \"id\" of the message found in the Notification object | defaults to undefined
|
|
1491
|
+
|
|
1492
|
+
|
|
1493
|
+
### Return type
|
|
1494
|
+
|
|
1495
|
+
**NotificationHistorySuccessResponse**
|
|
1496
|
+
|
|
1497
|
+
### Authorization
|
|
1498
|
+
|
|
1499
|
+
[app_key](README.md#app_key)
|
|
1500
|
+
|
|
1501
|
+
### HTTP request headers
|
|
1502
|
+
|
|
1503
|
+
- **Content-Type**: application/json
|
|
1504
|
+
- **Accept**: application/json
|
|
1505
|
+
|
|
1506
|
+
|
|
1507
|
+
### HTTP response details
|
|
1508
|
+
| Status code | Description | Response headers |
|
|
1509
|
+
|-------------|-------------|------------------|
|
|
1510
|
+
**200** | OK | - |
|
|
1511
|
+
**400** | Bad Request | - |
|
|
1512
|
+
|
|
1513
|
+
[[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)
|
|
1514
|
+
|
|
1515
|
+
# **getNotifications**
|
|
1516
|
+
> NotificationSlice getNotifications()
|
|
1517
|
+
|
|
1518
|
+
View the details of multiple notifications
|
|
1519
|
+
|
|
1520
|
+
### Example
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
```typescript
|
|
1524
|
+
import { } from '';
|
|
1525
|
+
import * as fs from 'fs';
|
|
1526
|
+
|
|
1527
|
+
const configuration = .createConfiguration();
|
|
1528
|
+
const apiInstance = new .DefaultApi(configuration);
|
|
1529
|
+
|
|
1530
|
+
let body:.DefaultApiGetNotificationsRequest = {
|
|
1531
|
+
// string | The app ID that you want to view notifications from
|
|
1532
|
+
appId: "app_id_example",
|
|
1533
|
+
// number | How many notifications to return. Max is 50. Default is 50. (optional)
|
|
1534
|
+
limit: 1,
|
|
1535
|
+
// number | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. (optional)
|
|
1536
|
+
offset: 1,
|
|
1537
|
+
// 0 | 1 | 3 | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional)
|
|
1538
|
+
kind: 0,
|
|
1539
|
+
};
|
|
1540
|
+
|
|
1541
|
+
apiInstance.getNotifications(body).then((data:any) => {
|
|
1542
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1543
|
+
}).catch((error:any) => console.error(error));
|
|
1544
|
+
```
|
|
1545
|
+
|
|
1546
|
+
|
|
1547
|
+
### Parameters
|
|
1548
|
+
|
|
1549
|
+
Name | Type | Description | Notes
|
|
1550
|
+
------------- | ------------- | ------------- | -------------
|
|
1551
|
+
**appId** | [**string**] | The app ID that you want to view notifications from | defaults to undefined
|
|
1552
|
+
**limit** | [**number**] | How many notifications to return. Max is 50. Default is 50. | (optional) defaults to undefined
|
|
1553
|
+
**offset** | [**number**] | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. | (optional) defaults to undefined
|
|
1554
|
+
**kind** | [**0 | 1 | 3**]**Array<0 | 1 | 3>** | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only | (optional) defaults to undefined
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
### Return type
|
|
1558
|
+
|
|
1559
|
+
**NotificationSlice**
|
|
1560
|
+
|
|
1561
|
+
### Authorization
|
|
1562
|
+
|
|
1563
|
+
[app_key](README.md#app_key)
|
|
1564
|
+
|
|
1565
|
+
### HTTP request headers
|
|
1566
|
+
|
|
1567
|
+
- **Content-Type**: Not defined
|
|
1568
|
+
- **Accept**: application/json
|
|
1569
|
+
|
|
1570
|
+
|
|
1571
|
+
### HTTP response details
|
|
1572
|
+
| Status code | Description | Response headers |
|
|
1573
|
+
|-------------|-------------|------------------|
|
|
1574
|
+
**200** | OK | - |
|
|
1575
|
+
**400** | Bad Request | - |
|
|
1576
|
+
|
|
1577
|
+
[[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)
|
|
1578
|
+
|
|
1579
|
+
# **getOutcomes**
|
|
1580
|
+
> OutcomesData getOutcomes()
|
|
1581
|
+
|
|
1582
|
+
View the details of all the outcomes associated with your app 🚧 Requires Authentication Key Requires your OneSignal App\'s REST API Key, available in Keys & IDs. 🚧 Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it.
|
|
1583
|
+
|
|
1584
|
+
### Example
|
|
1585
|
+
|
|
1586
|
+
|
|
1587
|
+
```typescript
|
|
1588
|
+
import { } from '';
|
|
1589
|
+
import * as fs from 'fs';
|
|
1590
|
+
|
|
1591
|
+
const configuration = .createConfiguration();
|
|
1592
|
+
const apiInstance = new .DefaultApi(configuration);
|
|
1593
|
+
|
|
1594
|
+
let body:.DefaultApiGetOutcomesRequest = {
|
|
1595
|
+
// string | The OneSignal App ID for your app. Available in Keys & IDs.
|
|
1596
|
+
appId: "app_id_example",
|
|
1597
|
+
// string | Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum
|
|
1598
|
+
outcomeNames: "outcome_names_example",
|
|
1599
|
+
// string | Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional)
|
|
1600
|
+
outcomeNames2: "outcome_names[]_example",
|
|
1601
|
+
// string | Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional)
|
|
1602
|
+
outcomeTimeRange: "outcome_time_range_example",
|
|
1603
|
+
// string | Optional Platform id. Refer device\'s platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional)
|
|
1604
|
+
outcomePlatforms: "outcome_platforms_example",
|
|
1605
|
+
// string | Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional)
|
|
1606
|
+
outcomeAttribution: "outcome_attribution_example",
|
|
1607
|
+
};
|
|
1608
|
+
|
|
1609
|
+
apiInstance.getOutcomes(body).then((data:any) => {
|
|
801
1610
|
console.log('API called successfully. Returned data: ' + data);
|
|
802
1611
|
}).catch((error:any) => console.error(error));
|
|
803
1612
|
```
|
|
@@ -807,13 +1616,17 @@ apiInstance.getNotification(body).then((data:any) => {
|
|
|
807
1616
|
|
|
808
1617
|
Name | Type | Description | Notes
|
|
809
1618
|
------------- | ------------- | ------------- | -------------
|
|
810
|
-
**appId** | [**string**] | | defaults to undefined
|
|
811
|
-
**
|
|
1619
|
+
**appId** | [**string**] | The OneSignal App ID for your app. Available in Keys & IDs. | defaults to undefined
|
|
1620
|
+
**outcomeNames** | [**string**] | Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum | defaults to undefined
|
|
1621
|
+
**outcomeNames2** | [**string**] | Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. | (optional) defaults to undefined
|
|
1622
|
+
**outcomeTimeRange** | [**string**] | Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. | (optional) defaults to undefined
|
|
1623
|
+
**outcomePlatforms** | [**string**] | Optional Platform id. Refer device\'s platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. | (optional) defaults to undefined
|
|
1624
|
+
**outcomeAttribution** | [**string**] | Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. | (optional) defaults to undefined
|
|
812
1625
|
|
|
813
1626
|
|
|
814
1627
|
### Return type
|
|
815
1628
|
|
|
816
|
-
**
|
|
1629
|
+
**OutcomesData**
|
|
817
1630
|
|
|
818
1631
|
### Authorization
|
|
819
1632
|
|
|
@@ -833,10 +1646,10 @@ Name | Type | Description | Notes
|
|
|
833
1646
|
|
|
834
1647
|
[[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)
|
|
835
1648
|
|
|
836
|
-
# **
|
|
837
|
-
>
|
|
1649
|
+
# **getPlayer**
|
|
1650
|
+
> Player getPlayer()
|
|
838
1651
|
|
|
839
|
-
|
|
1652
|
+
View the details of an existing device in one of your OneSignal apps
|
|
840
1653
|
|
|
841
1654
|
### Example
|
|
842
1655
|
|
|
@@ -848,18 +1661,16 @@ import * as fs from 'fs';
|
|
|
848
1661
|
const configuration = .createConfiguration();
|
|
849
1662
|
const apiInstance = new .DefaultApi(configuration);
|
|
850
1663
|
|
|
851
|
-
let body:.
|
|
852
|
-
// string |
|
|
853
|
-
|
|
854
|
-
//
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
app_id: "app_id_example",
|
|
859
|
-
},
|
|
1664
|
+
let body:.DefaultApiGetPlayerRequest = {
|
|
1665
|
+
// string | Your app_id for this device
|
|
1666
|
+
appId: "app_id_example",
|
|
1667
|
+
// string | Player\'s OneSignal ID
|
|
1668
|
+
playerId: "player_id_example",
|
|
1669
|
+
// string | Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional)
|
|
1670
|
+
emailAuthHash: "email_auth_hash_example",
|
|
860
1671
|
};
|
|
861
1672
|
|
|
862
|
-
apiInstance.
|
|
1673
|
+
apiInstance.getPlayer(body).then((data:any) => {
|
|
863
1674
|
console.log('API called successfully. Returned data: ' + data);
|
|
864
1675
|
}).catch((error:any) => console.error(error));
|
|
865
1676
|
```
|
|
@@ -869,13 +1680,14 @@ apiInstance.getNotificationHistory(body).then((data:any) => {
|
|
|
869
1680
|
|
|
870
1681
|
Name | Type | Description | Notes
|
|
871
1682
|
------------- | ------------- | ------------- | -------------
|
|
872
|
-
**
|
|
873
|
-
**
|
|
1683
|
+
**appId** | [**string**] | Your app_id for this device | defaults to undefined
|
|
1684
|
+
**playerId** | [**string**] | Player\'s OneSignal ID | defaults to undefined
|
|
1685
|
+
**emailAuthHash** | [**string**] | Email - Only required if you have enabled Identity Verification and device_type is email (11). | (optional) defaults to undefined
|
|
874
1686
|
|
|
875
1687
|
|
|
876
1688
|
### Return type
|
|
877
1689
|
|
|
878
|
-
**
|
|
1690
|
+
**Player**
|
|
879
1691
|
|
|
880
1692
|
### Authorization
|
|
881
1693
|
|
|
@@ -883,7 +1695,7 @@ Name | Type | Description | Notes
|
|
|
883
1695
|
|
|
884
1696
|
### HTTP request headers
|
|
885
1697
|
|
|
886
|
-
- **Content-Type**:
|
|
1698
|
+
- **Content-Type**: Not defined
|
|
887
1699
|
- **Accept**: application/json
|
|
888
1700
|
|
|
889
1701
|
|
|
@@ -895,10 +1707,10 @@ Name | Type | Description | Notes
|
|
|
895
1707
|
|
|
896
1708
|
[[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)
|
|
897
1709
|
|
|
898
|
-
# **
|
|
899
|
-
>
|
|
1710
|
+
# **getPlayers**
|
|
1711
|
+
> PlayerSlice getPlayers()
|
|
900
1712
|
|
|
901
|
-
View the details of multiple
|
|
1713
|
+
View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant.
|
|
902
1714
|
|
|
903
1715
|
### Example
|
|
904
1716
|
|
|
@@ -910,18 +1722,16 @@ import * as fs from 'fs';
|
|
|
910
1722
|
const configuration = .createConfiguration();
|
|
911
1723
|
const apiInstance = new .DefaultApi(configuration);
|
|
912
1724
|
|
|
913
|
-
let body:.
|
|
914
|
-
// string | The app ID that you want to view
|
|
1725
|
+
let body:.DefaultApiGetPlayersRequest = {
|
|
1726
|
+
// string | The app ID that you want to view players from
|
|
915
1727
|
appId: "app_id_example",
|
|
916
|
-
// number | How many
|
|
1728
|
+
// number | How many devices to return. Max is 300. Default is 300 (optional)
|
|
917
1729
|
limit: 1,
|
|
918
|
-
// number |
|
|
1730
|
+
// number | Result offset. Default is 0. Results are sorted by id; (optional)
|
|
919
1731
|
offset: 1,
|
|
920
|
-
// 0 | 1 | 3 | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional)
|
|
921
|
-
kind: 0,
|
|
922
1732
|
};
|
|
923
1733
|
|
|
924
|
-
apiInstance.
|
|
1734
|
+
apiInstance.getPlayers(body).then((data:any) => {
|
|
925
1735
|
console.log('API called successfully. Returned data: ' + data);
|
|
926
1736
|
}).catch((error:any) => console.error(error));
|
|
927
1737
|
```
|
|
@@ -931,15 +1741,14 @@ apiInstance.getNotifications(body).then((data:any) => {
|
|
|
931
1741
|
|
|
932
1742
|
Name | Type | Description | Notes
|
|
933
1743
|
------------- | ------------- | ------------- | -------------
|
|
934
|
-
**appId** | [**string**] | The app ID that you want to view
|
|
935
|
-
**limit** | [**number**] | How many
|
|
936
|
-
**offset** | [**number**] |
|
|
937
|
-
**kind** | [**0 | 1 | 3**]**Array<0 | 1 | 3>** | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only | (optional) defaults to undefined
|
|
1744
|
+
**appId** | [**string**] | The app ID that you want to view players from | defaults to undefined
|
|
1745
|
+
**limit** | [**number**] | How many devices to return. Max is 300. Default is 300 | (optional) defaults to undefined
|
|
1746
|
+
**offset** | [**number**] | Result offset. Default is 0. Results are sorted by id; | (optional) defaults to undefined
|
|
938
1747
|
|
|
939
1748
|
|
|
940
1749
|
### Return type
|
|
941
1750
|
|
|
942
|
-
**
|
|
1751
|
+
**PlayerSlice**
|
|
943
1752
|
|
|
944
1753
|
### Authorization
|
|
945
1754
|
|
|
@@ -959,10 +1768,10 @@ Name | Type | Description | Notes
|
|
|
959
1768
|
|
|
960
1769
|
[[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)
|
|
961
1770
|
|
|
962
|
-
# **
|
|
963
|
-
>
|
|
1771
|
+
# **identifyUserByAlias**
|
|
1772
|
+
> InlineResponse200 identifyUserByAlias(userIdentityRequestBody)
|
|
964
1773
|
|
|
965
|
-
|
|
1774
|
+
Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
|
|
966
1775
|
|
|
967
1776
|
### Example
|
|
968
1777
|
|
|
@@ -974,22 +1783,20 @@ import * as fs from 'fs';
|
|
|
974
1783
|
const configuration = .createConfiguration();
|
|
975
1784
|
const apiInstance = new .DefaultApi(configuration);
|
|
976
1785
|
|
|
977
|
-
let body:.
|
|
978
|
-
// string
|
|
1786
|
+
let body:.DefaultApiIdentifyUserByAliasRequest = {
|
|
1787
|
+
// string
|
|
979
1788
|
appId: "app_id_example",
|
|
980
|
-
// string
|
|
981
|
-
|
|
982
|
-
// string
|
|
983
|
-
|
|
984
|
-
//
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
// string | Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional)
|
|
989
|
-
outcomeAttribution: "outcome_attribution_example",
|
|
1789
|
+
// string
|
|
1790
|
+
aliasLabel: "alias_label_example",
|
|
1791
|
+
// string
|
|
1792
|
+
aliasId: "alias_id_example",
|
|
1793
|
+
// UserIdentityRequestBody
|
|
1794
|
+
userIdentityRequestBody: {
|
|
1795
|
+
identity: {},
|
|
1796
|
+
},
|
|
990
1797
|
};
|
|
991
1798
|
|
|
992
|
-
apiInstance.
|
|
1799
|
+
apiInstance.identifyUserByAlias(body).then((data:any) => {
|
|
993
1800
|
console.log('API called successfully. Returned data: ' + data);
|
|
994
1801
|
}).catch((error:any) => console.error(error));
|
|
995
1802
|
```
|
|
@@ -999,17 +1806,15 @@ apiInstance.getOutcomes(body).then((data:any) => {
|
|
|
999
1806
|
|
|
1000
1807
|
Name | Type | Description | Notes
|
|
1001
1808
|
------------- | ------------- | ------------- | -------------
|
|
1002
|
-
**
|
|
1003
|
-
**
|
|
1004
|
-
**
|
|
1005
|
-
**
|
|
1006
|
-
**outcomePlatforms** | [**string**] | Optional Platform id. Refer device\'s platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. | (optional) defaults to undefined
|
|
1007
|
-
**outcomeAttribution** | [**string**] | Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. | (optional) defaults to undefined
|
|
1809
|
+
**userIdentityRequestBody** | **UserIdentityRequestBody**| |
|
|
1810
|
+
**appId** | [**string**] | | defaults to undefined
|
|
1811
|
+
**aliasLabel** | [**string**] | | defaults to undefined
|
|
1812
|
+
**aliasId** | [**string**] | | defaults to undefined
|
|
1008
1813
|
|
|
1009
1814
|
|
|
1010
1815
|
### Return type
|
|
1011
1816
|
|
|
1012
|
-
**
|
|
1817
|
+
**InlineResponse200**
|
|
1013
1818
|
|
|
1014
1819
|
### Authorization
|
|
1015
1820
|
|
|
@@ -1017,7 +1822,7 @@ Name | Type | Description | Notes
|
|
|
1017
1822
|
|
|
1018
1823
|
### HTTP request headers
|
|
1019
1824
|
|
|
1020
|
-
- **Content-Type**:
|
|
1825
|
+
- **Content-Type**: application/json
|
|
1021
1826
|
- **Accept**: application/json
|
|
1022
1827
|
|
|
1023
1828
|
|
|
@@ -1025,14 +1830,14 @@ Name | Type | Description | Notes
|
|
|
1025
1830
|
| Status code | Description | Response headers |
|
|
1026
1831
|
|-------------|-------------|------------------|
|
|
1027
1832
|
**200** | OK | - |
|
|
1028
|
-
**
|
|
1833
|
+
**409** | Conflict | - |
|
|
1029
1834
|
|
|
1030
1835
|
[[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)
|
|
1031
1836
|
|
|
1032
|
-
# **
|
|
1033
|
-
>
|
|
1837
|
+
# **identifyUserBySubscriptionId**
|
|
1838
|
+
> UserIdentityResponse identifyUserBySubscriptionId(userIdentityRequestBody)
|
|
1034
1839
|
|
|
1035
|
-
|
|
1840
|
+
Upserts one or more Aliases for the User identified by :subscription_id.
|
|
1036
1841
|
|
|
1037
1842
|
### Example
|
|
1038
1843
|
|
|
@@ -1044,16 +1849,18 @@ import * as fs from 'fs';
|
|
|
1044
1849
|
const configuration = .createConfiguration();
|
|
1045
1850
|
const apiInstance = new .DefaultApi(configuration);
|
|
1046
1851
|
|
|
1047
|
-
let body:.
|
|
1048
|
-
// string
|
|
1852
|
+
let body:.DefaultApiIdentifyUserBySubscriptionIdRequest = {
|
|
1853
|
+
// string
|
|
1049
1854
|
appId: "app_id_example",
|
|
1050
|
-
// string
|
|
1051
|
-
|
|
1052
|
-
//
|
|
1053
|
-
|
|
1855
|
+
// string
|
|
1856
|
+
subscriptionId: "subscription_id_example",
|
|
1857
|
+
// UserIdentityRequestBody
|
|
1858
|
+
userIdentityRequestBody: {
|
|
1859
|
+
identity: {},
|
|
1860
|
+
},
|
|
1054
1861
|
};
|
|
1055
1862
|
|
|
1056
|
-
apiInstance.
|
|
1863
|
+
apiInstance.identifyUserBySubscriptionId(body).then((data:any) => {
|
|
1057
1864
|
console.log('API called successfully. Returned data: ' + data);
|
|
1058
1865
|
}).catch((error:any) => console.error(error));
|
|
1059
1866
|
```
|
|
@@ -1063,14 +1870,14 @@ apiInstance.getPlayer(body).then((data:any) => {
|
|
|
1063
1870
|
|
|
1064
1871
|
Name | Type | Description | Notes
|
|
1065
1872
|
------------- | ------------- | ------------- | -------------
|
|
1066
|
-
**
|
|
1067
|
-
**
|
|
1068
|
-
**
|
|
1873
|
+
**userIdentityRequestBody** | **UserIdentityRequestBody**| |
|
|
1874
|
+
**appId** | [**string**] | | defaults to undefined
|
|
1875
|
+
**subscriptionId** | [**string**] | | defaults to undefined
|
|
1069
1876
|
|
|
1070
1877
|
|
|
1071
1878
|
### Return type
|
|
1072
1879
|
|
|
1073
|
-
**
|
|
1880
|
+
**UserIdentityResponse**
|
|
1074
1881
|
|
|
1075
1882
|
### Authorization
|
|
1076
1883
|
|
|
@@ -1078,7 +1885,7 @@ Name | Type | Description | Notes
|
|
|
1078
1885
|
|
|
1079
1886
|
### HTTP request headers
|
|
1080
1887
|
|
|
1081
|
-
- **Content-Type**:
|
|
1888
|
+
- **Content-Type**: application/json
|
|
1082
1889
|
- **Accept**: application/json
|
|
1083
1890
|
|
|
1084
1891
|
|
|
@@ -1086,14 +1893,14 @@ Name | Type | Description | Notes
|
|
|
1086
1893
|
| Status code | Description | Response headers |
|
|
1087
1894
|
|-------------|-------------|------------------|
|
|
1088
1895
|
**200** | OK | - |
|
|
1089
|
-
**
|
|
1896
|
+
**409** | Conflict | - |
|
|
1090
1897
|
|
|
1091
1898
|
[[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)
|
|
1092
1899
|
|
|
1093
|
-
# **
|
|
1094
|
-
>
|
|
1900
|
+
# **transferSubscription**
|
|
1901
|
+
> UserIdentityResponse transferSubscription(transferSubscriptionRequestBody)
|
|
1095
1902
|
|
|
1096
|
-
|
|
1903
|
+
Transfers this Subscription to the User identified by the identity in the payload.
|
|
1097
1904
|
|
|
1098
1905
|
### Example
|
|
1099
1906
|
|
|
@@ -1105,16 +1912,18 @@ import * as fs from 'fs';
|
|
|
1105
1912
|
const configuration = .createConfiguration();
|
|
1106
1913
|
const apiInstance = new .DefaultApi(configuration);
|
|
1107
1914
|
|
|
1108
|
-
let body:.
|
|
1109
|
-
// string
|
|
1915
|
+
let body:.DefaultApiTransferSubscriptionRequest = {
|
|
1916
|
+
// string
|
|
1110
1917
|
appId: "app_id_example",
|
|
1111
|
-
//
|
|
1112
|
-
|
|
1113
|
-
//
|
|
1114
|
-
|
|
1918
|
+
// string
|
|
1919
|
+
subscriptionId: "subscription_id_example",
|
|
1920
|
+
// TransferSubscriptionRequestBody
|
|
1921
|
+
transferSubscriptionRequestBody: {
|
|
1922
|
+
identity: {},
|
|
1923
|
+
},
|
|
1115
1924
|
};
|
|
1116
1925
|
|
|
1117
|
-
apiInstance.
|
|
1926
|
+
apiInstance.transferSubscription(body).then((data:any) => {
|
|
1118
1927
|
console.log('API called successfully. Returned data: ' + data);
|
|
1119
1928
|
}).catch((error:any) => console.error(error));
|
|
1120
1929
|
```
|
|
@@ -1124,14 +1933,14 @@ apiInstance.getPlayers(body).then((data:any) => {
|
|
|
1124
1933
|
|
|
1125
1934
|
Name | Type | Description | Notes
|
|
1126
1935
|
------------- | ------------- | ------------- | -------------
|
|
1127
|
-
**
|
|
1128
|
-
**
|
|
1129
|
-
**
|
|
1936
|
+
**transferSubscriptionRequestBody** | **TransferSubscriptionRequestBody**| |
|
|
1937
|
+
**appId** | [**string**] | | defaults to undefined
|
|
1938
|
+
**subscriptionId** | [**string**] | | defaults to undefined
|
|
1130
1939
|
|
|
1131
1940
|
|
|
1132
1941
|
### Return type
|
|
1133
1942
|
|
|
1134
|
-
**
|
|
1943
|
+
**UserIdentityResponse**
|
|
1135
1944
|
|
|
1136
1945
|
### Authorization
|
|
1137
1946
|
|
|
@@ -1139,7 +1948,7 @@ Name | Type | Description | Notes
|
|
|
1139
1948
|
|
|
1140
1949
|
### HTTP request headers
|
|
1141
1950
|
|
|
1142
|
-
- **Content-Type**:
|
|
1951
|
+
- **Content-Type**: application/json
|
|
1143
1952
|
- **Accept**: application/json
|
|
1144
1953
|
|
|
1145
1954
|
|
|
@@ -1147,7 +1956,6 @@ Name | Type | Description | Notes
|
|
|
1147
1956
|
| Status code | Description | Response headers |
|
|
1148
1957
|
|-------------|-------------|------------------|
|
|
1149
1958
|
**200** | OK | - |
|
|
1150
|
-
**400** | Bad Request | - |
|
|
1151
1959
|
|
|
1152
1960
|
[[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)
|
|
1153
1961
|
|
|
@@ -1339,7 +2147,7 @@ let body:.DefaultApiUpdatePlayerRequest = {
|
|
|
1339
2147
|
last_active: 1,
|
|
1340
2148
|
notification_types: 1,
|
|
1341
2149
|
test_type: 1,
|
|
1342
|
-
|
|
2150
|
+
long: 3.14,
|
|
1343
2151
|
lat: 3.14,
|
|
1344
2152
|
country: "country_example",
|
|
1345
2153
|
},
|
|
@@ -1440,7 +2248,185 @@ Name | Type | Description | Notes
|
|
|
1440
2248
|
| Status code | Description | Response headers |
|
|
1441
2249
|
|-------------|-------------|------------------|
|
|
1442
2250
|
**200** | OK | - |
|
|
1443
|
-
|
|
2251
|
+
|
|
2252
|
+
[[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)
|
|
2253
|
+
|
|
2254
|
+
# **updateSubscription**
|
|
2255
|
+
> void updateSubscription(updateSubscriptionRequestBody)
|
|
2256
|
+
|
|
2257
|
+
Updates an existing Subscription’s properties.
|
|
2258
|
+
|
|
2259
|
+
### Example
|
|
2260
|
+
|
|
2261
|
+
|
|
2262
|
+
```typescript
|
|
2263
|
+
import { } from '';
|
|
2264
|
+
import * as fs from 'fs';
|
|
2265
|
+
|
|
2266
|
+
const configuration = .createConfiguration();
|
|
2267
|
+
const apiInstance = new .DefaultApi(configuration);
|
|
2268
|
+
|
|
2269
|
+
let body:.DefaultApiUpdateSubscriptionRequest = {
|
|
2270
|
+
// string
|
|
2271
|
+
appId: "app_id_example",
|
|
2272
|
+
// string
|
|
2273
|
+
subscriptionId: "subscription_id_example",
|
|
2274
|
+
// UpdateSubscriptionRequestBody
|
|
2275
|
+
updateSubscriptionRequestBody: {
|
|
2276
|
+
subscription: {
|
|
2277
|
+
id: "id_example",
|
|
2278
|
+
type: "iOSPush",
|
|
2279
|
+
token: "token_example",
|
|
2280
|
+
enabled: true,
|
|
2281
|
+
notification_types: 3.14,
|
|
2282
|
+
session_time: 3.14,
|
|
2283
|
+
session_count: 3.14,
|
|
2284
|
+
sdk: "sdk_example",
|
|
2285
|
+
device_model: "device_model_example",
|
|
2286
|
+
device_os: "device_os_example",
|
|
2287
|
+
rooted: true,
|
|
2288
|
+
test_type: 3.14,
|
|
2289
|
+
app_version: "app_version_example",
|
|
2290
|
+
net_type: 3.14,
|
|
2291
|
+
carrier: "carrier_example",
|
|
2292
|
+
web_auth: "web_auth_example",
|
|
2293
|
+
web_p256: "web_p256_example",
|
|
2294
|
+
},
|
|
2295
|
+
},
|
|
2296
|
+
};
|
|
2297
|
+
|
|
2298
|
+
apiInstance.updateSubscription(body).then((data:any) => {
|
|
2299
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
2300
|
+
}).catch((error:any) => console.error(error));
|
|
2301
|
+
```
|
|
2302
|
+
|
|
2303
|
+
|
|
2304
|
+
### Parameters
|
|
2305
|
+
|
|
2306
|
+
Name | Type | Description | Notes
|
|
2307
|
+
------------- | ------------- | ------------- | -------------
|
|
2308
|
+
**updateSubscriptionRequestBody** | **UpdateSubscriptionRequestBody**| |
|
|
2309
|
+
**appId** | [**string**] | | defaults to undefined
|
|
2310
|
+
**subscriptionId** | [**string**] | | defaults to undefined
|
|
2311
|
+
|
|
2312
|
+
|
|
2313
|
+
### Return type
|
|
2314
|
+
|
|
2315
|
+
**void**
|
|
2316
|
+
|
|
2317
|
+
### Authorization
|
|
2318
|
+
|
|
2319
|
+
[app_key](README.md#app_key)
|
|
2320
|
+
|
|
2321
|
+
### HTTP request headers
|
|
2322
|
+
|
|
2323
|
+
- **Content-Type**: application/json
|
|
2324
|
+
- **Accept**: Not defined
|
|
2325
|
+
|
|
2326
|
+
|
|
2327
|
+
### HTTP response details
|
|
2328
|
+
| Status code | Description | Response headers |
|
|
2329
|
+
|-------------|-------------|------------------|
|
|
2330
|
+
**202** | ACCEPTED | - |
|
|
2331
|
+
|
|
2332
|
+
[[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)
|
|
2333
|
+
|
|
2334
|
+
# **updateUser**
|
|
2335
|
+
> InlineResponse202 updateUser(updateUserRequest)
|
|
2336
|
+
|
|
2337
|
+
Updates an existing User’s properties.
|
|
2338
|
+
|
|
2339
|
+
### Example
|
|
2340
|
+
|
|
2341
|
+
|
|
2342
|
+
```typescript
|
|
2343
|
+
import { } from '';
|
|
2344
|
+
import * as fs from 'fs';
|
|
2345
|
+
|
|
2346
|
+
const configuration = .createConfiguration();
|
|
2347
|
+
const apiInstance = new .DefaultApi(configuration);
|
|
2348
|
+
|
|
2349
|
+
let body:.DefaultApiUpdateUserRequest = {
|
|
2350
|
+
// string
|
|
2351
|
+
appId: "app_id_example",
|
|
2352
|
+
// string
|
|
2353
|
+
aliasLabel: "alias_label_example",
|
|
2354
|
+
// string
|
|
2355
|
+
aliasId: "alias_id_example",
|
|
2356
|
+
// UpdateUserRequest
|
|
2357
|
+
updateUserRequest: {
|
|
2358
|
+
properties: {
|
|
2359
|
+
tags: {},
|
|
2360
|
+
language: "language_example",
|
|
2361
|
+
timezone_id: "timezone_id_example",
|
|
2362
|
+
lat: 3.14,
|
|
2363
|
+
long: 3.14,
|
|
2364
|
+
country: "country_example",
|
|
2365
|
+
first_active: 3.14,
|
|
2366
|
+
last_active: 3.14,
|
|
2367
|
+
amount_spent: 3.14,
|
|
2368
|
+
purchases: [
|
|
2369
|
+
{
|
|
2370
|
+
sku: "sku_example",
|
|
2371
|
+
amount: "amount_example",
|
|
2372
|
+
iso: "iso_example",
|
|
2373
|
+
},
|
|
2374
|
+
],
|
|
2375
|
+
ip: "ip_example",
|
|
2376
|
+
},
|
|
2377
|
+
refresh_device_metadata: false,
|
|
2378
|
+
deltas: {
|
|
2379
|
+
session_time: 3.14,
|
|
2380
|
+
session_count: 3.14,
|
|
2381
|
+
amount_spent: 3.14,
|
|
2382
|
+
purchases: [
|
|
2383
|
+
{
|
|
2384
|
+
sku: "sku_example",
|
|
2385
|
+
amount: "amount_example",
|
|
2386
|
+
iso: "iso_example",
|
|
2387
|
+
},
|
|
2388
|
+
],
|
|
2389
|
+
},
|
|
2390
|
+
},
|
|
2391
|
+
// string (optional)
|
|
2392
|
+
subscriptionId: "subscription_id_example",
|
|
2393
|
+
};
|
|
2394
|
+
|
|
2395
|
+
apiInstance.updateUser(body).then((data:any) => {
|
|
2396
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
2397
|
+
}).catch((error:any) => console.error(error));
|
|
2398
|
+
```
|
|
2399
|
+
|
|
2400
|
+
|
|
2401
|
+
### Parameters
|
|
2402
|
+
|
|
2403
|
+
Name | Type | Description | Notes
|
|
2404
|
+
------------- | ------------- | ------------- | -------------
|
|
2405
|
+
**updateUserRequest** | **UpdateUserRequest**| |
|
|
2406
|
+
**appId** | [**string**] | | defaults to undefined
|
|
2407
|
+
**aliasLabel** | [**string**] | | defaults to undefined
|
|
2408
|
+
**aliasId** | [**string**] | | defaults to undefined
|
|
2409
|
+
**subscriptionId** | [**string**] | | (optional) defaults to undefined
|
|
2410
|
+
|
|
2411
|
+
|
|
2412
|
+
### Return type
|
|
2413
|
+
|
|
2414
|
+
**InlineResponse202**
|
|
2415
|
+
|
|
2416
|
+
### Authorization
|
|
2417
|
+
|
|
2418
|
+
[app_key](README.md#app_key)
|
|
2419
|
+
|
|
2420
|
+
### HTTP request headers
|
|
2421
|
+
|
|
2422
|
+
- **Content-Type**: application/json
|
|
2423
|
+
- **Accept**: application/json
|
|
2424
|
+
|
|
2425
|
+
|
|
2426
|
+
### HTTP response details
|
|
2427
|
+
| Status code | Description | Response headers |
|
|
2428
|
+
|-------------|-------------|------------------|
|
|
2429
|
+
**202** | ACCEPTED | - |
|
|
1444
2430
|
|
|
1445
2431
|
[[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)
|
|
1446
2432
|
|