@onesignal/node-onesignal 1.0.0-beta7 → 1.0.0-beta8

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.
Files changed (106) hide show
  1. package/.github/workflows/npm_deploy.yml +6 -7
  2. package/CHANGELOG.md +4 -0
  3. package/DefaultApi.md +215 -0
  4. package/README.md +41 -0
  5. package/apis/DefaultApi.ts +401 -29
  6. package/dist/apis/DefaultApi.d.ts +9 -0
  7. package/dist/apis/DefaultApi.js +496 -132
  8. package/dist/apis/DefaultApi.js.map +1 -1
  9. package/dist/auth/auth.d.ts +6 -6
  10. package/dist/auth/auth.js +1 -1
  11. package/dist/http/http.d.ts +2 -2
  12. package/dist/http/http.js +1 -1
  13. package/dist/models/App.d.ts +5 -1
  14. package/dist/models/App.js +24 -0
  15. package/dist/models/App.js.map +1 -1
  16. package/dist/models/BadRequestError.d.ts +17 -0
  17. package/dist/models/BadRequestError.js +22 -0
  18. package/dist/models/BadRequestError.js.map +1 -0
  19. package/dist/models/BasicNotification.d.ts +1 -1
  20. package/dist/models/BasicNotificationAllOf.d.ts +1 -1
  21. package/dist/models/BeginLiveActivityRequest.d.ts +18 -0
  22. package/dist/models/BeginLiveActivityRequest.js +28 -0
  23. package/dist/models/BeginLiveActivityRequest.js.map +1 -0
  24. package/dist/models/Filter.d.ts +1 -1
  25. package/dist/models/FilterExpressions.d.ts +2 -2
  26. package/dist/models/GetNotificationRequestBody.d.ts +1 -1
  27. package/dist/models/Notification.d.ts +1 -1
  28. package/dist/models/NotificationWithMeta.d.ts +1 -1
  29. package/dist/models/ObjectSerializer.d.ts +4 -5
  30. package/dist/models/ObjectSerializer.js +14 -15
  31. package/dist/models/ObjectSerializer.js.map +1 -1
  32. package/dist/models/Operator.d.ts +1 -1
  33. package/dist/models/OutcomeData.d.ts +1 -1
  34. package/dist/models/UpdateLiveActivityRequest.d.ts +22 -0
  35. package/dist/models/UpdateLiveActivityRequest.js +40 -0
  36. package/dist/models/UpdateLiveActivityRequest.js.map +1 -0
  37. package/dist/models/UpdateLiveActivitySuccessResponse.d.ts +19 -0
  38. package/dist/models/UpdateLiveActivitySuccessResponse.js +28 -0
  39. package/dist/models/UpdateLiveActivitySuccessResponse.js.map +1 -0
  40. package/dist/models/all.d.ts +4 -5
  41. package/dist/models/all.js +4 -5
  42. package/dist/models/all.js.map +1 -1
  43. package/dist/types/ObjectParamAPI.d.ts +21 -0
  44. package/dist/types/ObjectParamAPI.js +9 -0
  45. package/dist/types/ObjectParamAPI.js.map +1 -1
  46. package/dist/types/ObservableAPI.d.ts +6 -0
  47. package/dist/types/ObservableAPI.js +128 -56
  48. package/dist/types/ObservableAPI.js.map +1 -1
  49. package/dist/types/PromiseAPI.d.ts +6 -0
  50. package/dist/types/PromiseAPI.js +12 -0
  51. package/dist/types/PromiseAPI.js.map +1 -1
  52. package/models/App.ts +41 -1
  53. package/models/BadRequestError.ts +31 -0
  54. package/models/BasicNotification.ts +1 -1
  55. package/models/BasicNotificationAllOf.ts +1 -1
  56. package/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +1 -1
  57. package/models/BeginLiveActivityRequest.ts +38 -0
  58. package/models/Button.ts +1 -1
  59. package/models/CancelNotificationSuccessResponse.ts +1 -1
  60. package/models/CreateNotificationSuccessResponse.ts +1 -1
  61. package/models/CreatePlayerSuccessResponse.ts +1 -1
  62. package/models/CreateSegmentConflictResponse.ts +1 -1
  63. package/models/CreateSegmentSuccessResponse.ts +1 -1
  64. package/models/DeletePlayerNotFoundResponse.ts +1 -1
  65. package/models/DeletePlayerSuccessResponse.ts +1 -1
  66. package/models/DeleteSegmentNotFoundResponse.ts +1 -1
  67. package/models/DeleteSegmentSuccessResponse.ts +1 -1
  68. package/models/DeliveryData.ts +1 -1
  69. package/models/ExportPlayersRequestBody.ts +1 -1
  70. package/models/ExportPlayersSuccessResponse.ts +1 -1
  71. package/models/Filter.ts +1 -1
  72. package/models/FilterExpressions.ts +1 -1
  73. package/models/GetNotificationRequestBody.ts +1 -1
  74. package/models/InvalidIdentifierError.ts +1 -1
  75. package/models/Notification.ts +1 -1
  76. package/models/Notification200Errors.ts +1 -1
  77. package/models/NotificationAllOf.ts +1 -1
  78. package/models/NotificationHistorySuccessResponse.ts +1 -1
  79. package/models/NotificationSlice.ts +1 -1
  80. package/models/NotificationTarget.ts +1 -1
  81. package/models/NotificationWithMeta.ts +1 -1
  82. package/models/NotificationWithMetaAllOf.ts +1 -1
  83. package/models/ObjectSerializer.ts +15 -16
  84. package/models/Operator.ts +1 -1
  85. package/models/OutcomeData.ts +1 -1
  86. package/models/OutcomesData.ts +1 -1
  87. package/models/PlatformDeliveryData.ts +1 -1
  88. package/models/PlatformDeliveryDataEmailAllOf.ts +1 -1
  89. package/models/PlatformDeliveryDataSmsAllOf.ts +1 -1
  90. package/models/Player.ts +1 -1
  91. package/models/PlayerNotificationTarget.ts +1 -1
  92. package/models/PlayerSlice.ts +1 -1
  93. package/models/Purchase.ts +1 -1
  94. package/models/Segment.ts +1 -1
  95. package/models/SegmentNotificationTarget.ts +1 -1
  96. package/models/StringMap.ts +1 -1
  97. package/models/UpdateLiveActivityRequest.ts +62 -0
  98. package/models/UpdateLiveActivitySuccessResponse.ts +39 -0
  99. package/models/UpdatePlayerSuccessResponse.ts +1 -1
  100. package/models/UpdatePlayerTagsRequestBody.ts +1 -1
  101. package/models/UpdatePlayerTagsSuccessResponse.ts +1 -1
  102. package/models/all.ts +4 -5
  103. package/package.json +3 -3
  104. package/types/ObjectParamAPI.ts +94 -5
  105. package/types/ObservableAPI.ts +82 -5
  106. package/types/PromiseAPI.ts +40 -5
