@onesignal/node-onesignal 1.0.0-beta7 → 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/.github/workflows/npm_deploy.yml +6 -7
- package/CHANGELOG.md +19 -0
- package/DefaultApi.md +1365 -164
- package/README.md +189 -0
- package/apis/DefaultApi.ts +2041 -423
- package/dist/apis/DefaultApi.d.ts +48 -0
- package/dist/apis/DefaultApi.js +1861 -414
- package/dist/apis/DefaultApi.js.map +1 -1
- package/dist/auth/auth.d.ts +6 -6
- package/dist/auth/auth.js +1 -1
- package/dist/http/http.d.ts +2 -2
- package/dist/http/http.js +1 -1
- package/dist/models/App.d.ts +5 -1
- package/dist/models/App.js +24 -0
- package/dist/models/App.js.map +1 -1
- package/dist/models/BadRequestError.d.ts +17 -0
- package/dist/models/BadRequestError.js +22 -0
- package/dist/models/BadRequestError.js.map +1 -0
- package/dist/models/BasicNotification.d.ts +5 -1
- package/dist/models/BasicNotification.js +12 -0
- package/dist/models/BasicNotification.js.map +1 -1
- package/dist/models/BasicNotificationAllOf.d.ts +1 -1
- package/dist/models/BeginLiveActivityRequest.d.ts +18 -0
- package/dist/models/BeginLiveActivityRequest.js +28 -0
- package/dist/models/BeginLiveActivityRequest.js.map +1 -0
- 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/Filter.d.ts +1 -1
- package/dist/models/FilterExpressions.d.ts +2 -2
- package/dist/models/GetNotificationRequestBody.d.ts +1 -1
- 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 +5 -1
- 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 +5 -1
- package/dist/models/NotificationWithMeta.js +12 -0
- package/dist/models/NotificationWithMeta.js.map +1 -1
- package/dist/models/ObjectSerializer.d.ts +25 -5
- package/dist/models/ObjectSerializer.js +83 -15
- package/dist/models/ObjectSerializer.js.map +1 -1
- package/dist/models/Operator.d.ts +1 -1
- package/dist/models/OutcomeData.d.ts +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/UpdateLiveActivityRequest.d.ts +22 -0
- package/dist/models/UpdateLiveActivityRequest.js +40 -0
- package/dist/models/UpdateLiveActivityRequest.js.map +1 -0
- package/dist/models/UpdateLiveActivitySuccessResponse.d.ts +19 -0
- package/dist/models/UpdateLiveActivitySuccessResponse.js +28 -0
- package/dist/models/UpdateLiveActivitySuccessResponse.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 +25 -5
- package/dist/models/all.js +25 -5
- package/dist/models/all.js.map +1 -1
- package/dist/types/ObjectParamAPI.d.ts +117 -0
- package/dist/types/ObjectParamAPI.js +51 -0
- package/dist/types/ObjectParamAPI.js.map +1 -1
- package/dist/types/ObservableAPI.d.ts +31 -0
- package/dist/types/ObservableAPI.js +464 -56
- package/dist/types/ObservableAPI.js.map +1 -1
- package/dist/types/PromiseAPI.d.ts +31 -0
- package/dist/types/PromiseAPI.js +68 -0
- package/dist/types/PromiseAPI.js.map +1 -1
- package/models/App.ts +41 -1
- package/models/BadRequestError.ts +31 -0
- package/models/BasicNotification.ts +17 -1
- package/models/BasicNotificationAllOf.ts +1 -1
- package/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +1 -1
- package/models/BeginLiveActivityRequest.ts +38 -0
- 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 +89 -21
- 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 +62 -0
- package/models/UpdateLiveActivitySuccessResponse.ts +39 -0
- 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 +25 -5
- package/package.json +3 -3
- package/types/ObjectParamAPI.ts +527 -5
- package/types/ObservableAPI.ts +454 -5
- package/types/PromiseAPI.ts +216 -5
package/types/ObservableAPI.ts
CHANGED
|
@@ -4,21 +4,23 @@ 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 {
|
|
18
|
+
import { CreateSubscriptionRequestBody } from '../models/CreateSubscriptionRequestBody';
|
|
19
|
+
import { CreateUserConflictResponse } from '../models/CreateUserConflictResponse';
|
|
20
|
+
import { CreateUserConflictResponseErrorsInner } from '../models/CreateUserConflictResponseErrorsInner';
|
|
21
|
+
import { CreateUserConflictResponseErrorsItemsMeta } from '../models/CreateUserConflictResponseErrorsItemsMeta';
|
|
19
22
|
import { DeletePlayerNotFoundResponse } from '../models/DeletePlayerNotFoundResponse';
|
|
20
23
|
import { DeletePlayerSuccessResponse } from '../models/DeletePlayerSuccessResponse';
|
|
21
|
-
import { DeleteSegmentBadRequestResponse } from '../models/DeleteSegmentBadRequestResponse';
|
|
22
24
|
import { DeleteSegmentNotFoundResponse } from '../models/DeleteSegmentNotFoundResponse';
|
|
23
25
|
import { DeleteSegmentSuccessResponse } from '../models/DeleteSegmentSuccessResponse';
|
|
24
26
|
import { DeliveryData } from '../models/DeliveryData';
|
|
@@ -27,11 +29,16 @@ import { ExportPlayersSuccessResponse } from '../models/ExportPlayersSuccessResp
|
|
|
27
29
|
import { Filter } from '../models/Filter';
|
|
28
30
|
import { FilterExpressions } from '../models/FilterExpressions';
|
|
29
31
|
import { GetNotificationRequestBody } from '../models/GetNotificationRequestBody';
|
|
32
|
+
import { IdentifyUserConflictResponse } from '../models/IdentifyUserConflictResponse';
|
|
33
|
+
import { IdentifyUserConflictResponseErrorsInner } from '../models/IdentifyUserConflictResponseErrorsInner';
|
|
34
|
+
import { InlineResponse200 } from '../models/InlineResponse200';
|
|
35
|
+
import { InlineResponse2003 } from '../models/InlineResponse2003';
|
|
36
|
+
import { InlineResponse201 } from '../models/InlineResponse201';
|
|
37
|
+
import { InlineResponse202 } from '../models/InlineResponse202';
|
|
30
38
|
import { InvalidIdentifierError } from '../models/InvalidIdentifierError';
|
|
31
39
|
import { Notification } from '../models/Notification';
|
|
32
40
|
import { Notification200Errors } from '../models/Notification200Errors';
|
|
33
41
|
import { NotificationAllOf } from '../models/NotificationAllOf';
|
|
34
|
-
import { NotificationHistoryBadRequestResponse } from '../models/NotificationHistoryBadRequestResponse';
|
|
35
42
|
import { NotificationHistorySuccessResponse } from '../models/NotificationHistorySuccessResponse';
|
|
36
43
|
import { NotificationSlice } from '../models/NotificationSlice';
|
|
37
44
|
import { NotificationTarget } from '../models/NotificationTarget';
|
|
@@ -45,14 +52,27 @@ import { PlatformDeliveryDataEmailAllOf } from '../models/PlatformDeliveryDataEm
|
|
|
45
52
|
import { PlatformDeliveryDataSmsAllOf } from '../models/PlatformDeliveryDataSmsAllOf';
|
|
46
53
|
import { Player } from '../models/Player';
|
|
47
54
|
import { PlayerNotificationTarget } from '../models/PlayerNotificationTarget';
|
|
55
|
+
import { PlayerNotificationTargetIncludeAliases } from '../models/PlayerNotificationTargetIncludeAliases';
|
|
48
56
|
import { PlayerSlice } from '../models/PlayerSlice';
|
|
57
|
+
import { PropertiesDeltas } from '../models/PropertiesDeltas';
|
|
58
|
+
import { PropertiesObject } from '../models/PropertiesObject';
|
|
49
59
|
import { Purchase } from '../models/Purchase';
|
|
50
60
|
import { Segment } from '../models/Segment';
|
|
51
61
|
import { SegmentNotificationTarget } from '../models/SegmentNotificationTarget';
|
|
52
62
|
import { StringMap } from '../models/StringMap';
|
|
63
|
+
import { SubscriptionObject } from '../models/SubscriptionObject';
|
|
64
|
+
import { TransferSubscriptionRequestBody } from '../models/TransferSubscriptionRequestBody';
|
|
65
|
+
import { UpdateLiveActivityRequest } from '../models/UpdateLiveActivityRequest';
|
|
66
|
+
import { UpdateLiveActivitySuccessResponse } from '../models/UpdateLiveActivitySuccessResponse';
|
|
53
67
|
import { UpdatePlayerSuccessResponse } from '../models/UpdatePlayerSuccessResponse';
|
|
54
68
|
import { UpdatePlayerTagsRequestBody } from '../models/UpdatePlayerTagsRequestBody';
|
|
55
69
|
import { UpdatePlayerTagsSuccessResponse } from '../models/UpdatePlayerTagsSuccessResponse';
|
|
70
|
+
import { UpdateSubscriptionRequestBody } from '../models/UpdateSubscriptionRequestBody';
|
|
71
|
+
import { UpdateUserRequest } from '../models/UpdateUserRequest';
|
|
72
|
+
import { User } from '../models/User';
|
|
73
|
+
import { UserIdentityRequestBody } from '../models/UserIdentityRequestBody';
|
|
74
|
+
import { UserIdentityResponse } from '../models/UserIdentityResponse';
|
|
75
|
+
import { UserSubscriptionOptions } from '../models/UserSubscriptionOptions';
|
|
56
76
|
|
|
57
77
|
import { DefaultApiRequestFactory, DefaultApiResponseProcessor} from "../apis/DefaultApi";
|
|
58
78
|
export class ObservableDefaultApi {
|
|
@@ -70,6 +90,32 @@ export class ObservableDefaultApi {
|
|
|
70
90
|
this.responseProcessor = responseProcessor || new DefaultApiResponseProcessor();
|
|
71
91
|
}
|
|
72
92
|
|
|
93
|
+
/**
|
|
94
|
+
* Starts a Live Activity
|
|
95
|
+
* Start Live Activity
|
|
96
|
+
* @param appId The OneSignal App ID for your app. Available in Keys & IDs.
|
|
97
|
+
* @param activityId Live Activity record ID
|
|
98
|
+
* @param beginLiveActivityRequest
|
|
99
|
+
*/
|
|
100
|
+
public beginLiveActivity(appId: string, activityId: string, beginLiveActivityRequest: BeginLiveActivityRequest, _options?: Configuration): Observable<void> {
|
|
101
|
+
const requestContextPromise = this.requestFactory.beginLiveActivity(appId, activityId, beginLiveActivityRequest, _options);
|
|
102
|
+
|
|
103
|
+
// build promise chain
|
|
104
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
105
|
+
for (let middleware of this.configuration.middleware) {
|
|
106
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
110
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
111
|
+
let middlewarePostObservable = of(response);
|
|
112
|
+
for (let middleware of this.configuration.middleware) {
|
|
113
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
114
|
+
}
|
|
115
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.beginLiveActivity(rsp)));
|
|
116
|
+
}));
|
|
117
|
+
}
|
|
118
|
+
|
|
73
119
|
/**
|
|
74
120
|
* Used to stop a scheduled or currently outgoing notification
|
|
75
121
|
* Stop a scheduled or currently outgoing notification
|
|
@@ -192,6 +238,82 @@ export class ObservableDefaultApi {
|
|
|
192
238
|
}));
|
|
193
239
|
}
|
|
194
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User.
|
|
243
|
+
* @param appId
|
|
244
|
+
* @param aliasLabel
|
|
245
|
+
* @param aliasId
|
|
246
|
+
* @param createSubscriptionRequestBody
|
|
247
|
+
*/
|
|
248
|
+
public createSubscription(appId: string, aliasLabel: string, aliasId: string, createSubscriptionRequestBody: CreateSubscriptionRequestBody, _options?: Configuration): Observable<InlineResponse201> {
|
|
249
|
+
const requestContextPromise = this.requestFactory.createSubscription(appId, aliasLabel, aliasId, createSubscriptionRequestBody, _options);
|
|
250
|
+
|
|
251
|
+
// build promise chain
|
|
252
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
253
|
+
for (let middleware of this.configuration.middleware) {
|
|
254
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
258
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
259
|
+
let middlewarePostObservable = of(response);
|
|
260
|
+
for (let middleware of this.configuration.middleware) {
|
|
261
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
262
|
+
}
|
|
263
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createSubscription(rsp)));
|
|
264
|
+
}));
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* 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.
|
|
269
|
+
* @param appId
|
|
270
|
+
* @param user
|
|
271
|
+
*/
|
|
272
|
+
public createUser(appId: string, user: User, _options?: Configuration): Observable<User> {
|
|
273
|
+
const requestContextPromise = this.requestFactory.createUser(appId, user, _options);
|
|
274
|
+
|
|
275
|
+
// build promise chain
|
|
276
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
277
|
+
for (let middleware of this.configuration.middleware) {
|
|
278
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
282
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
283
|
+
let middlewarePostObservable = of(response);
|
|
284
|
+
for (let middleware of this.configuration.middleware) {
|
|
285
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
286
|
+
}
|
|
287
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.createUser(rsp)));
|
|
288
|
+
}));
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Deletes an alias by alias label
|
|
293
|
+
* @param appId
|
|
294
|
+
* @param aliasLabel
|
|
295
|
+
* @param aliasId
|
|
296
|
+
* @param aliasLabelToDelete
|
|
297
|
+
*/
|
|
298
|
+
public deleteAlias(appId: string, aliasLabel: string, aliasId: string, aliasLabelToDelete: string, _options?: Configuration): Observable<InlineResponse200> {
|
|
299
|
+
const requestContextPromise = this.requestFactory.deleteAlias(appId, aliasLabel, aliasId, aliasLabelToDelete, _options);
|
|
300
|
+
|
|
301
|
+
// build promise chain
|
|
302
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
303
|
+
for (let middleware of this.configuration.middleware) {
|
|
304
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
308
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
309
|
+
let middlewarePostObservable = of(response);
|
|
310
|
+
for (let middleware of this.configuration.middleware) {
|
|
311
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
312
|
+
}
|
|
313
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteAlias(rsp)));
|
|
314
|
+
}));
|
|
315
|
+
}
|
|
316
|
+
|
|
195
317
|
/**
|
|
196
318
|
* Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app.
|
|
197
319
|
* Delete a user record
|
|
@@ -242,6 +364,81 @@ export class ObservableDefaultApi {
|
|
|
242
364
|
}));
|
|
243
365
|
}
|
|
244
366
|
|
|
367
|
+
/**
|
|
368
|
+
* Deletes the Subscription.
|
|
369
|
+
* @param appId
|
|
370
|
+
* @param subscriptionId
|
|
371
|
+
*/
|
|
372
|
+
public deleteSubscription(appId: string, subscriptionId: string, _options?: Configuration): Observable<void> {
|
|
373
|
+
const requestContextPromise = this.requestFactory.deleteSubscription(appId, subscriptionId, _options);
|
|
374
|
+
|
|
375
|
+
// build promise chain
|
|
376
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
377
|
+
for (let middleware of this.configuration.middleware) {
|
|
378
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
382
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
383
|
+
let middlewarePostObservable = of(response);
|
|
384
|
+
for (let middleware of this.configuration.middleware) {
|
|
385
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
386
|
+
}
|
|
387
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteSubscription(rsp)));
|
|
388
|
+
}));
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases
|
|
393
|
+
* @param appId
|
|
394
|
+
* @param aliasLabel
|
|
395
|
+
* @param aliasId
|
|
396
|
+
*/
|
|
397
|
+
public deleteUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Observable<void> {
|
|
398
|
+
const requestContextPromise = this.requestFactory.deleteUser(appId, aliasLabel, aliasId, _options);
|
|
399
|
+
|
|
400
|
+
// build promise chain
|
|
401
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
402
|
+
for (let middleware of this.configuration.middleware) {
|
|
403
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
407
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
408
|
+
let middlewarePostObservable = of(response);
|
|
409
|
+
for (let middleware of this.configuration.middleware) {
|
|
410
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
411
|
+
}
|
|
412
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.deleteUser(rsp)));
|
|
413
|
+
}));
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Stops a Live Activity
|
|
418
|
+
* Stop Live Activity
|
|
419
|
+
* @param appId The OneSignal App ID for your app. Available in Keys & IDs.
|
|
420
|
+
* @param activityId Live Activity record ID
|
|
421
|
+
* @param subscriptionId Subscription ID
|
|
422
|
+
*/
|
|
423
|
+
public endLiveActivity(appId: string, activityId: string, subscriptionId: string, _options?: Configuration): Observable<void> {
|
|
424
|
+
const requestContextPromise = this.requestFactory.endLiveActivity(appId, activityId, subscriptionId, _options);
|
|
425
|
+
|
|
426
|
+
// build promise chain
|
|
427
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
428
|
+
for (let middleware of this.configuration.middleware) {
|
|
429
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
433
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
434
|
+
let middlewarePostObservable = of(response);
|
|
435
|
+
for (let middleware of this.configuration.middleware) {
|
|
436
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
437
|
+
}
|
|
438
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.endLiveActivity(rsp)));
|
|
439
|
+
}));
|
|
440
|
+
}
|
|
441
|
+
|
|
245
442
|
/**
|
|
246
443
|
* 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. |
|
|
247
444
|
* CSV export
|
|
@@ -267,6 +464,80 @@ export class ObservableDefaultApi {
|
|
|
267
464
|
}));
|
|
268
465
|
}
|
|
269
466
|
|
|
467
|
+
/**
|
|
468
|
+
* Lists all Aliases for the User identified by :subscription_id.
|
|
469
|
+
* @param appId
|
|
470
|
+
* @param subscriptionId
|
|
471
|
+
*/
|
|
472
|
+
public fetchAliases(appId: string, subscriptionId: string, _options?: Configuration): Observable<UserIdentityResponse> {
|
|
473
|
+
const requestContextPromise = this.requestFactory.fetchAliases(appId, subscriptionId, _options);
|
|
474
|
+
|
|
475
|
+
// build promise chain
|
|
476
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
477
|
+
for (let middleware of this.configuration.middleware) {
|
|
478
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
482
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
483
|
+
let middlewarePostObservable = of(response);
|
|
484
|
+
for (let middleware of this.configuration.middleware) {
|
|
485
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
486
|
+
}
|
|
487
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchAliases(rsp)));
|
|
488
|
+
}));
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Returns the User’s properties, Aliases, and Subscriptions.
|
|
493
|
+
* @param appId
|
|
494
|
+
* @param aliasLabel
|
|
495
|
+
* @param aliasId
|
|
496
|
+
*/
|
|
497
|
+
public fetchUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Observable<User> {
|
|
498
|
+
const requestContextPromise = this.requestFactory.fetchUser(appId, aliasLabel, aliasId, _options);
|
|
499
|
+
|
|
500
|
+
// build promise chain
|
|
501
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
502
|
+
for (let middleware of this.configuration.middleware) {
|
|
503
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
507
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
508
|
+
let middlewarePostObservable = of(response);
|
|
509
|
+
for (let middleware of this.configuration.middleware) {
|
|
510
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
511
|
+
}
|
|
512
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchUser(rsp)));
|
|
513
|
+
}));
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Lists all Aliases for the User identified by (:alias_label, :alias_id).
|
|
518
|
+
* @param appId
|
|
519
|
+
* @param aliasLabel
|
|
520
|
+
* @param aliasId
|
|
521
|
+
*/
|
|
522
|
+
public fetchUserIdentity(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Observable<InlineResponse200> {
|
|
523
|
+
const requestContextPromise = this.requestFactory.fetchUserIdentity(appId, aliasLabel, aliasId, _options);
|
|
524
|
+
|
|
525
|
+
// build promise chain
|
|
526
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
527
|
+
for (let middleware of this.configuration.middleware) {
|
|
528
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
532
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
533
|
+
let middlewarePostObservable = of(response);
|
|
534
|
+
for (let middleware of this.configuration.middleware) {
|
|
535
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
536
|
+
}
|
|
537
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.fetchUserIdentity(rsp)));
|
|
538
|
+
}));
|
|
539
|
+
}
|
|
540
|
+
|
|
270
541
|
/**
|
|
271
542
|
* View the details of a single OneSignal app
|
|
272
543
|
* View an app
|
|
@@ -314,6 +585,30 @@ export class ObservableDefaultApi {
|
|
|
314
585
|
}));
|
|
315
586
|
}
|
|
316
587
|
|
|
588
|
+
/**
|
|
589
|
+
* Manifest of In-App Messages the Subscription is eligible to display by the SDK.
|
|
590
|
+
* @param appId
|
|
591
|
+
* @param subscriptionId
|
|
592
|
+
*/
|
|
593
|
+
public getEligibleIams(appId: string, subscriptionId: string, _options?: Configuration): Observable<InlineResponse2003> {
|
|
594
|
+
const requestContextPromise = this.requestFactory.getEligibleIams(appId, subscriptionId, _options);
|
|
595
|
+
|
|
596
|
+
// build promise chain
|
|
597
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
598
|
+
for (let middleware of this.configuration.middleware) {
|
|
599
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
603
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
604
|
+
let middlewarePostObservable = of(response);
|
|
605
|
+
for (let middleware of this.configuration.middleware) {
|
|
606
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
607
|
+
}
|
|
608
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.getEligibleIams(rsp)));
|
|
609
|
+
}));
|
|
610
|
+
}
|
|
611
|
+
|
|
317
612
|
/**
|
|
318
613
|
* View the details of a single notification and outcomes associated with it
|
|
319
614
|
* View notification
|
|
@@ -472,6 +767,82 @@ export class ObservableDefaultApi {
|
|
|
472
767
|
}));
|
|
473
768
|
}
|
|
474
769
|
|
|
770
|
+
/**
|
|
771
|
+
* Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
|
|
772
|
+
* @param appId
|
|
773
|
+
* @param aliasLabel
|
|
774
|
+
* @param aliasId
|
|
775
|
+
* @param userIdentityRequestBody
|
|
776
|
+
*/
|
|
777
|
+
public identifyUserByAlias(appId: string, aliasLabel: string, aliasId: string, userIdentityRequestBody: UserIdentityRequestBody, _options?: Configuration): Observable<InlineResponse200> {
|
|
778
|
+
const requestContextPromise = this.requestFactory.identifyUserByAlias(appId, aliasLabel, aliasId, userIdentityRequestBody, _options);
|
|
779
|
+
|
|
780
|
+
// build promise chain
|
|
781
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
782
|
+
for (let middleware of this.configuration.middleware) {
|
|
783
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
787
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
788
|
+
let middlewarePostObservable = of(response);
|
|
789
|
+
for (let middleware of this.configuration.middleware) {
|
|
790
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
791
|
+
}
|
|
792
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.identifyUserByAlias(rsp)));
|
|
793
|
+
}));
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Upserts one or more Aliases for the User identified by :subscription_id.
|
|
798
|
+
* @param appId
|
|
799
|
+
* @param subscriptionId
|
|
800
|
+
* @param userIdentityRequestBody
|
|
801
|
+
*/
|
|
802
|
+
public identifyUserBySubscriptionId(appId: string, subscriptionId: string, userIdentityRequestBody: UserIdentityRequestBody, _options?: Configuration): Observable<UserIdentityResponse> {
|
|
803
|
+
const requestContextPromise = this.requestFactory.identifyUserBySubscriptionId(appId, subscriptionId, userIdentityRequestBody, _options);
|
|
804
|
+
|
|
805
|
+
// build promise chain
|
|
806
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
807
|
+
for (let middleware of this.configuration.middleware) {
|
|
808
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
812
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
813
|
+
let middlewarePostObservable = of(response);
|
|
814
|
+
for (let middleware of this.configuration.middleware) {
|
|
815
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
816
|
+
}
|
|
817
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.identifyUserBySubscriptionId(rsp)));
|
|
818
|
+
}));
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* Transfers this Subscription to the User identified by the identity in the payload.
|
|
823
|
+
* @param appId
|
|
824
|
+
* @param subscriptionId
|
|
825
|
+
* @param transferSubscriptionRequestBody
|
|
826
|
+
*/
|
|
827
|
+
public transferSubscription(appId: string, subscriptionId: string, transferSubscriptionRequestBody: TransferSubscriptionRequestBody, _options?: Configuration): Observable<UserIdentityResponse> {
|
|
828
|
+
const requestContextPromise = this.requestFactory.transferSubscription(appId, subscriptionId, transferSubscriptionRequestBody, _options);
|
|
829
|
+
|
|
830
|
+
// build promise chain
|
|
831
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
832
|
+
for (let middleware of this.configuration.middleware) {
|
|
833
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
837
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
838
|
+
let middlewarePostObservable = of(response);
|
|
839
|
+
for (let middleware of this.configuration.middleware) {
|
|
840
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
841
|
+
}
|
|
842
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.transferSubscription(rsp)));
|
|
843
|
+
}));
|
|
844
|
+
}
|
|
845
|
+
|
|
475
846
|
/**
|
|
476
847
|
* Updates the name or configuration settings of an existing OneSignal app
|
|
477
848
|
* Update an app
|
|
@@ -497,6 +868,32 @@ export class ObservableDefaultApi {
|
|
|
497
868
|
}));
|
|
498
869
|
}
|
|
499
870
|
|
|
871
|
+
/**
|
|
872
|
+
* Updates a specified live activity.
|
|
873
|
+
* Update a Live Activity via Push
|
|
874
|
+
* @param appId The OneSignal App ID for your app. Available in Keys & IDs.
|
|
875
|
+
* @param activityId Live Activity record ID
|
|
876
|
+
* @param updateLiveActivityRequest
|
|
877
|
+
*/
|
|
878
|
+
public updateLiveActivity(appId: string, activityId: string, updateLiveActivityRequest: UpdateLiveActivityRequest, _options?: Configuration): Observable<UpdateLiveActivitySuccessResponse> {
|
|
879
|
+
const requestContextPromise = this.requestFactory.updateLiveActivity(appId, activityId, updateLiveActivityRequest, _options);
|
|
880
|
+
|
|
881
|
+
// build promise chain
|
|
882
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
883
|
+
for (let middleware of this.configuration.middleware) {
|
|
884
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
888
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
889
|
+
let middlewarePostObservable = of(response);
|
|
890
|
+
for (let middleware of this.configuration.middleware) {
|
|
891
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
892
|
+
}
|
|
893
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateLiveActivity(rsp)));
|
|
894
|
+
}));
|
|
895
|
+
}
|
|
896
|
+
|
|
500
897
|
/**
|
|
501
898
|
* Update an existing device in one of your OneSignal apps
|
|
502
899
|
* Edit device
|
|
@@ -548,4 +945,56 @@ export class ObservableDefaultApi {
|
|
|
548
945
|
}));
|
|
549
946
|
}
|
|
550
947
|
|
|
948
|
+
/**
|
|
949
|
+
* Updates an existing Subscription’s properties.
|
|
950
|
+
* @param appId
|
|
951
|
+
* @param subscriptionId
|
|
952
|
+
* @param updateSubscriptionRequestBody
|
|
953
|
+
*/
|
|
954
|
+
public updateSubscription(appId: string, subscriptionId: string, updateSubscriptionRequestBody: UpdateSubscriptionRequestBody, _options?: Configuration): Observable<void> {
|
|
955
|
+
const requestContextPromise = this.requestFactory.updateSubscription(appId, subscriptionId, updateSubscriptionRequestBody, _options);
|
|
956
|
+
|
|
957
|
+
// build promise chain
|
|
958
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
959
|
+
for (let middleware of this.configuration.middleware) {
|
|
960
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
964
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
965
|
+
let middlewarePostObservable = of(response);
|
|
966
|
+
for (let middleware of this.configuration.middleware) {
|
|
967
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
968
|
+
}
|
|
969
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateSubscription(rsp)));
|
|
970
|
+
}));
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* Updates an existing User’s properties.
|
|
975
|
+
* @param appId
|
|
976
|
+
* @param aliasLabel
|
|
977
|
+
* @param aliasId
|
|
978
|
+
* @param updateUserRequest
|
|
979
|
+
* @param subscriptionId
|
|
980
|
+
*/
|
|
981
|
+
public updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, subscriptionId?: string, _options?: Configuration): Observable<InlineResponse202> {
|
|
982
|
+
const requestContextPromise = this.requestFactory.updateUser(appId, aliasLabel, aliasId, updateUserRequest, subscriptionId, _options);
|
|
983
|
+
|
|
984
|
+
// build promise chain
|
|
985
|
+
let middlewarePreObservable = from<RequestContext>(requestContextPromise);
|
|
986
|
+
for (let middleware of this.configuration.middleware) {
|
|
987
|
+
middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx)));
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))).
|
|
991
|
+
pipe(mergeMap((response: ResponseContext) => {
|
|
992
|
+
let middlewarePostObservable = of(response);
|
|
993
|
+
for (let middleware of this.configuration.middleware) {
|
|
994
|
+
middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp)));
|
|
995
|
+
}
|
|
996
|
+
return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.updateUser(rsp)));
|
|
997
|
+
}));
|
|
998
|
+
}
|
|
999
|
+
|
|
551
1000
|
}
|