@onesignal/node-onesignal 1.0.0-beta3 → 1.0.0-beta5
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/ISSUE_TEMPLATE/ask-question.yml +25 -0
- package/.github/ISSUE_TEMPLATE/bug-report.yml +51 -0
- package/.github/ISSUE_TEMPLATE/general-feedback.yml +25 -0
- package/.github/pull_request_template.md +44 -0
- package/.github/workflows/npm_deploy.yml +21 -0
- package/CHANGELOG.md +26 -0
- package/DefaultApi.md +1232 -0
- package/LICENSE +24 -0
- package/README.md +205 -102
- package/RELEASE_INSTRUCTIONS.md +2 -0
- package/apis/DefaultApi.ts +519 -532
- package/apis/baseapi.ts +4 -4
- package/apis/exception.ts +4 -3
- package/auth/auth.ts +4 -1
- package/configuration.ts +21 -2
- package/http/http.ts +26 -26
- package/index.ts +1 -0
- package/middleware.ts +1 -1
- package/models/App.ts +8 -8
- package/models/BasicNotification.ts +1019 -0
- package/models/BasicNotificationAllOf.ts +897 -0
- package/models/{NotificationAllOfAndroidBackgroundLayout.ts → BasicNotificationAllOfAndroidBackgroundLayout.ts} +4 -4
- package/models/Button.ts +2 -2
- package/models/CancelNotificationSuccessResponse.ts +31 -0
- package/models/{InlineResponse400.ts → CreateNotificationBadRequestResponse.ts} +4 -4
- package/models/{InlineResponse200.ts → CreateNotificationSuccessResponse.ts} +7 -6
- package/models/{InlineResponse2004.ts → CreatePlayerSuccessResponse.ts} +4 -4
- package/models/CreateSegmentBadRequestResponse.ts +38 -0
- package/models/{InlineResponse409.ts → CreateSegmentConflictResponse.ts} +4 -4
- package/models/{InlineResponse201.ts → CreateSegmentSuccessResponse.ts} +4 -4
- package/models/DeletePlayerBadRequestResponse.ts +31 -0
- package/models/DeletePlayerNotFoundResponse.ts +31 -0
- package/models/{InlineResponse2003.ts → DeletePlayerSuccessResponse.ts} +4 -4
- package/models/{InlineResponse4002.ts → DeleteSegmentBadRequestResponse.ts} +4 -4
- package/models/DeleteSegmentNotFoundResponse.ts +31 -0
- package/models/DeleteSegmentSuccessResponse.ts +31 -0
- package/models/DeliveryData.ts +17 -2
- package/models/ExportPlayersRequestBody.ts +5 -5
- package/models/{InlineResponse2005.ts → ExportPlayersSuccessResponse.ts} +4 -4
- package/models/Filter.ts +4 -4
- package/models/FilterExpressions.ts +4 -4
- package/models/FilterNotificationTarget.ts +2 -2
- package/models/GetNotificationRequestBody.ts +2 -2
- package/models/InvalidIdentifierError.ts +44 -0
- package/models/Notification.ts +72 -174
- package/models/Notification200Errors.ts +45 -0
- package/models/NotificationAllOf.ts +3 -858
- package/models/{InlineResponse4001.ts → NotificationHistoryBadRequestResponse.ts} +4 -4
- package/models/{InlineResponse2002.ts → NotificationHistorySuccessResponse.ts} +6 -6
- package/models/NotificationSlice.ts +5 -5
- package/models/NotificationTarget.ts +3 -124
- package/models/NotificationWithMeta.ts +1127 -0
- package/models/NotificationWithMetaAllOf.ts +132 -0
- package/models/ObjectSerializer.ts +97 -46
- package/models/Operator.ts +2 -2
- package/models/OutcomeData.ts +2 -2
- package/models/OutcomesData.ts +32 -0
- package/models/PlatformDeliveryData.ts +18 -2
- package/models/PlatformDeliveryDataEmailAllOf.ts +94 -0
- package/models/PlatformDeliveryDataSmsAllOf.ts +54 -0
- package/models/Player.ts +14 -14
- package/models/PlayerNotificationTarget.ts +3 -3
- package/models/PlayerSlice.ts +2 -2
- package/models/Purchase.ts +2 -2
- package/models/Segment.ts +3 -3
- package/models/SegmentNotificationTarget.ts +2 -2
- package/models/StringMap.ts +3 -3
- package/models/{InlineResponse2001.ts → UpdatePlayerSuccessResponse.ts} +6 -6
- package/models/UpdatePlayerTagsRequestBody.ts +4 -4
- package/models/UpdatePlayerTagsSuccessResponse.ts +31 -0
- package/models/all.ts +28 -13
- package/package.json +14 -9
- package/tsconfig.json +1 -2
- package/types/ObjectParamAPI.ts +101 -86
- package/types/ObservableAPI.ts +116 -101
- package/types/PromiseAPI.ts +97 -82
- package/util.ts +10 -1
- package/git_push.sh +0 -52
package/types/ObjectParamAPI.ts
CHANGED
|
@@ -3,32 +3,45 @@ import * as models from '../models/all';
|
|
|
3
3
|
import { Configuration} from '../configuration'
|
|
4
4
|
|
|
5
5
|
import { App } from '../models/App';
|
|
6
|
+
import { BasicNotification } from '../models/BasicNotification';
|
|
7
|
+
import { BasicNotificationAllOf } from '../models/BasicNotificationAllOf';
|
|
8
|
+
import { BasicNotificationAllOfAndroidBackgroundLayout } from '../models/BasicNotificationAllOfAndroidBackgroundLayout';
|
|
6
9
|
import { Button } from '../models/Button';
|
|
10
|
+
import { CancelNotificationSuccessResponse } from '../models/CancelNotificationSuccessResponse';
|
|
11
|
+
import { CreateNotificationBadRequestResponse } from '../models/CreateNotificationBadRequestResponse';
|
|
12
|
+
import { CreateNotificationSuccessResponse } from '../models/CreateNotificationSuccessResponse';
|
|
13
|
+
import { CreatePlayerSuccessResponse } from '../models/CreatePlayerSuccessResponse';
|
|
14
|
+
import { CreateSegmentBadRequestResponse } from '../models/CreateSegmentBadRequestResponse';
|
|
15
|
+
import { CreateSegmentConflictResponse } from '../models/CreateSegmentConflictResponse';
|
|
16
|
+
import { CreateSegmentSuccessResponse } from '../models/CreateSegmentSuccessResponse';
|
|
17
|
+
import { DeletePlayerBadRequestResponse } from '../models/DeletePlayerBadRequestResponse';
|
|
18
|
+
import { DeletePlayerNotFoundResponse } from '../models/DeletePlayerNotFoundResponse';
|
|
19
|
+
import { DeletePlayerSuccessResponse } from '../models/DeletePlayerSuccessResponse';
|
|
20
|
+
import { DeleteSegmentBadRequestResponse } from '../models/DeleteSegmentBadRequestResponse';
|
|
21
|
+
import { DeleteSegmentNotFoundResponse } from '../models/DeleteSegmentNotFoundResponse';
|
|
22
|
+
import { DeleteSegmentSuccessResponse } from '../models/DeleteSegmentSuccessResponse';
|
|
7
23
|
import { DeliveryData } from '../models/DeliveryData';
|
|
8
24
|
import { ExportPlayersRequestBody } from '../models/ExportPlayersRequestBody';
|
|
25
|
+
import { ExportPlayersSuccessResponse } from '../models/ExportPlayersSuccessResponse';
|
|
9
26
|
import { Filter } from '../models/Filter';
|
|
10
27
|
import { FilterExpressions } from '../models/FilterExpressions';
|
|
11
|
-
import { FilterNotificationTarget } from '../models/FilterNotificationTarget';
|
|
12
28
|
import { GetNotificationRequestBody } from '../models/GetNotificationRequestBody';
|
|
13
|
-
import {
|
|
14
|
-
import { InlineResponse2001 } from '../models/InlineResponse2001';
|
|
15
|
-
import { InlineResponse2002 } from '../models/InlineResponse2002';
|
|
16
|
-
import { InlineResponse2003 } from '../models/InlineResponse2003';
|
|
17
|
-
import { InlineResponse2004 } from '../models/InlineResponse2004';
|
|
18
|
-
import { InlineResponse2005 } from '../models/InlineResponse2005';
|
|
19
|
-
import { InlineResponse201 } from '../models/InlineResponse201';
|
|
20
|
-
import { InlineResponse400 } from '../models/InlineResponse400';
|
|
21
|
-
import { InlineResponse4001 } from '../models/InlineResponse4001';
|
|
22
|
-
import { InlineResponse4002 } from '../models/InlineResponse4002';
|
|
23
|
-
import { InlineResponse409 } from '../models/InlineResponse409';
|
|
29
|
+
import { InvalidIdentifierError } from '../models/InvalidIdentifierError';
|
|
24
30
|
import { Notification } from '../models/Notification';
|
|
31
|
+
import { Notification200Errors } from '../models/Notification200Errors';
|
|
25
32
|
import { NotificationAllOf } from '../models/NotificationAllOf';
|
|
26
|
-
import {
|
|
33
|
+
import { NotificationHistoryBadRequestResponse } from '../models/NotificationHistoryBadRequestResponse';
|
|
34
|
+
import { NotificationHistorySuccessResponse } from '../models/NotificationHistorySuccessResponse';
|
|
27
35
|
import { NotificationSlice } from '../models/NotificationSlice';
|
|
28
36
|
import { NotificationTarget } from '../models/NotificationTarget';
|
|
37
|
+
import { NotificationWithMeta } from '../models/NotificationWithMeta';
|
|
38
|
+
import { NotificationWithMetaAllOf } from '../models/NotificationWithMetaAllOf';
|
|
29
39
|
import { Operator } from '../models/Operator';
|
|
30
40
|
import { OutcomeData } from '../models/OutcomeData';
|
|
41
|
+
import { OutcomesData } from '../models/OutcomesData';
|
|
31
42
|
import { PlatformDeliveryData } from '../models/PlatformDeliveryData';
|
|
43
|
+
import { PlatformDeliveryDataEmailAllOf } from '../models/PlatformDeliveryDataEmailAllOf';
|
|
44
|
+
import { PlatformDeliveryDataSmsAllOf } from '../models/PlatformDeliveryDataSmsAllOf';
|
|
32
45
|
import { Player } from '../models/Player';
|
|
33
46
|
import { PlayerNotificationTarget } from '../models/PlayerNotificationTarget';
|
|
34
47
|
import { PlayerSlice } from '../models/PlayerSlice';
|
|
@@ -36,7 +49,9 @@ import { Purchase } from '../models/Purchase';
|
|
|
36
49
|
import { Segment } from '../models/Segment';
|
|
37
50
|
import { SegmentNotificationTarget } from '../models/SegmentNotificationTarget';
|
|
38
51
|
import { StringMap } from '../models/StringMap';
|
|
52
|
+
import { UpdatePlayerSuccessResponse } from '../models/UpdatePlayerSuccessResponse';
|
|
39
53
|
import { UpdatePlayerTagsRequestBody } from '../models/UpdatePlayerTagsRequestBody';
|
|
54
|
+
import { UpdatePlayerTagsSuccessResponse } from '../models/UpdatePlayerTagsSuccessResponse';
|
|
40
55
|
|
|
41
56
|
import { ObservableDefaultApi } from "./ObservableAPI";
|
|
42
57
|
import { DefaultApiRequestFactory, DefaultApiResponseProcessor} from "../apis/DefaultApi";
|
|
@@ -47,13 +62,13 @@ export interface DefaultApiCancelNotificationRequest {
|
|
|
47
62
|
* @type string
|
|
48
63
|
* @memberof DefaultApicancelNotification
|
|
49
64
|
*/
|
|
50
|
-
|
|
65
|
+
appId: string
|
|
51
66
|
/**
|
|
52
67
|
*
|
|
53
68
|
* @type string
|
|
54
69
|
* @memberof DefaultApicancelNotification
|
|
55
70
|
*/
|
|
56
|
-
|
|
71
|
+
notificationId: string
|
|
57
72
|
}
|
|
58
73
|
|
|
59
74
|
export interface DefaultApiCreateAppRequest {
|
|
@@ -89,7 +104,7 @@ export interface DefaultApiCreateSegmentsRequest {
|
|
|
89
104
|
* @type string
|
|
90
105
|
* @memberof DefaultApicreateSegments
|
|
91
106
|
*/
|
|
92
|
-
|
|
107
|
+
appId: string
|
|
93
108
|
/**
|
|
94
109
|
*
|
|
95
110
|
* @type Segment
|
|
@@ -104,13 +119,13 @@ export interface DefaultApiDeletePlayerRequest {
|
|
|
104
119
|
* @type string
|
|
105
120
|
* @memberof DefaultApideletePlayer
|
|
106
121
|
*/
|
|
107
|
-
|
|
122
|
+
appId: string
|
|
108
123
|
/**
|
|
109
124
|
* The OneSignal player_id
|
|
110
125
|
* @type string
|
|
111
126
|
* @memberof DefaultApideletePlayer
|
|
112
127
|
*/
|
|
113
|
-
|
|
128
|
+
playerId: string
|
|
114
129
|
}
|
|
115
130
|
|
|
116
131
|
export interface DefaultApiDeleteSegmentsRequest {
|
|
@@ -119,13 +134,13 @@ export interface DefaultApiDeleteSegmentsRequest {
|
|
|
119
134
|
* @type string
|
|
120
135
|
* @memberof DefaultApideleteSegments
|
|
121
136
|
*/
|
|
122
|
-
|
|
137
|
+
appId: string
|
|
123
138
|
/**
|
|
124
139
|
* The segment_id can be found in the URL of the segment when viewing it in the dashboard.
|
|
125
140
|
* @type string
|
|
126
141
|
* @memberof DefaultApideleteSegments
|
|
127
142
|
*/
|
|
128
|
-
|
|
143
|
+
segmentId: string
|
|
129
144
|
}
|
|
130
145
|
|
|
131
146
|
export interface DefaultApiExportPlayersRequest {
|
|
@@ -134,13 +149,13 @@ export interface DefaultApiExportPlayersRequest {
|
|
|
134
149
|
* @type string
|
|
135
150
|
* @memberof DefaultApiexportPlayers
|
|
136
151
|
*/
|
|
137
|
-
|
|
152
|
+
appId: string
|
|
138
153
|
/**
|
|
139
154
|
*
|
|
140
155
|
* @type ExportPlayersRequestBody
|
|
141
156
|
* @memberof DefaultApiexportPlayers
|
|
142
157
|
*/
|
|
143
|
-
|
|
158
|
+
exportPlayersRequestBody?: ExportPlayersRequestBody
|
|
144
159
|
}
|
|
145
160
|
|
|
146
161
|
export interface DefaultApiGetAppRequest {
|
|
@@ -149,7 +164,7 @@ export interface DefaultApiGetAppRequest {
|
|
|
149
164
|
* @type string
|
|
150
165
|
* @memberof DefaultApigetApp
|
|
151
166
|
*/
|
|
152
|
-
|
|
167
|
+
appId: string
|
|
153
168
|
}
|
|
154
169
|
|
|
155
170
|
export interface DefaultApiGetAppsRequest {
|
|
@@ -161,13 +176,13 @@ export interface DefaultApiGetNotificationRequest {
|
|
|
161
176
|
* @type string
|
|
162
177
|
* @memberof DefaultApigetNotification
|
|
163
178
|
*/
|
|
164
|
-
|
|
179
|
+
appId: string
|
|
165
180
|
/**
|
|
166
181
|
*
|
|
167
182
|
* @type string
|
|
168
183
|
* @memberof DefaultApigetNotification
|
|
169
184
|
*/
|
|
170
|
-
|
|
185
|
+
notificationId: string
|
|
171
186
|
}
|
|
172
187
|
|
|
173
188
|
export interface DefaultApiGetNotificationHistoryRequest {
|
|
@@ -176,13 +191,13 @@ export interface DefaultApiGetNotificationHistoryRequest {
|
|
|
176
191
|
* @type string
|
|
177
192
|
* @memberof DefaultApigetNotificationHistory
|
|
178
193
|
*/
|
|
179
|
-
|
|
194
|
+
notificationId: string
|
|
180
195
|
/**
|
|
181
196
|
*
|
|
182
197
|
* @type GetNotificationRequestBody
|
|
183
198
|
* @memberof DefaultApigetNotificationHistory
|
|
184
199
|
*/
|
|
185
|
-
|
|
200
|
+
getNotificationRequestBody: GetNotificationRequestBody
|
|
186
201
|
}
|
|
187
202
|
|
|
188
203
|
export interface DefaultApiGetNotificationsRequest {
|
|
@@ -191,13 +206,13 @@ export interface DefaultApiGetNotificationsRequest {
|
|
|
191
206
|
* @type string
|
|
192
207
|
* @memberof DefaultApigetNotifications
|
|
193
208
|
*/
|
|
194
|
-
|
|
209
|
+
appId: string
|
|
195
210
|
/**
|
|
196
211
|
* How many notifications to return. Max is 50. Default is 50.
|
|
197
|
-
* @type
|
|
212
|
+
* @type number
|
|
198
213
|
* @memberof DefaultApigetNotifications
|
|
199
214
|
*/
|
|
200
|
-
limit?:
|
|
215
|
+
limit?: number
|
|
201
216
|
/**
|
|
202
217
|
* 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.
|
|
203
218
|
* @type number
|
|
@@ -218,37 +233,37 @@ export interface DefaultApiGetOutcomesRequest {
|
|
|
218
233
|
* @type string
|
|
219
234
|
* @memberof DefaultApigetOutcomes
|
|
220
235
|
*/
|
|
221
|
-
|
|
236
|
+
appId: string
|
|
222
237
|
/**
|
|
223
|
-
* 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
|
|
238
|
+
* 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
|
|
224
239
|
* @type string
|
|
225
240
|
* @memberof DefaultApigetOutcomes
|
|
226
241
|
*/
|
|
227
|
-
|
|
242
|
+
outcomeNames: string
|
|
228
243
|
/**
|
|
229
|
-
* 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
|
|
244
|
+
* 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.
|
|
230
245
|
* @type string
|
|
231
246
|
* @memberof DefaultApigetOutcomes
|
|
232
247
|
*/
|
|
233
|
-
|
|
248
|
+
outcomeNames2?: string
|
|
234
249
|
/**
|
|
235
250
|
* 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.
|
|
236
251
|
* @type string
|
|
237
252
|
* @memberof DefaultApigetOutcomes
|
|
238
253
|
*/
|
|
239
|
-
|
|
254
|
+
outcomeTimeRange?: string
|
|
240
255
|
/**
|
|
241
|
-
* Optional Platform id. Refer device
|
|
256
|
+
* 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.
|
|
242
257
|
* @type string
|
|
243
258
|
* @memberof DefaultApigetOutcomes
|
|
244
259
|
*/
|
|
245
|
-
|
|
260
|
+
outcomePlatforms?: string
|
|
246
261
|
/**
|
|
247
262
|
* 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.
|
|
248
263
|
* @type string
|
|
249
264
|
* @memberof DefaultApigetOutcomes
|
|
250
265
|
*/
|
|
251
|
-
|
|
266
|
+
outcomeAttribution?: string
|
|
252
267
|
}
|
|
253
268
|
|
|
254
269
|
export interface DefaultApiGetPlayerRequest {
|
|
@@ -257,19 +272,19 @@ export interface DefaultApiGetPlayerRequest {
|
|
|
257
272
|
* @type string
|
|
258
273
|
* @memberof DefaultApigetPlayer
|
|
259
274
|
*/
|
|
260
|
-
|
|
275
|
+
appId: string
|
|
261
276
|
/**
|
|
262
|
-
* Player
|
|
277
|
+
* Player\'s OneSignal ID
|
|
263
278
|
* @type string
|
|
264
279
|
* @memberof DefaultApigetPlayer
|
|
265
280
|
*/
|
|
266
|
-
|
|
281
|
+
playerId: string
|
|
267
282
|
/**
|
|
268
283
|
* Email - Only required if you have enabled Identity Verification and device_type is email (11).
|
|
269
284
|
* @type string
|
|
270
285
|
* @memberof DefaultApigetPlayer
|
|
271
286
|
*/
|
|
272
|
-
|
|
287
|
+
emailAuthHash?: string
|
|
273
288
|
}
|
|
274
289
|
|
|
275
290
|
export interface DefaultApiGetPlayersRequest {
|
|
@@ -278,13 +293,13 @@ export interface DefaultApiGetPlayersRequest {
|
|
|
278
293
|
* @type string
|
|
279
294
|
* @memberof DefaultApigetPlayers
|
|
280
295
|
*/
|
|
281
|
-
|
|
296
|
+
appId: string
|
|
282
297
|
/**
|
|
283
298
|
* How many devices to return. Max is 300. Default is 300
|
|
284
|
-
* @type
|
|
299
|
+
* @type number
|
|
285
300
|
* @memberof DefaultApigetPlayers
|
|
286
301
|
*/
|
|
287
|
-
limit?:
|
|
302
|
+
limit?: number
|
|
288
303
|
/**
|
|
289
304
|
* Result offset. Default is 0. Results are sorted by id;
|
|
290
305
|
* @type number
|
|
@@ -299,7 +314,7 @@ export interface DefaultApiUpdateAppRequest {
|
|
|
299
314
|
* @type string
|
|
300
315
|
* @memberof DefaultApiupdateApp
|
|
301
316
|
*/
|
|
302
|
-
|
|
317
|
+
appId: string
|
|
303
318
|
/**
|
|
304
319
|
*
|
|
305
320
|
* @type App
|
|
@@ -310,11 +325,11 @@ export interface DefaultApiUpdateAppRequest {
|
|
|
310
325
|
|
|
311
326
|
export interface DefaultApiUpdatePlayerRequest {
|
|
312
327
|
/**
|
|
313
|
-
* Player
|
|
328
|
+
* Player\'s OneSignal ID
|
|
314
329
|
* @type string
|
|
315
330
|
* @memberof DefaultApiupdatePlayer
|
|
316
331
|
*/
|
|
317
|
-
|
|
332
|
+
playerId: string
|
|
318
333
|
/**
|
|
319
334
|
*
|
|
320
335
|
* @type Player
|
|
@@ -329,19 +344,19 @@ export interface DefaultApiUpdatePlayerTagsRequest {
|
|
|
329
344
|
* @type string
|
|
330
345
|
* @memberof DefaultApiupdatePlayerTags
|
|
331
346
|
*/
|
|
332
|
-
|
|
347
|
+
appId: string
|
|
333
348
|
/**
|
|
334
349
|
* The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated.
|
|
335
350
|
* @type string
|
|
336
351
|
* @memberof DefaultApiupdatePlayerTags
|
|
337
352
|
*/
|
|
338
|
-
|
|
353
|
+
externalUserId: string
|
|
339
354
|
/**
|
|
340
355
|
*
|
|
341
356
|
* @type UpdatePlayerTagsRequestBody
|
|
342
357
|
* @memberof DefaultApiupdatePlayerTags
|
|
343
358
|
*/
|
|
344
|
-
|
|
359
|
+
updatePlayerTagsRequestBody?: UpdatePlayerTagsRequestBody
|
|
345
360
|
}
|
|
346
361
|
|
|
347
362
|
export class ObjectDefaultApi {
|
|
@@ -356,8 +371,8 @@ export class ObjectDefaultApi {
|
|
|
356
371
|
* Stop a scheduled or currently outgoing notification
|
|
357
372
|
* @param param the request object
|
|
358
373
|
*/
|
|
359
|
-
public cancelNotification(param: DefaultApiCancelNotificationRequest, options?: Configuration): Promise<
|
|
360
|
-
return this.api.cancelNotification(param.
|
|
374
|
+
public cancelNotification(param: DefaultApiCancelNotificationRequest, options?: Configuration): Promise<CancelNotificationSuccessResponse> {
|
|
375
|
+
return this.api.cancelNotification(param.appId, param.notificationId, options).toPromise();
|
|
361
376
|
}
|
|
362
377
|
|
|
363
378
|
/**
|
|
@@ -374,26 +389,26 @@ export class ObjectDefaultApi {
|
|
|
374
389
|
* Create notification
|
|
375
390
|
* @param param the request object
|
|
376
391
|
*/
|
|
377
|
-
public createNotification(param: DefaultApiCreateNotificationRequest, options?: Configuration): Promise<
|
|
392
|
+
public createNotification(param: DefaultApiCreateNotificationRequest, options?: Configuration): Promise<CreateNotificationSuccessResponse> {
|
|
378
393
|
return this.api.createNotification(param.notification, options).toPromise();
|
|
379
394
|
}
|
|
380
395
|
|
|
381
396
|
/**
|
|
382
|
-
* Register a new device to one of your OneSignal apps
|
|
397
|
+
* Register a new device to one of your OneSignal apps 🚧 Don\'t use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won\'t work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. 🚧 iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds.
|
|
383
398
|
* Add a device
|
|
384
399
|
* @param param the request object
|
|
385
400
|
*/
|
|
386
|
-
public createPlayer(param: DefaultApiCreatePlayerRequest, options?: Configuration): Promise<
|
|
401
|
+
public createPlayer(param: DefaultApiCreatePlayerRequest, options?: Configuration): Promise<CreatePlayerSuccessResponse> {
|
|
387
402
|
return this.api.createPlayer(param.player, options).toPromise();
|
|
388
403
|
}
|
|
389
404
|
|
|
390
405
|
/**
|
|
391
|
-
* Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's.
|
|
406
|
+
* Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator\'s. 🚧 Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit.
|
|
392
407
|
* Create Segments
|
|
393
408
|
* @param param the request object
|
|
394
409
|
*/
|
|
395
|
-
public createSegments(param: DefaultApiCreateSegmentsRequest, options?: Configuration): Promise<
|
|
396
|
-
return this.api.createSegments(param.
|
|
410
|
+
public createSegments(param: DefaultApiCreateSegmentsRequest, options?: Configuration): Promise<CreateSegmentSuccessResponse> {
|
|
411
|
+
return this.api.createSegments(param.appId, param.segment, options).toPromise();
|
|
397
412
|
}
|
|
398
413
|
|
|
399
414
|
/**
|
|
@@ -401,8 +416,8 @@ export class ObjectDefaultApi {
|
|
|
401
416
|
* Delete a user record
|
|
402
417
|
* @param param the request object
|
|
403
418
|
*/
|
|
404
|
-
public deletePlayer(param: DefaultApiDeletePlayerRequest, options?: Configuration): Promise<
|
|
405
|
-
return this.api.deletePlayer(param.
|
|
419
|
+
public deletePlayer(param: DefaultApiDeletePlayerRequest, options?: Configuration): Promise<DeletePlayerSuccessResponse> {
|
|
420
|
+
return this.api.deletePlayer(param.appId, param.playerId, options).toPromise();
|
|
406
421
|
}
|
|
407
422
|
|
|
408
423
|
/**
|
|
@@ -410,17 +425,17 @@ export class ObjectDefaultApi {
|
|
|
410
425
|
* Delete Segments
|
|
411
426
|
* @param param the request object
|
|
412
427
|
*/
|
|
413
|
-
public deleteSegments(param: DefaultApiDeleteSegmentsRequest, options?: Configuration): Promise<
|
|
414
|
-
return this.api.deleteSegments(param.
|
|
428
|
+
public deleteSegments(param: DefaultApiDeleteSegmentsRequest, options?: Configuration): Promise<DeleteSegmentSuccessResponse> {
|
|
429
|
+
return this.api.deleteSegments(param.appId, param.segmentId, options).toPromise();
|
|
415
430
|
}
|
|
416
431
|
|
|
417
432
|
/**
|
|
418
|
-
* 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.
|
|
433
|
+
* 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. |
|
|
419
434
|
* CSV export
|
|
420
435
|
* @param param the request object
|
|
421
436
|
*/
|
|
422
|
-
public exportPlayers(param: DefaultApiExportPlayersRequest, options?: Configuration): Promise<
|
|
423
|
-
return this.api.exportPlayers(param.
|
|
437
|
+
public exportPlayers(param: DefaultApiExportPlayersRequest, options?: Configuration): Promise<ExportPlayersSuccessResponse> {
|
|
438
|
+
return this.api.exportPlayers(param.appId, param.exportPlayersRequestBody, options).toPromise();
|
|
424
439
|
}
|
|
425
440
|
|
|
426
441
|
/**
|
|
@@ -429,7 +444,7 @@ export class ObjectDefaultApi {
|
|
|
429
444
|
* @param param the request object
|
|
430
445
|
*/
|
|
431
446
|
public getApp(param: DefaultApiGetAppRequest, options?: Configuration): Promise<App> {
|
|
432
|
-
return this.api.getApp(param.
|
|
447
|
+
return this.api.getApp(param.appId, options).toPromise();
|
|
433
448
|
}
|
|
434
449
|
|
|
435
450
|
/**
|
|
@@ -437,7 +452,7 @@ export class ObjectDefaultApi {
|
|
|
437
452
|
* View apps
|
|
438
453
|
* @param param the request object
|
|
439
454
|
*/
|
|
440
|
-
public getApps(param: DefaultApiGetAppsRequest, options?: Configuration): Promise<
|
|
455
|
+
public getApps(param: DefaultApiGetAppsRequest = {}, options?: Configuration): Promise<Array<App>> {
|
|
441
456
|
return this.api.getApps( options).toPromise();
|
|
442
457
|
}
|
|
443
458
|
|
|
@@ -446,17 +461,17 @@ export class ObjectDefaultApi {
|
|
|
446
461
|
* View notification
|
|
447
462
|
* @param param the request object
|
|
448
463
|
*/
|
|
449
|
-
public getNotification(param: DefaultApiGetNotificationRequest, options?: Configuration): Promise<
|
|
450
|
-
return this.api.getNotification(param.
|
|
464
|
+
public getNotification(param: DefaultApiGetNotificationRequest, options?: Configuration): Promise<NotificationWithMeta> {
|
|
465
|
+
return this.api.getNotification(param.appId, param.notificationId, options).toPromise();
|
|
451
466
|
}
|
|
452
467
|
|
|
453
468
|
/**
|
|
454
|
-
* -> 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.
|
|
469
|
+
* -> 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.
|
|
455
470
|
* Notification History
|
|
456
471
|
* @param param the request object
|
|
457
472
|
*/
|
|
458
|
-
public getNotificationHistory(param: DefaultApiGetNotificationHistoryRequest, options?: Configuration): Promise<
|
|
459
|
-
return this.api.getNotificationHistory(param.
|
|
473
|
+
public getNotificationHistory(param: DefaultApiGetNotificationHistoryRequest, options?: Configuration): Promise<NotificationHistorySuccessResponse> {
|
|
474
|
+
return this.api.getNotificationHistory(param.notificationId, param.getNotificationRequestBody, options).toPromise();
|
|
460
475
|
}
|
|
461
476
|
|
|
462
477
|
/**
|
|
@@ -465,16 +480,16 @@ export class ObjectDefaultApi {
|
|
|
465
480
|
* @param param the request object
|
|
466
481
|
*/
|
|
467
482
|
public getNotifications(param: DefaultApiGetNotificationsRequest, options?: Configuration): Promise<NotificationSlice> {
|
|
468
|
-
return this.api.getNotifications(param.
|
|
483
|
+
return this.api.getNotifications(param.appId, param.limit, param.offset, param.kind, options).toPromise();
|
|
469
484
|
}
|
|
470
485
|
|
|
471
486
|
/**
|
|
472
|
-
* View the details of all the outcomes associated with your app
|
|
487
|
+
* 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.
|
|
473
488
|
* View Outcomes
|
|
474
489
|
* @param param the request object
|
|
475
490
|
*/
|
|
476
|
-
public getOutcomes(param: DefaultApiGetOutcomesRequest, options?: Configuration): Promise<
|
|
477
|
-
return this.api.getOutcomes(param.
|
|
491
|
+
public getOutcomes(param: DefaultApiGetOutcomesRequest, options?: Configuration): Promise<OutcomesData> {
|
|
492
|
+
return this.api.getOutcomes(param.appId, param.outcomeNames, param.outcomeNames2, param.outcomeTimeRange, param.outcomePlatforms, param.outcomeAttribution, options).toPromise();
|
|
478
493
|
}
|
|
479
494
|
|
|
480
495
|
/**
|
|
@@ -483,7 +498,7 @@ export class ObjectDefaultApi {
|
|
|
483
498
|
* @param param the request object
|
|
484
499
|
*/
|
|
485
500
|
public getPlayer(param: DefaultApiGetPlayerRequest, options?: Configuration): Promise<Player> {
|
|
486
|
-
return this.api.getPlayer(param.
|
|
501
|
+
return this.api.getPlayer(param.appId, param.playerId, param.emailAuthHash, options).toPromise();
|
|
487
502
|
}
|
|
488
503
|
|
|
489
504
|
/**
|
|
@@ -492,7 +507,7 @@ export class ObjectDefaultApi {
|
|
|
492
507
|
* @param param the request object
|
|
493
508
|
*/
|
|
494
509
|
public getPlayers(param: DefaultApiGetPlayersRequest, options?: Configuration): Promise<PlayerSlice> {
|
|
495
|
-
return this.api.getPlayers(param.
|
|
510
|
+
return this.api.getPlayers(param.appId, param.limit, param.offset, options).toPromise();
|
|
496
511
|
}
|
|
497
512
|
|
|
498
513
|
/**
|
|
@@ -501,7 +516,7 @@ export class ObjectDefaultApi {
|
|
|
501
516
|
* @param param the request object
|
|
502
517
|
*/
|
|
503
518
|
public updateApp(param: DefaultApiUpdateAppRequest, options?: Configuration): Promise<App> {
|
|
504
|
-
return this.api.updateApp(param.
|
|
519
|
+
return this.api.updateApp(param.appId, param.app, options).toPromise();
|
|
505
520
|
}
|
|
506
521
|
|
|
507
522
|
/**
|
|
@@ -509,17 +524,17 @@ export class ObjectDefaultApi {
|
|
|
509
524
|
* Edit device
|
|
510
525
|
* @param param the request object
|
|
511
526
|
*/
|
|
512
|
-
public updatePlayer(param: DefaultApiUpdatePlayerRequest, options?: Configuration): Promise<
|
|
513
|
-
return this.api.updatePlayer(param.
|
|
527
|
+
public updatePlayer(param: DefaultApiUpdatePlayerRequest, options?: Configuration): Promise<UpdatePlayerSuccessResponse> {
|
|
528
|
+
return this.api.updatePlayer(param.playerId, param.player, options).toPromise();
|
|
514
529
|
}
|
|
515
530
|
|
|
516
531
|
/**
|
|
517
|
-
* Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs.
|
|
532
|
+
* Update an existing device\'s tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device\'s tags. This is only applicable on the Android Mobile App SDKs. 📘 Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" }
|
|
518
533
|
* Edit tags with external user id
|
|
519
534
|
* @param param the request object
|
|
520
535
|
*/
|
|
521
|
-
public updatePlayerTags(param: DefaultApiUpdatePlayerTagsRequest, options?: Configuration): Promise<
|
|
522
|
-
return this.api.updatePlayerTags(param.
|
|
536
|
+
public updatePlayerTags(param: DefaultApiUpdatePlayerTagsRequest, options?: Configuration): Promise<UpdatePlayerTagsSuccessResponse> {
|
|
537
|
+
return this.api.updatePlayerTags(param.appId, param.externalUserId, param.updatePlayerTagsRequestBody, options).toPromise();
|
|
523
538
|
}
|
|
524
539
|
|
|
525
540
|
}
|