@@ -2,7 +2,7 @@
2
2
  * OneSignal
3
3
  * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
4
4
  *
5
- * API Version: 1.0.1
5
+ * API Version: 1.0.2
6
6
  * Contact: devrel@onesignal.com
7
7
  */
8
8
 
@@ -2,7 +2,7 @@
2
2
  * OneSignal
3
3
  * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
4
4
  *
5
- * API Version: 1.0.1
5
+ * API Version: 1.0.2
6
6
  * Contact: devrel@onesignal.com
7
7
  */
8
8
 
@@ -0,0 +1,62 @@
1
+ /**
2
+ * OneSignal
3
+ * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
4
+ *
5
+ * API Version: 1.0.2
6
+ * Contact: devrel@onesignal.com
7
+ */
8
+
9
+ import { HttpFile } from '../http/http';
10
+
11
+ export class UpdateLiveActivityRequest {
12
+ /**
13
+ * Type of live activity
14
+ */
15
+ 'name': UpdateLiveActivityRequestNameEnum;
16
+ 'event': UpdateLiveActivityRequestEventEnum;
17
+ 'event_updates': object;
18
+ /**
19
+ * Timestamp; only allowed if event is \"end\"
20
+ */
21
+ 'dismiss_at'?: number;
22
+
23
+ static readonly discriminator: string | undefined = undefined;
24
+
25
+ static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
26
+ {
27
+ "name": "name",
28
+ "baseName": "name",
29
+ "type": "UpdateLiveActivityRequestNameEnum",
30
+ "format": ""
31
+ },
32
+ {
33
+ "name": "event",
34
+ "baseName": "event",
35
+ "type": "UpdateLiveActivityRequestEventEnum",
36
+ "format": ""
37
+ },
38
+ {
39
+ "name": "event_updates",
40
+ "baseName": "event_updates",
41
+ "type": "object",
42
+ "format": ""
43
+ },
44
+ {
45
+ "name": "dismiss_at",
46
+ "baseName": "dismiss_at",
47
+ "type": "number",
48
+ "format": ""
49
+ } ];
50
+
51
+ static getAttributeTypeMap() {
52
+ return UpdateLiveActivityRequest.attributeTypeMap;
53
+ }
54
+
55
+ public constructor() {
56
+ }
57
+ }
58
+
59
+
60
+ export type UpdateLiveActivityRequestNameEnum = "headings" | "contents" | "ios_sound" | "priority_level" ;
61
+ export type UpdateLiveActivityRequestEventEnum = "update" | "end" ;
62
+
@@ -0,0 +1,39 @@
1
+ /**
2
+ * OneSignal
3
+ * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
4
+ *
5
+ * API Version: 1.0.2
6
+ * Contact: devrel@onesignal.com
7
+ */
8
+
9
+ import { Notification200Errors } from './Notification200Errors';
10
+ import { HttpFile } from '../http/http';
11
+
12
+ export class UpdateLiveActivitySuccessResponse {
13
+ 'notification_id'?: string;
14
+ 'errors'?: Notification200Errors;
15
+
16
+ static readonly discriminator: string | undefined = undefined;
17
+
18
+ static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
19
+ {
20
+ "name": "notification_id",
21
+ "baseName": "notification_id",
22
+ "type": "string",
23
+ "format": ""
24
+ },
25
+ {
26
+ "name": "errors",
27
+ "baseName": "errors",
28
+ "type": "Notification200Errors",
29
+ "format": ""
30
+ } ];
31
+
32
+ static getAttributeTypeMap() {
33
+ return UpdateLiveActivitySuccessResponse.attributeTypeMap;
34
+ }
35
+
36
+ public constructor() {
37
+ }
38
+ }
39
+
@@ -2,7 +2,7 @@
2
2
  * OneSignal
