@onesignal/node-onesignal 5.6.0 → 5.8.0
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/dist/apis/DefaultApi.js +2282 -4372
- package/dist/apis/baseapi.js +11 -30
- package/dist/apis/exception.js +9 -26
- package/dist/auth/auth.js +17 -83
- package/dist/configuration.js +9 -9
- package/dist/http/http.js +53 -132
- package/dist/http/isomorphic-fetch.js +15 -18
- package/dist/middleware.js +8 -9
- package/dist/models/ApiKeyToken.js +45 -46
- package/dist/models/ApiKeyTokensListResponse.js +15 -16
- package/dist/models/App.js +213 -214
- package/dist/models/BasicNotification.d.ts +2 -0
- package/dist/models/BasicNotification.js +711 -700
- package/dist/models/BasicNotificationAllOf.d.ts +1 -0
- package/dist/models/BasicNotificationAllOf.js +627 -622
- package/dist/models/BasicNotificationAllOfAndroidBackgroundLayout.js +27 -28
- package/dist/models/Button.js +27 -28
- package/dist/models/CopyTemplateRequest.js +15 -16
- package/dist/models/CreateApiKeyRequest.js +27 -28
- package/dist/models/CreateApiKeyResponse.js +21 -22
- package/dist/models/CreateNotificationSuccessResponse.js +27 -28
- package/dist/models/CreateSegmentConflictResponse.js +21 -22
- package/dist/models/CreateSegmentSuccessResponse.js +21 -22
- package/dist/models/CreateTemplateRequest.js +75 -76
- package/dist/models/CreateUserConflictResponse.js +15 -16
- package/dist/models/CreateUserConflictResponseErrorsInner.js +27 -28
- package/dist/models/CreateUserConflictResponseErrorsItemsMeta.js +15 -16
- package/dist/models/CustomEvent.js +39 -40
- package/dist/models/CustomEventsRequest.js +15 -16
- package/dist/models/DeliveryData.js +39 -40
- package/dist/models/ExportEventsSuccessResponse.js +15 -16
- package/dist/models/ExportSubscriptionsRequestBody.js +27 -28
- package/dist/models/ExportSubscriptionsSuccessResponse.js +15 -16
- package/dist/models/Filter.js +57 -58
- package/dist/models/FilterExpression.js +63 -64
- package/dist/models/GenericError.js +27 -28
- package/dist/models/GenericSuccessBoolResponse.js +15 -16
- package/dist/models/GetNotificationHistoryRequestBody.js +27 -28
- package/dist/models/GetSegmentsSuccessResponse.js +33 -34
- package/dist/models/LanguageStringMap.js +267 -268
- package/dist/models/Notification.d.ts +2 -0
- package/dist/models/Notification.js +717 -706
- package/dist/models/NotificationAllOf.js +15 -16
- package/dist/models/NotificationHistorySuccessResponse.js +21 -22
- package/dist/models/NotificationSlice.js +33 -34
- package/dist/models/NotificationTarget.d.ts +1 -0
- package/dist/models/NotificationTarget.js +93 -88
- package/dist/models/NotificationWithMeta.d.ts +2 -0
- package/dist/models/NotificationWithMeta.js +789 -778
- package/dist/models/NotificationWithMetaAllOf.js +93 -94
- package/dist/models/ObjectSerializer.js +111 -115
- package/dist/models/Operator.js +15 -16
- package/dist/models/OutcomeData.js +27 -28
- package/dist/models/OutcomesData.js +15 -16
- package/dist/models/PlatformDeliveryData.js +57 -58
- package/dist/models/PlatformDeliveryDataEmailAllOf.js +51 -52
- package/dist/models/PlatformDeliveryDataSmsAllOf.js +27 -28
- package/dist/models/PropertiesBody.js +15 -16
- package/dist/models/PropertiesDeltas.js +27 -28
- package/dist/models/PropertiesObject.js +75 -76
- package/dist/models/Purchase.js +33 -34
- package/dist/models/RateLimitError.js +21 -22
- package/dist/models/Segment.js +27 -28
- package/dist/models/SegmentData.js +51 -52
- package/dist/models/SegmentNotificationTarget.js +21 -22
- package/dist/models/StartLiveActivityRequest.js +105 -106
- package/dist/models/StartLiveActivitySuccessResponse.js +15 -16
- package/dist/models/Subscription.js +111 -112
- package/dist/models/SubscriptionBody.js +15 -16
- package/dist/models/SubscriptionNotificationTarget.d.ts +1 -0
- package/dist/models/SubscriptionNotificationTarget.js +81 -76
- package/dist/models/TemplateResource.js +45 -46
- package/dist/models/TemplatesListResponse.js +15 -16
- package/dist/models/TransferSubscriptionRequestBody.js +15 -16
- package/dist/models/UpdateApiKeyRequest.js +27 -28
- package/dist/models/UpdateLiveActivityRequest.js +63 -64
- package/dist/models/UpdateLiveActivitySuccessResponse.js +15 -16
- package/dist/models/UpdateTemplateRequest.js +69 -70
- package/dist/models/UpdateUserRequest.js +27 -28
- package/dist/models/User.js +27 -28
- package/dist/models/UserIdentityBody.js +15 -16
- package/dist/models/WebButton.js +33 -34
- package/dist/rxjsStub.js +8 -9
- package/dist/servers.js +14 -15
- package/dist/types/ObjectParamAPI.js +92 -94
- package/dist/types/ObservableAPI.js +534 -931
- package/dist/types/PromiseAPI.js +136 -137
- package/dist/util.js +2 -2
- package/package.json +4 -2
package/dist/types/PromiseAPI.js
CHANGED
|
@@ -1,188 +1,187 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PromiseDefaultApi = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const ObservableAPI_1 = require("./ObservableAPI");
|
|
5
|
+
class PromiseDefaultApi {
|
|
6
|
+
constructor(configuration, requestFactory, responseProcessor) {
|
|
7
7
|
this.api = new ObservableAPI_1.ObservableDefaultApi(configuration, requestFactory, responseProcessor);
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
cancelNotification(appId, notificationId, _options) {
|
|
10
|
+
const result = this.api.cancelNotification(appId, notificationId, _options);
|
|
11
11
|
return result.toPromise();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
}
|
|
13
|
+
copyTemplateToApp(templateId, appId, copyTemplateRequest, _options) {
|
|
14
|
+
const result = this.api.copyTemplateToApp(templateId, appId, copyTemplateRequest, _options);
|
|
15
15
|
return result.toPromise();
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
}
|
|
17
|
+
createAlias(appId, aliasLabel, aliasId, userIdentityBody, _options) {
|
|
18
|
+
const result = this.api.createAlias(appId, aliasLabel, aliasId, userIdentityBody, _options);
|
|
19
19
|
return result.toPromise();
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
}
|
|
21
|
+
createAliasBySubscription(appId, subscriptionId, userIdentityBody, _options) {
|
|
22
|
+
const result = this.api.createAliasBySubscription(appId, subscriptionId, userIdentityBody, _options);
|
|
23
23
|
return result.toPromise();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
}
|
|
25
|
+
createApiKey(appId, createApiKeyRequest, _options) {
|
|
26
|
+
const result = this.api.createApiKey(appId, createApiKeyRequest, _options);
|
|
27
27
|
return result.toPromise();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
}
|
|
29
|
+
createApp(app, _options) {
|
|
30
|
+
const result = this.api.createApp(app, _options);
|
|
31
31
|
return result.toPromise();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
}
|
|
33
|
+
createCustomEvents(appId, customEventsRequest, _options) {
|
|
34
|
+
const result = this.api.createCustomEvents(appId, customEventsRequest, _options);
|
|
35
35
|
return result.toPromise();
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
}
|
|
37
|
+
createNotification(notification, _options) {
|
|
38
|
+
const result = this.api.createNotification(notification, _options);
|
|
39
39
|
return result.toPromise();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
}
|
|
41
|
+
createSegment(appId, segment, _options) {
|
|
42
|
+
const result = this.api.createSegment(appId, segment, _options);
|
|
43
43
|
return result.toPromise();
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
}
|
|
45
|
+
createSubscription(appId, aliasLabel, aliasId, subscriptionBody, _options) {
|
|
46
|
+
const result = this.api.createSubscription(appId, aliasLabel, aliasId, subscriptionBody, _options);
|
|
47
47
|
return result.toPromise();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
}
|
|
49
|
+
createTemplate(createTemplateRequest, _options) {
|
|
50
|
+
const result = this.api.createTemplate(createTemplateRequest, _options);
|
|
51
51
|
return result.toPromise();
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
}
|
|
53
|
+
createUser(appId, user, _options) {
|
|
54
|
+
const result = this.api.createUser(appId, user, _options);
|
|
55
55
|
return result.toPromise();
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
}
|
|
57
|
+
deleteAlias(appId, aliasLabel, aliasId, aliasLabelToDelete, _options) {
|
|
58
|
+
const result = this.api.deleteAlias(appId, aliasLabel, aliasId, aliasLabelToDelete, _options);
|
|
59
59
|
return result.toPromise();
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
}
|
|
61
|
+
deleteApiKey(appId, tokenId, _options) {
|
|
62
|
+
const result = this.api.deleteApiKey(appId, tokenId, _options);
|
|
63
63
|
return result.toPromise();
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
}
|
|
65
|
+
deleteSegment(appId, segmentId, _options) {
|
|
66
|
+
const result = this.api.deleteSegment(appId, segmentId, _options);
|
|
67
67
|
return result.toPromise();
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
}
|
|
69
|
+
deleteSubscription(appId, subscriptionId, _options) {
|
|
70
|
+
const result = this.api.deleteSubscription(appId, subscriptionId, _options);
|
|
71
71
|
return result.toPromise();
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
}
|
|
73
|
+
deleteTemplate(templateId, appId, _options) {
|
|
74
|
+
const result = this.api.deleteTemplate(templateId, appId, _options);
|
|
75
75
|
return result.toPromise();
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
}
|
|
77
|
+
deleteUser(appId, aliasLabel, aliasId, _options) {
|
|
78
|
+
const result = this.api.deleteUser(appId, aliasLabel, aliasId, _options);
|
|
79
79
|
return result.toPromise();
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
}
|
|
81
|
+
exportEvents(notificationId, appId, _options) {
|
|
82
|
+
const result = this.api.exportEvents(notificationId, appId, _options);
|
|
83
83
|
return result.toPromise();
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
}
|
|
85
|
+
exportSubscriptions(appId, exportSubscriptionsRequestBody, _options) {
|
|
86
|
+
const result = this.api.exportSubscriptions(appId, exportSubscriptionsRequestBody, _options);
|
|
87
87
|
return result.toPromise();
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
}
|
|
89
|
+
getAliases(appId, aliasLabel, aliasId, _options) {
|
|
90
|
+
const result = this.api.getAliases(appId, aliasLabel, aliasId, _options);
|
|
91
91
|
return result.toPromise();
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
}
|
|
93
|
+
getAliasesBySubscription(appId, subscriptionId, _options) {
|
|
94
|
+
const result = this.api.getAliasesBySubscription(appId, subscriptionId, _options);
|
|
95
95
|
return result.toPromise();
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
}
|
|
97
|
+
getApp(appId, _options) {
|
|
98
|
+
const result = this.api.getApp(appId, _options);
|
|
99
99
|
return result.toPromise();
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
}
|
|
101
|
+
getApps(_options) {
|
|
102
|
+
const result = this.api.getApps(_options);
|
|
103
103
|
return result.toPromise();
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
}
|
|
105
|
+
getNotification(appId, notificationId, _options) {
|
|
106
|
+
const result = this.api.getNotification(appId, notificationId, _options);
|
|
107
107
|
return result.toPromise();
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
}
|
|
109
|
+
getNotificationHistory(notificationId, getNotificationHistoryRequestBody, _options) {
|
|
110
|
+
const result = this.api.getNotificationHistory(notificationId, getNotificationHistoryRequestBody, _options);
|
|
111
111
|
return result.toPromise();
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
}
|
|
113
|
+
getNotifications(appId, limit, offset, kind, _options) {
|
|
114
|
+
const result = this.api.getNotifications(appId, limit, offset, kind, _options);
|
|
115
115
|
return result.toPromise();
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
}
|
|
117
|
+
getOutcomes(appId, outcomeNames, outcomeNames2, outcomeTimeRange, outcomePlatforms, outcomeAttribution, _options) {
|
|
118
|
+
const result = this.api.getOutcomes(appId, outcomeNames, outcomeNames2, outcomeTimeRange, outcomePlatforms, outcomeAttribution, _options);
|
|
119
119
|
return result.toPromise();
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
}
|
|
121
|
+
getSegments(appId, offset, limit, _options) {
|
|
122
|
+
const result = this.api.getSegments(appId, offset, limit, _options);
|
|
123
123
|
return result.toPromise();
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
}
|
|
125
|
+
getUser(appId, aliasLabel, aliasId, _options) {
|
|
126
|
+
const result = this.api.getUser(appId, aliasLabel, aliasId, _options);
|
|
127
127
|
return result.toPromise();
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
}
|
|
129
|
+
rotateApiKey(appId, tokenId, _options) {
|
|
130
|
+
const result = this.api.rotateApiKey(appId, tokenId, _options);
|
|
131
131
|
return result.toPromise();
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
}
|
|
133
|
+
startLiveActivity(appId, activityType, startLiveActivityRequest, _options) {
|
|
134
|
+
const result = this.api.startLiveActivity(appId, activityType, startLiveActivityRequest, _options);
|
|
135
135
|
return result.toPromise();
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
}
|
|
137
|
+
transferSubscription(appId, subscriptionId, transferSubscriptionRequestBody, _options) {
|
|
138
|
+
const result = this.api.transferSubscription(appId, subscriptionId, transferSubscriptionRequestBody, _options);
|
|
139
139
|
return result.toPromise();
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
}
|
|
141
|
+
unsubscribeEmailWithToken(appId, notificationId, token, _options) {
|
|
142
|
+
const result = this.api.unsubscribeEmailWithToken(appId, notificationId, token, _options);
|
|
143
143
|
return result.toPromise();
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
}
|
|
145
|
+
updateApiKey(appId, tokenId, updateApiKeyRequest, _options) {
|
|
146
|
+
const result = this.api.updateApiKey(appId, tokenId, updateApiKeyRequest, _options);
|
|
147
147
|
return result.toPromise();
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
}
|
|
149
|
+
updateApp(appId, app, _options) {
|
|
150
|
+
const result = this.api.updateApp(appId, app, _options);
|
|
151
151
|
return result.toPromise();
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
}
|
|
153
|
+
updateLiveActivity(appId, activityId, updateLiveActivityRequest, _options) {
|
|
154
|
+
const result = this.api.updateLiveActivity(appId, activityId, updateLiveActivityRequest, _options);
|
|
155
155
|
return result.toPromise();
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
}
|
|
157
|
+
updateSubscription(appId, subscriptionId, subscriptionBody, _options) {
|
|
158
|
+
const result = this.api.updateSubscription(appId, subscriptionId, subscriptionBody, _options);
|
|
159
159
|
return result.toPromise();
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
}
|
|
161
|
+
updateSubscriptionByToken(appId, tokenType, token, subscriptionBody, _options) {
|
|
162
|
+
const result = this.api.updateSubscriptionByToken(appId, tokenType, token, subscriptionBody, _options);
|
|
163
163
|
return result.toPromise();
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
}
|
|
165
|
+
updateTemplate(templateId, appId, updateTemplateRequest, _options) {
|
|
166
|
+
const result = this.api.updateTemplate(templateId, appId, updateTemplateRequest, _options);
|
|
167
167
|
return result.toPromise();
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
}
|
|
169
|
+
updateUser(appId, aliasLabel, aliasId, updateUserRequest, _options) {
|
|
170
|
+
const result = this.api.updateUser(appId, aliasLabel, aliasId, updateUserRequest, _options);
|
|
171
171
|
return result.toPromise();
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
172
|
+
}
|
|
173
|
+
viewApiKeys(appId, _options) {
|
|
174
|
+
const result = this.api.viewApiKeys(appId, _options);
|
|
175
175
|
return result.toPromise();
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
|
|
176
|
+
}
|
|
177
|
+
viewTemplate(templateId, appId, _options) {
|
|
178
|
+
const result = this.api.viewTemplate(templateId, appId, _options);
|
|
179
179
|
return result.toPromise();
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
|
|
180
|
+
}
|
|
181
|
+
viewTemplates(appId, limit, offset, channel, _options) {
|
|
182
|
+
const result = this.api.viewTemplates(appId, limit, offset, channel, _options);
|
|
183
183
|
return result.toPromise();
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
}());
|
|
184
|
+
}
|
|
185
|
+
}
|
|
187
186
|
exports.PromiseDefaultApi = PromiseDefaultApi;
|
|
188
187
|
//# sourceMappingURL=PromiseAPI.js.map
|
package/dist/util.js
CHANGED
|
@@ -9,11 +9,11 @@ function isCodeInRange(codeRange, code) {
|
|
|
9
9
|
return true;
|
|
10
10
|
}
|
|
11
11
|
else {
|
|
12
|
-
|
|
12
|
+
const codeString = code.toString();
|
|
13
13
|
if (codeString.length != codeRange.length) {
|
|
14
14
|
return false;
|
|
15
15
|
}
|
|
16
|
-
for (
|
|
16
|
+
for (let i = 0; i < codeString.length; i++) {
|
|
17
17
|
if (codeRange.charAt(i) != "X" && codeRange.charAt(i) != codeString.charAt(i)) {
|
|
18
18
|
return false;
|
|
19
19
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onesignal/node-onesignal",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.0",
|
|
4
4
|
"description": "OpenAPI client for @onesignal/node-onesignal",
|
|
5
5
|
"author": "OpenAPI-Generator Contributors",
|
|
6
6
|
"keywords": [
|
|
@@ -31,10 +31,12 @@
|
|
|
31
31
|
"build": "tsc",
|
|
32
32
|
"prepare": "npm run build"
|
|
33
33
|
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=18.0.0"
|
|
36
|
+
},
|
|
34
37
|
"dependencies": {
|
|
35
38
|
"form-data": "^2.5.0",
|
|
36
39
|
"btoa": "^1.2.1",
|
|
37
|
-
"es6-promise": "^4.2.4",
|
|
38
40
|
"url-parse": "^1.4.3"
|
|
39
41
|
},
|
|
40
42
|
"devDependencies": {
|