@onesignal/node-onesignal 5.2.1-beta1 → 5.3.0-beta1
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/DefaultApi.md +1547 -431
- package/apis/DefaultApi.ts +1492 -89
- package/dist/apis/DefaultApi.d.ts +40 -0
- package/dist/apis/DefaultApi.js +1363 -100
- package/dist/apis/DefaultApi.js.map +1 -1
- package/dist/models/ApiKeyToken.d.ts +23 -0
- package/dist/models/ApiKeyToken.js +52 -0
- package/dist/models/ApiKeyToken.js.map +1 -0
- package/dist/models/ApiKeyTokensListResponse.d.ts +18 -0
- package/dist/models/ApiKeyTokensListResponse.js +22 -0
- package/dist/models/ApiKeyTokensListResponse.js.map +1 -0
- package/dist/models/CopyTemplateRequest.d.ts +17 -0
- package/dist/models/CopyTemplateRequest.js +22 -0
- package/dist/models/CopyTemplateRequest.js.map +1 -0
- package/dist/models/CreateApiKeyRequest.d.ts +20 -0
- package/dist/models/CreateApiKeyRequest.js +34 -0
- package/dist/models/CreateApiKeyRequest.js.map +1 -0
- package/dist/models/CreateApiKeyResponse.d.ts +18 -0
- package/dist/models/CreateApiKeyResponse.js +28 -0
- package/dist/models/CreateApiKeyResponse.js.map +1 -0
- package/dist/models/CreateTemplateRequest.d.ts +25 -0
- package/dist/models/CreateTemplateRequest.js +64 -0
- package/dist/models/CreateTemplateRequest.js.map +1 -0
- package/dist/models/CustomEvent.d.ts +23 -0
- package/dist/models/CustomEvent.js +46 -0
- package/dist/models/CustomEvent.js.map +1 -0
- package/dist/models/CustomEventsRequest.d.ts +18 -0
- package/dist/models/CustomEventsRequest.js +22 -0
- package/dist/models/CustomEventsRequest.js.map +1 -0
- package/dist/models/NotificationWithMeta.d.ts +1 -0
- package/dist/models/NotificationWithMeta.js +6 -0
- package/dist/models/NotificationWithMeta.js.map +1 -1
- package/dist/models/NotificationWithMetaAllOf.d.ts +1 -0
- package/dist/models/NotificationWithMetaAllOf.js +6 -0
- package/dist/models/NotificationWithMetaAllOf.js.map +1 -1
- package/dist/models/ObjectSerializer.d.ts +14 -0
- package/dist/models/ObjectSerializer.js +47 -0
- package/dist/models/ObjectSerializer.js.map +1 -1
- package/dist/models/StartLiveActivityRequest.d.ts +37 -0
- package/dist/models/StartLiveActivityRequest.js +112 -0
- package/dist/models/StartLiveActivityRequest.js.map +1 -0
- package/dist/models/StartLiveActivitySuccessResponse.d.ts +17 -0
- package/dist/models/StartLiveActivitySuccessResponse.js +22 -0
- package/dist/models/StartLiveActivitySuccessResponse.js.map +1 -0
- package/dist/models/TemplateResource.d.ts +25 -0
- package/dist/models/TemplateResource.js +52 -0
- package/dist/models/TemplateResource.js.map +1 -0
- package/dist/models/TemplatesListResponse.d.ts +18 -0
- package/dist/models/TemplatesListResponse.js +22 -0
- package/dist/models/TemplatesListResponse.js.map +1 -0
- package/dist/models/UpdateApiKeyRequest.d.ts +20 -0
- package/dist/models/UpdateApiKeyRequest.js +34 -0
- package/dist/models/UpdateApiKeyRequest.js.map +1 -0
- package/dist/models/UpdateTemplateRequest.d.ts +24 -0
- package/dist/models/UpdateTemplateRequest.js +58 -0
- package/dist/models/UpdateTemplateRequest.js.map +1 -0
- package/dist/models/all.d.ts +14 -0
- package/dist/models/all.js +14 -0
- package/dist/models/all.js.map +1 -1
- package/dist/types/ObjectParamAPI.d.ts +88 -0
- package/dist/types/ObjectParamAPI.js +42 -0
- package/dist/types/ObjectParamAPI.js.map +1 -1
- package/dist/types/ObservableAPI.d.ts +26 -0
- package/dist/types/ObservableAPI.js +422 -86
- package/dist/types/ObservableAPI.js.map +1 -1
- package/dist/types/PromiseAPI.d.ts +26 -0
- package/dist/types/PromiseAPI.js +56 -0
- package/dist/types/PromiseAPI.js.map +1 -1
- package/models/ApiKeyToken.ts +69 -0
- package/models/ApiKeyTokensListResponse.ts +32 -0
- package/models/App.ts +1 -1
- package/models/BasicNotification.ts +1 -1
- package/models/BasicNotificationAllOf.ts +1 -1
- package/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +1 -1
- package/models/Button.ts +1 -1
- package/models/CopyTemplateRequest.ts +34 -0
- package/models/CreateApiKeyRequest.ts +48 -0
- package/models/CreateApiKeyResponse.ts +38 -0
- package/models/CreateNotificationSuccessResponse.ts +1 -1
- package/models/CreateSegmentConflictResponse.ts +1 -1
- package/models/CreateSegmentSuccessResponse.ts +1 -1
- package/models/CreateTemplateRequest.ts +102 -0
- package/models/CreateUserConflictResponse.ts +1 -1
- package/models/CreateUserConflictResponseErrorsInner.ts +1 -1
- package/models/CreateUserConflictResponseErrorsItemsMeta.ts +1 -1
- package/models/CustomEvent.ts +74 -0
- package/models/CustomEventsRequest.ts +32 -0
- package/models/DeliveryData.ts +1 -1
- package/models/ExportEventsSuccessResponse.ts +1 -1
- package/models/ExportSubscriptionsRequestBody.ts +1 -1
- package/models/ExportSubscriptionsSuccessResponse.ts +1 -1
- package/models/Filter.ts +1 -1
- package/models/FilterExpression.ts +1 -1
- package/models/GenericError.ts +1 -1
- package/models/GenericSuccessBoolResponse.ts +1 -1
- package/models/GetNotificationHistoryRequestBody.ts +1 -1
- package/models/GetSegmentsSuccessResponse.ts +1 -1
- package/models/LanguageStringMap.ts +1 -1
- package/models/Notification.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 +1 -1
- package/models/NotificationWithMeta.ts +11 -1
- package/models/NotificationWithMetaAllOf.ts +11 -1
- package/models/ObjectSerializer.ts +48 -1
- 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/PropertiesBody.ts +1 -1
- package/models/PropertiesDeltas.ts +1 -1
- package/models/PropertiesObject.ts +1 -1
- package/models/Purchase.ts +1 -1
- package/models/RateLimitError.ts +1 -1
- package/models/Segment.ts +1 -1
- package/models/SegmentData.ts +1 -1
- package/models/SegmentNotificationTarget.ts +1 -1
- package/models/StartLiveActivityRequest.ts +177 -0
- package/models/StartLiveActivitySuccessResponse.ts +31 -0
- package/models/Subscription.ts +1 -1
- package/models/SubscriptionBody.ts +1 -1
- package/models/SubscriptionNotificationTarget.ts +1 -1
- package/models/TemplateResource.ts +72 -0
- package/models/TemplatesListResponse.ts +32 -0
- package/models/TransferSubscriptionRequestBody.ts +1 -1
- package/models/UpdateApiKeyRequest.ts +48 -0
- package/models/UpdateLiveActivityRequest.ts +1 -1
- package/models/UpdateLiveActivitySuccessResponse.ts +1 -1
- package/models/UpdateTemplateRequest.ts +92 -0
- package/models/UpdateUserRequest.ts +1 -1
- package/models/User.ts +1 -1
- package/models/UserIdentityBody.ts +1 -1
- package/models/WebButton.ts +1 -1
- package/models/all.ts +14 -0
- package/onesignal-node-onesignal-5.3.0-beta1.tgz +0 -0
- package/package.json +1 -1
- package/types/ObjectParamAPI.ts +386 -0
- package/types/ObservableAPI.ts +370 -0
- package/types/PromiseAPI.ts +174 -0
|
@@ -1,14 +1,22 @@
|
|
|
1
|
+
export * from './ApiKeyToken';
|
|
2
|
+
export * from './ApiKeyTokensListResponse';
|
|
1
3
|
export * from './App';
|
|
2
4
|
export * from './BasicNotification';
|
|
3
5
|
export * from './BasicNotificationAllOf';
|
|
4
6
|
export * from './BasicNotificationAllOfAndroidBackgroundLayout';
|
|
5
7
|
export * from './Button';
|
|
8
|
+
export * from './CopyTemplateRequest';
|
|
9
|
+
export * from './CreateApiKeyRequest';
|
|
10
|
+
export * from './CreateApiKeyResponse';
|
|
6
11
|
export * from './CreateNotificationSuccessResponse';
|
|
7
12
|
export * from './CreateSegmentConflictResponse';
|
|
8
13
|
export * from './CreateSegmentSuccessResponse';
|
|
14
|
+
export * from './CreateTemplateRequest';
|
|
9
15
|
export * from './CreateUserConflictResponse';
|
|
10
16
|
export * from './CreateUserConflictResponseErrorsInner';
|
|
11
17
|
export * from './CreateUserConflictResponseErrorsItemsMeta';
|
|
18
|
+
export * from './CustomEvent';
|
|
19
|
+
export * from './CustomEventsRequest';
|
|
12
20
|
export * from './DeliveryData';
|
|
13
21
|
export * from './ExportEventsSuccessResponse';
|
|
14
22
|
export * from './ExportSubscriptionsRequestBody';
|
|
@@ -41,28 +49,42 @@ export * from './RateLimitError';
|
|
|
41
49
|
export * from './Segment';
|
|
42
50
|
export * from './SegmentData';
|
|
43
51
|
export * from './SegmentNotificationTarget';
|
|
52
|
+
export * from './StartLiveActivityRequest';
|
|
53
|
+
export * from './StartLiveActivitySuccessResponse';
|
|
44
54
|
export * from './Subscription';
|
|
45
55
|
export * from './SubscriptionBody';
|
|
46
56
|
export * from './SubscriptionNotificationTarget';
|
|
57
|
+
export * from './TemplateResource';
|
|
58
|
+
export * from './TemplatesListResponse';
|
|
47
59
|
export * from './TransferSubscriptionRequestBody';
|
|
60
|
+
export * from './UpdateApiKeyRequest';
|
|
48
61
|
export * from './UpdateLiveActivityRequest';
|
|
49
62
|
export * from './UpdateLiveActivitySuccessResponse';
|
|
63
|
+
export * from './UpdateTemplateRequest';
|
|
50
64
|
export * from './UpdateUserRequest';
|
|
51
65
|
export * from './User';
|
|
52
66
|
export * from './UserIdentityBody';
|
|
53
67
|
export * from './WebButton';
|
|
54
68
|
|
|
69
|
+
import { ApiKeyToken , ApiKeyTokenIpAllowlistModeEnum } from './ApiKeyToken';
|
|
70
|
+
import { ApiKeyTokensListResponse } from './ApiKeyTokensListResponse';
|
|
55
71
|
import { App , AppApnsEnvEnum } from './App';
|
|
56
72
|
import { BasicNotification , BasicNotificationTargetChannelEnum , BasicNotificationAggregationEnum } from './BasicNotification';
|
|
57
73
|
import { BasicNotificationAllOf , BasicNotificationAllOfAggregationEnum } from './BasicNotificationAllOf';
|
|
58
74
|
import { BasicNotificationAllOfAndroidBackgroundLayout } from './BasicNotificationAllOfAndroidBackgroundLayout';
|
|
59
75
|
import { Button } from './Button';
|
|
76
|
+
import { CopyTemplateRequest } from './CopyTemplateRequest';
|
|
77
|
+
import { CreateApiKeyRequest , CreateApiKeyRequestIpAllowlistModeEnum } from './CreateApiKeyRequest';
|
|
78
|
+
import { CreateApiKeyResponse } from './CreateApiKeyResponse';
|
|
60
79
|
import { CreateNotificationSuccessResponse } from './CreateNotificationSuccessResponse';
|
|
61
80
|
import { CreateSegmentConflictResponse } from './CreateSegmentConflictResponse';
|
|
62
81
|
import { CreateSegmentSuccessResponse } from './CreateSegmentSuccessResponse';
|
|
82
|
+
import { CreateTemplateRequest } from './CreateTemplateRequest';
|
|
63
83
|
import { CreateUserConflictResponse } from './CreateUserConflictResponse';
|
|
64
84
|
import { CreateUserConflictResponseErrorsInner } from './CreateUserConflictResponseErrorsInner';
|
|
65
85
|
import { CreateUserConflictResponseErrorsItemsMeta } from './CreateUserConflictResponseErrorsItemsMeta';
|
|
86
|
+
import { CustomEvent } from './CustomEvent';
|
|
87
|
+
import { CustomEventsRequest } from './CustomEventsRequest';
|
|
66
88
|
import { DeliveryData } from './DeliveryData';
|
|
67
89
|
import { ExportEventsSuccessResponse } from './ExportEventsSuccessResponse';
|
|
68
90
|
import { ExportSubscriptionsRequestBody } from './ExportSubscriptionsRequestBody';
|
|
@@ -79,7 +101,7 @@ import { NotificationAllOf } from './NotificationAllOf';
|
|
|
79
101
|
import { NotificationHistorySuccessResponse } from './NotificationHistorySuccessResponse';
|
|
80
102
|
import { NotificationSlice } from './NotificationSlice';
|
|
81
103
|
import { NotificationTarget , NotificationTargetTargetChannelEnum } from './NotificationTarget';
|
|
82
|
-
import { NotificationWithMeta , NotificationWithMetaTargetChannelEnum , NotificationWithMetaAggregationEnum
|
|
104
|
+
import { NotificationWithMeta , NotificationWithMetaTargetChannelEnum , NotificationWithMetaAggregationEnum } from './NotificationWithMeta';
|
|
83
105
|
import { NotificationWithMetaAllOf } from './NotificationWithMetaAllOf';
|
|
84
106
|
import { Operator, OperatorOperatorEnum } from './Operator';
|
|
85
107
|
import { OutcomeData , OutcomeDataAggregationEnum } from './OutcomeData';
|
|
@@ -95,12 +117,18 @@ import { RateLimitError } from './RateLimitError';
|
|
|
95
117
|
import { Segment } from './Segment';
|
|
96
118
|
import { SegmentData } from './SegmentData';
|
|
97
119
|
import { SegmentNotificationTarget } from './SegmentNotificationTarget';
|
|
120
|
+
import { StartLiveActivityRequest , StartLiveActivityRequestEventEnum } from './StartLiveActivityRequest';
|
|
121
|
+
import { StartLiveActivitySuccessResponse } from './StartLiveActivitySuccessResponse';
|
|
98
122
|
import { Subscription , SubscriptionTypeEnum } from './Subscription';
|
|
99
123
|
import { SubscriptionBody } from './SubscriptionBody';
|
|
100
124
|
import { SubscriptionNotificationTarget , SubscriptionNotificationTargetTargetChannelEnum } from './SubscriptionNotificationTarget';
|
|
125
|
+
import { TemplateResource , TemplateResourceChannelEnum } from './TemplateResource';
|
|
126
|
+
import { TemplatesListResponse } from './TemplatesListResponse';
|
|
101
127
|
import { TransferSubscriptionRequestBody } from './TransferSubscriptionRequestBody';
|
|
128
|
+
import { UpdateApiKeyRequest , UpdateApiKeyRequestIpAllowlistModeEnum } from './UpdateApiKeyRequest';
|
|
102
129
|
import { UpdateLiveActivityRequest , UpdateLiveActivityRequestEventEnum } from './UpdateLiveActivityRequest';
|
|
103
130
|
import { UpdateLiveActivitySuccessResponse } from './UpdateLiveActivitySuccessResponse';
|
|
131
|
+
import { UpdateTemplateRequest } from './UpdateTemplateRequest';
|
|
104
132
|
import { UpdateUserRequest } from './UpdateUserRequest';
|
|
105
133
|
import { User } from './User';
|
|
106
134
|
import { UserIdentityBody } from './UserIdentityBody';
|
|
@@ -126,10 +154,12 @@ const supportedMediaTypes: { [mediaType: string]: number } = {
|
|
|
126
154
|
|
|
127
155
|
|
|
128
156
|
let enumsMap: Set<string> = new Set<string>([
|
|
157
|
+
"ApiKeyTokenIpAllowlistModeEnum",
|
|
129
158
|
"AppApnsEnvEnum",
|
|
130
159
|
"BasicNotificationTargetChannelEnum",
|
|
131
160
|
"BasicNotificationAggregationEnum",
|
|
132
161
|
"BasicNotificationAllOfAggregationEnum",
|
|
162
|
+
"CreateApiKeyRequestIpAllowlistModeEnum",
|
|
133
163
|
"FilterRelationEnum",
|
|
134
164
|
"FilterExpressionRelationEnum",
|
|
135
165
|
"FilterExpressionOperatorEnum",
|
|
@@ -141,23 +171,34 @@ let enumsMap: Set<string> = new Set<string>([
|
|
|
141
171
|
"NotificationWithMetaAggregationEnum",
|
|
142
172
|
"OperatorOperatorEnum",
|
|
143
173
|
"OutcomeDataAggregationEnum",
|
|
174
|
+
"StartLiveActivityRequestEventEnum",
|
|
144
175
|
"SubscriptionTypeEnum",
|
|
145
176
|
"SubscriptionNotificationTargetTargetChannelEnum",
|
|
177
|
+
"TemplateResourceChannelEnum",
|
|
178
|
+
"UpdateApiKeyRequestIpAllowlistModeEnum",
|
|
146
179
|
"UpdateLiveActivityRequestEventEnum",
|
|
147
180
|
]);
|
|
148
181
|
|
|
149
182
|
let typeMap: {[index: string]: any} = {
|
|
183
|
+
"ApiKeyToken": ApiKeyToken,
|
|
184
|
+
"ApiKeyTokensListResponse": ApiKeyTokensListResponse,
|
|
150
185
|
"App": App,
|
|
151
186
|
"BasicNotification": BasicNotification,
|
|
152
187
|
"BasicNotificationAllOf": BasicNotificationAllOf,
|
|
153
188
|
"BasicNotificationAllOfAndroidBackgroundLayout": BasicNotificationAllOfAndroidBackgroundLayout,
|
|
154
189
|
"Button": Button,
|
|
190
|
+
"CopyTemplateRequest": CopyTemplateRequest,
|
|
191
|
+
"CreateApiKeyRequest": CreateApiKeyRequest,
|
|
192
|
+
"CreateApiKeyResponse": CreateApiKeyResponse,
|
|
155
193
|
"CreateNotificationSuccessResponse": CreateNotificationSuccessResponse,
|
|
156
194
|
"CreateSegmentConflictResponse": CreateSegmentConflictResponse,
|
|
157
195
|
"CreateSegmentSuccessResponse": CreateSegmentSuccessResponse,
|
|
196
|
+
"CreateTemplateRequest": CreateTemplateRequest,
|
|
158
197
|
"CreateUserConflictResponse": CreateUserConflictResponse,
|
|
159
198
|
"CreateUserConflictResponseErrorsInner": CreateUserConflictResponseErrorsInner,
|
|
160
199
|
"CreateUserConflictResponseErrorsItemsMeta": CreateUserConflictResponseErrorsItemsMeta,
|
|
200
|
+
"CustomEvent": CustomEvent,
|
|
201
|
+
"CustomEventsRequest": CustomEventsRequest,
|
|
161
202
|
"DeliveryData": DeliveryData,
|
|
162
203
|
"ExportEventsSuccessResponse": ExportEventsSuccessResponse,
|
|
163
204
|
"ExportSubscriptionsRequestBody": ExportSubscriptionsRequestBody,
|
|
@@ -190,12 +231,18 @@ let typeMap: {[index: string]: any} = {
|
|
|
190
231
|
"Segment": Segment,
|
|
191
232
|
"SegmentData": SegmentData,
|
|
192
233
|
"SegmentNotificationTarget": SegmentNotificationTarget,
|
|
234
|
+
"StartLiveActivityRequest": StartLiveActivityRequest,
|
|
235
|
+
"StartLiveActivitySuccessResponse": StartLiveActivitySuccessResponse,
|
|
193
236
|
"Subscription": Subscription,
|
|
194
237
|
"SubscriptionBody": SubscriptionBody,
|
|
195
238
|
"SubscriptionNotificationTarget": SubscriptionNotificationTarget,
|
|
239
|
+
"TemplateResource": TemplateResource,
|
|
240
|
+
"TemplatesListResponse": TemplatesListResponse,
|
|
196
241
|
"TransferSubscriptionRequestBody": TransferSubscriptionRequestBody,
|
|
242
|
+
"UpdateApiKeyRequest": UpdateApiKeyRequest,
|
|
197
243
|
"UpdateLiveActivityRequest": UpdateLiveActivityRequest,
|
|
198
244
|
"UpdateLiveActivitySuccessResponse": UpdateLiveActivitySuccessResponse,
|
|
245
|
+
"UpdateTemplateRequest": UpdateTemplateRequest,
|
|
199
246
|
"UpdateUserRequest": UpdateUserRequest,
|
|
200
247
|
"User": User,
|
|
201
248
|
"UserIdentityBody": UserIdentityBody,
|
package/models/Operator.ts
CHANGED
package/models/OutcomeData.ts
CHANGED
package/models/OutcomesData.ts
CHANGED
package/models/PropertiesBody.ts
CHANGED
package/models/Purchase.ts
CHANGED
package/models/RateLimitError.ts
CHANGED
package/models/Segment.ts
CHANGED
package/models/SegmentData.ts
CHANGED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OneSignal
|
|
3
|
+
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
|
4
|
+
*
|
|
5
|
+
* API Version: 5.3.0
|
|
6
|
+
* Contact: devrel@onesignal.com
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { FilterExpression } from './FilterExpression';
|
|
10
|
+
import { LanguageStringMap } from './LanguageStringMap';
|
|
11
|
+
import { HttpFile } from '../http/http';
|
|
12
|
+
|
|
13
|
+
export class StartLiveActivityRequest {
|
|
14
|
+
/**
|
|
15
|
+
* An internal name to assist with your campaign organization. This does not get displayed in the message itself.
|
|
16
|
+
*/
|
|
17
|
+
'name': string;
|
|
18
|
+
'event': StartLiveActivityRequestEventEnum;
|
|
19
|
+
/**
|
|
20
|
+
* Set a unique activity_id to track and manage the Live Activity.
|
|
21
|
+
*/
|
|
22
|
+
'activity_id': string;
|
|
23
|
+
/**
|
|
24
|
+
* Default/static data to initialize the Live Activity upon start.
|
|
25
|
+
*/
|
|
26
|
+
'event_attributes': object;
|
|
27
|
+
/**
|
|
28
|
+
* Dynamic content used to update the running Live Activity at start. Must match the ContentState interface defined in your app.
|
|
29
|
+
*/
|
|
30
|
+
'event_updates': object;
|
|
31
|
+
'contents': LanguageStringMap;
|
|
32
|
+
'headings': LanguageStringMap;
|
|
33
|
+
/**
|
|
34
|
+
* Accepts Unix timestamp in seconds. When time reaches the configured stale date, the system considers the Live Activity out of date, and the ActivityState of the Live Activity changes to ActivityState.stale.
|
|
35
|
+
*/
|
|
36
|
+
'stale_date'?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Delivery priority through the push provider (APNs). Pass 10 for higher priority notifications, or 5 for lower priority notifications. Lower priority notifications are sent based on the power considerations of the end user\'s device. If not set, defaults to 10.
|
|
39
|
+
*/
|
|
40
|
+
'priority'?: number;
|
|
41
|
+
/**
|
|
42
|
+
* iOS 15+. A score to indicate how a notification should be displayed when grouped. Use a float between 0-1.
|
|
43
|
+
*/
|
|
44
|
+
'ios_relevance_score'?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it\'s important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true
|
|
47
|
+
*/
|
|
48
|
+
'idempotency_key'?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: If targeting push, email, or sms subscribers with same ids, use with target_channel to indicate you are sending a push or email or sms.
|
|
51
|
+
*/
|
|
52
|
+
'include_aliases'?: { [key: string]: Array<string>; };
|
|
53
|
+
/**
|
|
54
|
+
* Specific subscription ids to target. Not compatible with other targeting parameters.
|
|
55
|
+
*/
|
|
56
|
+
'include_subscription_ids'?: Array<string>;
|
|
57
|
+
/**
|
|
58
|
+
* Segment names to include. Only compatible with excluded_segments.
|
|
59
|
+
*/
|
|
60
|
+
'included_segments'?: Array<string>;
|
|
61
|
+
/**
|
|
62
|
+
* Segment names to exclude. Only compatible with included_segments.
|
|
63
|
+
*/
|
|
64
|
+
'excluded_segments'?: Array<string>;
|
|
65
|
+
'filters'?: Array<FilterExpression>;
|
|
66
|
+
|
|
67
|
+
static readonly discriminator: string | undefined = undefined;
|
|
68
|
+
|
|
69
|
+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
|
70
|
+
{
|
|
71
|
+
"name": "name",
|
|
72
|
+
"baseName": "name",
|
|
73
|
+
"type": "string",
|
|
74
|
+
"format": ""
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "event",
|
|
78
|
+
"baseName": "event",
|
|
79
|
+
"type": "StartLiveActivityRequestEventEnum",
|
|
80
|
+
"format": ""
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "activity_id",
|
|
84
|
+
"baseName": "activity_id",
|
|
85
|
+
"type": "string",
|
|
86
|
+
"format": ""
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "event_attributes",
|
|
90
|
+
"baseName": "event_attributes",
|
|
91
|
+
"type": "object",
|
|
92
|
+
"format": ""
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "event_updates",
|
|
96
|
+
"baseName": "event_updates",
|
|
97
|
+
"type": "object",
|
|
98
|
+
"format": ""
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "contents",
|
|
102
|
+
"baseName": "contents",
|
|
103
|
+
"type": "LanguageStringMap",
|
|
104
|
+
"format": ""
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "headings",
|
|
108
|
+
"baseName": "headings",
|
|
109
|
+
"type": "LanguageStringMap",
|
|
110
|
+
"format": ""
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "stale_date",
|
|
114
|
+
"baseName": "stale_date",
|
|
115
|
+
"type": "number",
|
|
116
|
+
"format": ""
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "priority",
|
|
120
|
+
"baseName": "priority",
|
|
121
|
+
"type": "number",
|
|
122
|
+
"format": ""
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "ios_relevance_score",
|
|
126
|
+
"baseName": "ios_relevance_score",
|
|
127
|
+
"type": "number",
|
|
128
|
+
"format": ""
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "idempotency_key",
|
|
132
|
+
"baseName": "idempotency_key",
|
|
133
|
+
"type": "string",
|
|
134
|
+
"format": ""
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "include_aliases",
|
|
138
|
+
"baseName": "include_aliases",
|
|
139
|
+
"type": "{ [key: string]: Array<string>; }",
|
|
140
|
+
"format": ""
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "include_subscription_ids",
|
|
144
|
+
"baseName": "include_subscription_ids",
|
|
145
|
+
"type": "Array<string>",
|
|
146
|
+
"format": ""
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "included_segments",
|
|
150
|
+
"baseName": "included_segments",
|
|
151
|
+
"type": "Array<string>",
|
|
152
|
+
"format": ""
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "excluded_segments",
|
|
156
|
+
"baseName": "excluded_segments",
|
|
157
|
+
"type": "Array<string>",
|
|
158
|
+
"format": ""
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "filters",
|
|
162
|
+
"baseName": "filters",
|
|
163
|
+
"type": "Array<FilterExpression>",
|
|
164
|
+
"format": ""
|
|
165
|
+
} ];
|
|
166
|
+
|
|
167
|
+
static getAttributeTypeMap() {
|
|
168
|
+
return StartLiveActivityRequest.attributeTypeMap;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
public constructor() {
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
export type StartLiveActivityRequestEventEnum = "start" ;
|
|
177
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OneSignal
|
|
3
|
+
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
|
4
|
+
*
|
|
5
|
+
* API Version: 5.3.0
|
|
6
|
+
* Contact: devrel@onesignal.com
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { HttpFile } from '../http/http';
|
|
10
|
+
|
|
11
|
+
export class StartLiveActivitySuccessResponse {
|
|
12
|
+
'notification_id'?: string;
|
|
13
|
+
|
|
14
|
+
static readonly discriminator: string | undefined = undefined;
|
|
15
|
+
|
|
16
|
+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
|
17
|
+
{
|
|
18
|
+
"name": "notification_id",
|
|
19
|
+
"baseName": "notification_id",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": ""
|
|
22
|
+
} ];
|
|
23
|
+
|
|
24
|
+
static getAttributeTypeMap() {
|
|
25
|
+
return StartLiveActivitySuccessResponse.attributeTypeMap;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
public constructor() {
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
package/models/Subscription.ts
CHANGED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OneSignal
|
|
3
|
+
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
|
4
|
+
*
|
|
5
|
+
* API Version: 5.3.0
|
|
6
|
+
* Contact: devrel@onesignal.com
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { HttpFile } from '../http/http';
|
|
10
|
+
|
|
11
|
+
export class TemplateResource {
|
|
12
|
+
'id'?: string;
|
|
13
|
+
'name'?: string;
|
|
14
|
+
'created_at'?: string;
|
|
15
|
+
'updated_at'?: string;
|
|
16
|
+
'channel'?: TemplateResourceChannelEnum;
|
|
17
|
+
/**
|
|
18
|
+
* Rendered content and channel/platform flags for the template.
|
|
19
|
+
*/
|
|
20
|
+
'content'?: { [key: string]: any; };
|
|
21
|
+
|
|
22
|
+
static readonly discriminator: string | undefined = undefined;
|
|
23
|
+
|
|
24
|
+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
|
25
|
+
{
|
|
26
|
+
"name": "id",
|
|
27
|
+
"baseName": "id",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"format": ""
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "name",
|
|
33
|
+
"baseName": "name",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"format": ""
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "created_at",
|
|
39
|
+
"baseName": "created_at",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"format": "date-time"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "updated_at",
|
|
45
|
+
"baseName": "updated_at",
|
|
46
|
+
"type": "string",
|
|
47
|
+
"format": "date-time"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "channel",
|
|
51
|
+
"baseName": "channel",
|
|
52
|
+
"type": "TemplateResourceChannelEnum",
|
|
53
|
+
"format": ""
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "content",
|
|
57
|
+
"baseName": "content",
|
|
58
|
+
"type": "{ [key: string]: any; }",
|
|
59
|
+
"format": ""
|
|
60
|
+
} ];
|
|
61
|
+
|
|
62
|
+
static getAttributeTypeMap() {
|
|
63
|
+
return TemplateResource.attributeTypeMap;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
public constructor() {
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
export type TemplateResourceChannelEnum = "push" | "email" | "sms" ;
|
|
72
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OneSignal
|
|
3
|
+
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
|
|
4
|
+
*
|
|
5
|
+
* API Version: 5.3.0
|
|
6
|
+
* Contact: devrel@onesignal.com
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { TemplateResource } from './TemplateResource';
|
|
10
|
+
import { HttpFile } from '../http/http';
|
|
11
|
+
|
|
12
|
+
export class TemplatesListResponse {
|
|
13
|
+
'templates'?: Array<TemplateResource>;
|
|
14
|
+
|
|
15
|
+
static readonly discriminator: string | undefined = undefined;
|
|
16
|
+
|
|
17
|
+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
|
18
|
+
{
|
|
19
|
+
"name": "templates",
|
|
20
|
+
"baseName": "templates",
|
|
21
|
+
"type": "Array<TemplateResource>",
|
|
22
|
+
"format": ""
|
|
23
|
+
} ];
|
|
24
|
+
|
|
25
|
+
static getAttributeTypeMap() {
|
|
26
|
+
return TemplatesListResponse.attributeTypeMap;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
public constructor() {
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|