3
3
  * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
4
4
  *
5
- * API Version: 1.0.1
5
+ * API Version: 1.0.2
6
6
  * Contact: devrel@onesignal.com
7
7
  */
8
8
 
@@ -2,7 +2,7 @@
2
2
  * OneSignal
3
3
  * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
4
4
  *
5
- * API Version: 1.0.1
5
+ * API Version: 1.0.2
6
6
  * Contact: devrel@onesignal.com
7
7
  */
8
8
 
@@ -2,7 +2,7 @@
2
2
  * OneSignal
3
3
  * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
4
4
  *
5
- * API Version: 1.0.1
5
+ * API Version: 1.0.2
6
6
  * Contact: devrel@onesignal.com
7
7
  */
8
8
 
package/models/all.ts CHANGED
@@ -1,19 +1,17 @@
1
1
  export * from './App'
2
+ export * from './BadRequestError'
2
3
  export * from './BasicNotification'
3
4
  export * from './BasicNotificationAllOf'
4
5
  export * from './BasicNotificationAllOfAndroidBackgroundLayout'
6
+ export * from './BeginLiveActivityRequest'
5
7
  export * from './Button'
6
8
  export * from './CancelNotificationSuccessResponse'
7
- export * from './CreateNotificationBadRequestResponse'
8
9
  export * from './CreateNotificationSuccessResponse'
9
10
  export * from './CreatePlayerSuccessResponse'
10
- export * from './CreateSegmentBadRequestResponse'
11
11
  export * from './CreateSegmentConflictResponse'
12
12
  export * from './CreateSegmentSuccessResponse'
13
- export * from './DeletePlayerBadRequestResponse'
14
13
  export * from './DeletePlayerNotFoundResponse'
15
14
  export * from './DeletePlayerSuccessResponse'
16
- export * from './DeleteSegmentBadRequestResponse'
17
15
  export * from './DeleteSegmentNotFoundResponse'
18
16
  export * from './DeleteSegmentSuccessResponse'
19
17
  export * from './DeliveryData'
@@ -26,7 +24,6 @@ export * from './InvalidIdentifierError'
26
24
  export * from './Notification'
27
25
  export * from './Notification200Errors'
28
26
  export * from './NotificationAllOf'
29
- export * from './NotificationHistoryBadRequestResponse'
30
27
  export * from './NotificationHistorySuccessResponse'
31
28
  export * from './NotificationSlice'
32
29
  export * from './NotificationTarget'
@@ -45,6 +42,8 @@ export * from './Purchase'
45
42
  export * from './Segment'
46
43
  export * from './SegmentNotificationTarget'
47
44
  export * from './StringMap'
45
+ export * from './UpdateLiveActivityRequest'
46
+ export * from './UpdateLiveActivitySuccessResponse'
48
47
  export * from './UpdatePlayerSuccessResponse'
49
48
  export * from './UpdatePlayerTagsRequestBody'
50
49
  export * from './UpdatePlayerTagsSuccessResponse'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onesignal/node-onesignal",
3
- "version": "1.0.0-beta7",
3
+ "version": "1.0.0-beta8",
4
4
  "description": "OpenAPI client for @onesignal/node-onesignal",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
@@ -9,7 +9,7 @@
9
9
  "openapi-client",
10
10
  "openapi-generator"
11
11
  ],
12
- "license": "Unlicense",
12
+ "license": "MIT",
13
13
  "main": "./dist/index.js",
14
14
  "type": "commonjs",
15
15
  "exports": {
@@ -21,7 +21,7 @@
21
21
  "prepare": "npm run build"
22
22
  },
23
23
  "dependencies": {
24
- "@types/node": "^18.11.9",
24
+ "@types/node": "^18.11.17",
25
25
  "@types/node-fetch": "^2.5.7",
26
26
  "btoa": "^1.2.1",
27
27
  "es6-promise": "^4.2.4",
@@ -3,21 +3,19 @@ import * as models from '../models/all';
3
3
  import { Configuration} from '../configuration'
4
4
 
5
5
  import { App } from '../models/App';
6
+ import { BadRequestError } from '../models/BadRequestError';
6
7
  import { BasicNotification } from '../models/BasicNotification';
7
8
  import { BasicNotificationAllOf } from '../models/BasicNotificationAllOf';
8
9
  import { BasicNotificationAllOfAndroidBackgroundLayout } from '../models/BasicNotificationAllOfAndroidBackgroundLayout';
10
+ import { BeginLiveActivityRequest } from '../models/BeginLiveActivityRequest';
9
11
  import { Button } from '../models/Button';
10
12
  import { CancelNotificationSuccessResponse } from '../models/CancelNotificationSuccessResponse';
11
- import { CreateNotificationBadRequestResponse } from '../models/CreateNotificationBadRequestResponse';
12
13
  import { CreateNotificationSuccessResponse } from '../models/CreateNotificationSuccessResponse';
13
14
  import { CreatePlayerSuccessResponse } from '../models/CreatePlayerSuccessResponse';
14
- import { CreateSegmentBadRequestResponse } from '../models/CreateSegmentBadRequestResponse';
15
15
  import { CreateSegmentConflictResponse } from '../models/CreateSegmentConflictResponse';
16
16
  import { CreateSegmentSuccessResponse } from '../models/CreateSegmentSuccessResponse';
17
- import { DeletePlayerBadRequestResponse } from '../models/DeletePlayerBadRequestResponse';
18
17
  import { DeletePlayerNotFoundResponse } from '../models/DeletePlayerNotFoundResponse';
19
18
  import { DeletePlayerSuccessResponse } from '../models/DeletePlayerSuccessResponse';
20
- import { DeleteSegmentBadRequestResponse } from '../models/DeleteSegmentBadRequestResponse';
21
19
  import { DeleteSegmentNotFoundResponse } from '../models/DeleteSegmentNotFoundResponse';
22
20
  import { DeleteSegmentSuccessResponse } from '../models/DeleteSegmentSuccessResponse';
23
21
  import { DeliveryData } from '../models/DeliveryData';
@@ -30,7 +28,6 @@ import { InvalidIdentifierError } from '../models/InvalidIdentifierError';
30
28
  import { Notification } from '../models/Notification';
31
29
  import { Notification200Errors } from '../models/Notification200Errors';
32
30
  import { NotificationAllOf } from '../models/NotificationAllOf';
33
- import { NotificationHistoryBadRequestResponse } from '../models/NotificationHistoryBadRequestResponse';
34
31
  import { NotificationHistorySuccessResponse } from '../models/NotificationHistorySuccessResponse';
35
32
  import { NotificationSlice } from '../models/NotificationSlice';
36
33
  import { NotificationTarget } from '../models/NotificationTarget';
@@ -49,6 +46,8 @@ import { Purchase } from '../models/Purchase';
49
46
  import { Segment } from '../models/Segment';
50
47
  import { SegmentNotificationTarget } from '../models/SegmentNotificationTarget';
51
48
  import { StringMap } from '../models/StringMap';
49
+ import { UpdateLiveActivityRequest } from '../models/UpdateLiveActivityRequest';
50
+ import { UpdateLiveActivitySuccessResponse } from '../models/UpdateLiveActivitySuccessResponse';
52
51
  import { UpdatePlayerSuccessResponse } from '../models/UpdatePlayerSuccessResponse';
53
52
  import { UpdatePlayerTagsRequestBody } from '../models/UpdatePlayerTagsRequestBody';
54
53
  import { UpdatePlayerTagsSuccessResponse } from '../models/UpdatePlayerTagsSuccessResponse';
@@ -56,6 +55,27 @@ import { UpdatePlayerTagsSuccessResponse } from '../models/UpdatePlayerTagsSucce
56
55
  import { ObservableDefaultApi } from "./ObservableAPI";
57
56
  import { DefaultApiRequestFactory, DefaultApiResponseProcessor} from "../apis/DefaultApi";
58
57
 
58
+ export interface DefaultApiBeginLiveActivityRequest {
59
+ /**
60
+ * The OneSignal App ID for your app. Available in Keys &amp; IDs.
61
+ * @type string
62
+ * @memberof DefaultApibeginLiveActivity
63
+ */
64
+ appId: string
65
+ /**
66
+ * Live Activity record ID
67
+ * @type string
68
+ * @memberof DefaultApibeginLiveActivity
69
+ */
70
+ activityId: string
71
+ /**
72
+ *
73
+ * @type BeginLiveActivityRequest
74
+ * @memberof DefaultApibeginLiveActivity
75
+ */
76
+ beginLiveActivityRequest: BeginLiveActivityRequest
77
+ }
78
+
59
79
  export interface DefaultApiCancelNotificationRequest {
60
80
  /**
61
81
  *
@@ -143,6 +163,27 @@ export interface DefaultApiDeleteSegmentsRequest {
143
163
  segmentId: string
144
164
  }
145
165
 
166
+ export interface DefaultApiEndLiveActivityRequest {
167
+ /**
168
+ * The OneSignal App ID for your app. Available in Keys &amp; IDs.
169
+ * @type string
170
+ * @memberof DefaultApiendLiveActivity
171
+ */
172
+ appId: string
173
+ /**
174
+ * Live Activity record ID
175
+ * @type string
176
+ * @memberof DefaultApiendLiveActivity
177
+ */
178
+ activityId: string
179
+ /**
180
+ * Subscription ID
181
+ * @type string
182
+ * @memberof DefaultApiendLiveActivity
183
+ */
184
+ subscriptionId: string
185
+ }
186
+
146
187
  export interface DefaultApiExportPlayersRequest {
147
188
  /**
148
189
  * The app ID that you want to export devices from
@@ -323,6 +364,27 @@ export interface DefaultApiUpdateAppRequest {
323
364
  app: App
324
365
  }
325
366
 
367
+ export interface DefaultApiUpdateLiveActivityRequest {
368
+ /**
369
+ * The OneSignal App ID for your app. Available in Keys &amp; IDs.
370
+ * @type string
371
+ * @memberof DefaultApiupdateLiveActivity
372
+ */
373
+ appId: string
374
+ /**
375
+ * Live Activity record ID
376
+ * @type string
377
+ * @memberof DefaultApiupdateLiveActivity
378
+ */
379
+ activityId: string
380
+ /**
381
+ *
382
+ * @type UpdateLiveActivityRequest
383
+ * @memberof DefaultApiupdateLiveActivity
384
+ */
385
+ updateLiveActivityRequest: UpdateLiveActivityRequest
386
+ }
387
+
326
388
  export interface DefaultApiUpdatePlayerRequest {
327
389
  /**
328
390
  * Player\&#39;s OneSignal ID
@@ -366,6 +428,15 @@ export class ObjectDefaultApi {
366
428
  this.api = new ObservableDefaultApi(configuration, requestFactory, responseProcessor);
367
429
  }
368
430
 
431
+ /**
432
+ * Starts a Live Activity
433
+ * Start Live Activity
434
+ * @param param the request object
435
+ */
436
+ public beginLiveActivity(param: DefaultApiBeginLiveActivityRequest, options?: Configuration): Promise<void> {
437
+ return this.api.beginLiveActivity(param.appId, param.activityId, param.beginLiveActivityRequest, options).toPromise();
438
+ }
439
+
369
440
  /**
370
441
  * Used to stop a scheduled or currently outgoing notification
371
442
  * Stop a scheduled or currently outgoing notification
@@ -429,6 +500,15 @@ export class ObjectDefaultApi {
429
500
  return this.api.deleteSegments(param.appId, param.segmentId, options).toPromise();
430
501
  }
431
502
 
503
+ /**
504
+ * Stops a Live Activity
505
+ * Stop Live Activity
506
+ * @param param the request object
507
+ */
508
+ public endLiveActivity(param: DefaultApiEndLiveActivityRequest, options?: Configuration): Promise<void> {
509
+ return this.api.endLiveActivity(param.appId, param.activityId, param.subscriptionId, options).toPromise();
510
+ }
511
+
432
512
  /**
433
513
  * Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App\'s REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | --- | --- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | --- | --- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. |
434
514
  * CSV export
@@ -519,6 +599,15 @@ export class ObjectDefaultApi {
519
599
  return this.api.updateApp(param.appId, param.app, options).toPromise();
520
600
  }
521
601
 
602
+ /**
603
+ * Updates a specified live activity.
604
+ * Update a Live Activity via Push
605
+ * @param param the request object
606
+ */
607
+ public updateLiveActivity(param: DefaultApiUpdateLiveActivityRequest, options?: Configuration): Promise<UpdateLiveActivitySuccessResponse> {
608
+ return this.api.updateLiveActivity(param.appId, param.activityId, param.updateLiveActivityRequest, options).toPromise();
609
+ }
610
+
522
611
  /**
523
612
  * Update an existing device in one of your OneSignal apps
524
613
  * Edit device
@@ -4,21 +4,19 @@ import { Configuration} from '../configuration'
4
4
  import { Observable, of, from } from '../rxjsStub';
5
5
  import {mergeMap, map} from '../rxjsStub';
6
6
  import { App } from '../models/App';
7
+ import { BadRequestError } from '../models/BadRequestError';
7
8
  import { BasicNotification } from '../models/BasicNotification';
8
9
  import { BasicNotificationAllOf } from '../models/BasicNotificationAllOf';
9
10
  import { BasicNotificationAllOfAndroidBackgroundLayout } from '../models/BasicNotificationAllOfAndroidBackgroundLayout';
11
+ import { BeginLiveActivityRequest } from '../models/BeginLiveActivityRequest';
10
12
  import { Button } from '../models/Button';
11
13
  import { CancelNotificationSuccessResponse } from '../models/CancelNotificationSuccessResponse';
12
- import { CreateNotificationBadRequestResponse } from '../models/CreateNotificationBadRequestResponse';
13
14
  import { CreateNotificationSuccessResponse } from '../models/CreateNotificationSuccessResponse';
14
15
  import { CreatePlayerSuccessResponse } from '../models/CreatePlayerSuccessResponse';
15
- import { CreateSegmentBadRequestResponse } from '../models/CreateSegmentBadRequestResponse';
16
16
  import { CreateSegmentConflictResponse } from '../models/CreateSegmentConflictResponse';
17
17
  import { CreateSegmentSuccessResponse } from '../models/CreateSegmentSuccessResponse';
18
- import { DeletePlayerBadRequestResponse } from '../models/DeletePlayerBadRequestResponse';
19
18
  import { DeletePlayerNotFoundResponse } from '../models/DeletePlayerNotFoundResponse';
20
19
  import { DeletePlayerSuccessResponse } from '../models/DeletePlayerSuccessResponse';
21
- import { DeleteSegmentBadRequestResponse } from '../models/DeleteSegmentBadRequestResponse';
22
20
  import { DeleteSegmentNotFoundResponse } from '../models/DeleteSegmentNotFoundResponse';
23
21
  import { DeleteSegmentSuccessResponse } from '../models/DeleteSegmentSuccessResponse';
24
22
  import { DeliveryData } from '../models/DeliveryData';
@@ -31,7 +29,6 @@ import { InvalidIdentifierError } from '../models/InvalidIdentifierError';
31
29
  import { Notification } from '../models/Notification';
32
30
  import { Notification200Errors } from '../models/Notification200Errors';
33
31
  import { NotificationAllOf } from '../models/NotificationAllOf';
34
- import { NotificationHistoryBadRequestResponse } from '../models/NotificationHistoryBadRequestResponse';
35
32
  import { NotificationHistorySuccessResponse } from '../models/NotificationHistorySuccessResponse';
36
33
  import { NotificationSlice } from '../models/NotificationSlice';
37
34
  import { NotificationTarget } from '../models/NotificationTarget';
@@ -50,6 +47,8 @@ import { Purchase } from '../models/Purchase';
50
47
  import { Segment } from '../models/Segment';
51
48
  import { SegmentNotificationTarget } from '../models/SegmentNotificationTarget';
52
49
  import { StringMap } from '../models/StringMap';
50
+ import { UpdateLiveActivityRequest } from '../models/UpdateLiveActivityRequest';
51
+ import { UpdateLiveActivitySuccessResponse } from '../models/UpdateLiveActivitySuccessResponse';
53
52
  import { UpdatePlayerSuccessResponse } from '../models/UpdatePlayerSuccessResponse';
54
53
  import { UpdatePlayerTagsRequestBody } from '../models/UpdatePlayerTagsRequestBody';
55
54
  import { UpdatePlayerTagsSuccessResponse } from '../models/UpdatePlayerTagsSuccessResponse';
@@ -70,6 +69,32 @@ export class ObservableDefaultApi {
70
69
  this.responseProcessor = responseProcessor || new DefaultApiResponseProcessor();
71
70
  }
72
71
 
72
+ /**
73
+ * Starts a Live Activity
74
+ * Start Live Activity
75
+ * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
76
+ * @param activityId Live Activity record ID
77
+ * @param beginLiveActivityRequest
78
+ */
79
+ public beginLiveActivity(appId: string, activityId: string, beginLiveActivityRequest: BeginLiveActivityRequest, _options?: Configuration): Observable<void> {
80
+ const requestContextPromise = this.requestFactory.beginLiveActivity(appId, activityId, beginLiveActivityRequest, _options);
81
+
82
+ // build promise chain
83
+ let middlewarePreObservable = from<RequestContext>(requestContextPromise);
84
+ for (let middleware of this.configuration.middleware) {
85
+ middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
86
+ }
87
+
88
+ return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
89
+ pipe(mergeMap((response: ResponseContext) => {
90
+ let middlewarePostObservable = of(response);
91
+ for (let middleware of this.configuration.middleware) {
92
+ middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
93
+ }
94
+ return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.beginLiveActivity(rsp)));
95
+ }));
96
+ }
97
+
73
98
  /**
74
99
  * Used to stop a scheduled or currently outgoing notification
75
100
  * Stop a scheduled or currently outgoing notification
@@ -242,6 +267,32 @@ export class ObservableDefaultApi {
242
267
  }));
243
268
  }
244
269
 
270
+ /**
271
+ * Stops a Live Activity
272
+ * Stop Live Activity
273
+ * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
274
+ * @param activityId Live Activity record ID
275
+ * @param subscriptionId Subscription ID
276
+ */
277
+ public endLiveActivity(appId: string, activityId: string, subscriptionId: string, _options?: Configuration): Observable<void> {
278
+ const requestContextPromise = this.requestFactory.endLiveActivity(appId, activityId, subscriptionId, _options);
279
+
280
+ // build promise chain
281
+ let middlewarePreObservable = from<RequestContext>(requestContextPromise);
282
+ for (let middleware of this.configuration.middleware) {
283
+ middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
284
+ }
285
+
286
+ return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
287
+ pipe(mergeMap((response: ResponseContext) => {
288
+ let middlewarePostObservable = of(response);
289
+ for (let middleware of this.configuration.middleware) {
290
+ middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
291
+ }
292
+ return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.endLiveActivity(rsp)));
293
+ }));
294
+ }
295
+
245
296
  /**
246
297
  * Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App\'s REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | --- | --- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | --- | --- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. |
247
298
  * CSV export
@@ -497,6 +548,32 @@ export class ObservableDefaultApi {
497
548
  }));
498
549
  }
499
550
 
551
+ /**
552
+ * Updates a specified live activity.
553
+ * Update a Live Activity via Push
554
+ * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
555
+ * @param activityId Live Activity record ID
556
+ * @param updateLiveActivityRequest
557
+ */
558
+ public updateLiveActivity(appId: string, activityId: string, updateLiveActivityRequest: UpdateLiveActivityRequest, _options?: Configuration): Observable<UpdateLiveActivitySuccessResponse> {
559
+ const requestContextPromise = this.requestFactory.updateLiveActivity(appId, activityId, updateLiveActivityRequest, _options);
560
+
561
+ // build promise chain
562
+ let middlewarePreObservable = from<RequestContext>(requestContextPromise);
563
+ for (let middleware of this.configuration.middleware) {
564
+ middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
565
+ }
566
+
567
+ return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
568
+ pipe(mergeMap((response: ResponseContext) => {
569
+ let middlewarePostObservable = of(response);
570
+ for (let middleware of this.configuration.middleware) {
571
+ middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
572
+ }
573
+ return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateLiveActivity(rsp)));
574
+ }));
575
+ }
576
+
500
577
  /**
501
578
  * Update an existing device in one of your OneSignal apps
502
579
  * Edit device
@@ -3,21 +3,19 @@ import * as models from '../models/all';
3
3
  import { Configuration} from '../configuration'
4
4
 
5
5
  import { App } from '../models/App';
6
+ import { BadRequestError } from '../models/BadRequestError';
6
7
  import { BasicNotification } from '../models/BasicNotification';
7
8
  import { BasicNotificationAllOf } from '../models/BasicNotificationAllOf';
8
9
  import { BasicNotificationAllOfAndroidBackgroundLayout } from '../models/BasicNotificationAllOfAndroidBackgroundLayout';
10
+ import { BeginLiveActivityRequest } from '../models/BeginLiveActivityRequest';
9
11
  import { Button } from '../models/Button';
10
12
  import { CancelNotificationSuccessResponse } from '../models/CancelNotificationSuccessResponse';
11
- import { CreateNotificationBadRequestResponse } from '../models/CreateNotificationBadRequestResponse';
12
13
  import { CreateNotificationSuccessResponse } from '../models/CreateNotificationSuccessResponse';
13
14
  import { CreatePlayerSuccessResponse } from '../models/CreatePlayerSuccessResponse';
14
- import { CreateSegmentBadRequestResponse } from '../models/CreateSegmentBadRequestResponse';
15
15
  import { CreateSegmentConflictResponse } from '../models/CreateSegmentConflictResponse';
16
16
  import { CreateSegmentSuccessResponse } from '../models/CreateSegmentSuccessResponse';
17
- import { DeletePlayerBadRequestResponse } from '../models/DeletePlayerBadRequestResponse';
18
17
  import { DeletePlayerNotFoundResponse } from '../models/DeletePlayerNotFoundResponse';
19
18
  import { DeletePlayerSuccessResponse } from '../models/DeletePlayerSuccessResponse';
20
- import { DeleteSegmentBadRequestResponse } from '../models/DeleteSegmentBadRequestResponse';
21
19
  import { DeleteSegmentNotFoundResponse } from '../models/DeleteSegmentNotFoundResponse';
22
20
  import { DeleteSegmentSuccessResponse } from '../models/DeleteSegmentSuccessResponse';
23
21
  import { DeliveryData } from '../models/DeliveryData';
@@ -30,7 +28,6 @@ import { InvalidIdentifierError } from '../models/InvalidIdentifierError';
30
28
  import { Notification } from '../models/Notification';
31
29
  import { Notification200Errors } from '../models/Notification200Errors';
32
30
  import { NotificationAllOf } from '../models/NotificationAllOf';
33
- import { NotificationHistoryBadRequestResponse } from '../models/NotificationHistoryBadRequestResponse';
34
31
  import { NotificationHistorySuccessResponse } from '../models/NotificationHistorySuccessResponse';
35
32
  import { NotificationSlice } from '../models/NotificationSlice';
36
33
  import { NotificationTarget } from '../models/NotificationTarget';
@@ -49,6 +46,8 @@ import { Purchase } from '../models/Purchase';
49
46
  import { Segment } from '../models/Segment';
50
47
  import { SegmentNotificationTarget } from '../models/SegmentNotificationTarget';
51
48
  import { StringMap } from '../models/StringMap';
49
+ import { UpdateLiveActivityRequest } from '../models/UpdateLiveActivityRequest';
50
+ import { UpdateLiveActivitySuccessResponse } from '../models/UpdateLiveActivitySuccessResponse';
52
51
  import { UpdatePlayerSuccessResponse } from '../models/UpdatePlayerSuccessResponse';
53
52
  import { UpdatePlayerTagsRequestBody } from '../models/UpdatePlayerTagsRequestBody';
54
53
  import { UpdatePlayerTagsSuccessResponse } from '../models/UpdatePlayerTagsSuccessResponse';
@@ -66,6 +65,18 @@ export class PromiseDefaultApi {
66
65
  this.api = new ObservableDefaultApi(configuration, requestFactory, responseProcessor);
67
66
  }
68
67
 
68
+ /**
69
+ * Starts a Live Activity
70
+ * Start Live Activity
71
+ * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
72
+ * @param activityId Live Activity record ID
73
+ * @param beginLiveActivityRequest
74
+ */
75
+ public beginLiveActivity(appId: string, activityId: string, beginLiveActivityRequest: BeginLiveActivityRequest, _options?: Configuration): Promise<void> {
76
+ const result = this.api.beginLiveActivity(appId, activityId, beginLiveActivityRequest, _options);
77
+ return result.toPromise();
78
+ }
79
+
69
80
  /**
70
81
  * Used to stop a scheduled or currently outgoing notification
71
82
  * Stop a scheduled or currently outgoing notification
@@ -140,6 +151,18 @@ export class PromiseDefaultApi {
140
151
  return result.toPromise();
141
152
  }
142
153
 
154
+ /**
155
+ * Stops a Live Activity
156
+ * Stop Live Activity
157
+ * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
158
+ * @param activityId Live Activity record ID
159
+ * @param subscriptionId Subscription ID
160
+ */
161
+ public endLiveActivity(appId: string, activityId: string, subscriptionId: string, _options?: Configuration): Promise<void> {
162
+ const result = this.api.endLiveActivity(appId, activityId, subscriptionId, _options);
163
+ return result.toPromise();
164
+ }
165
+
143
166
  /**
144
167
  * Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App\'s REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | --- | --- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | --- | --- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. |
145
168
  * CSV export
@@ -255,6 +278,18 @@ export class PromiseDefaultApi {
255
278
  return result.toPromise();
256
279
  }
257
280
 
281
+ /**
282
+ * Updates a specified live activity.
283
+ * Update a Live Activity via Push
284
+ * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
285
+ * @param activityId Live Activity record ID
286
+ * @param updateLiveActivityRequest
287
+ */
288
+ public updateLiveActivity(appId: string, activityId: string, updateLiveActivityRequest: UpdateLiveActivityRequest, _options?: Configuration): Promise<UpdateLiveActivitySuccessResponse> {
289
+ const result = this.api.updateLiveActivity(appId, activityId, updateLiveActivityRequest, _options);
290
+ return result.toPromise();
291
+ }
292
+
258
293
  /**
259
294
  * Update an existing device in one of your OneSignal apps
260
295
  * Edit device