@onesignal/node-onesignal 2.0.1-beta2 → 5.0.0-alpha-01

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. package/DefaultApi.md +401 -778
  2. package/apis/DefaultApi.ts +682 -1216
  3. package/auth/auth.ts +14 -14
  4. package/configuration.ts +6 -6
  5. package/dist/apis/DefaultApi.d.ts +36 -63
  6. package/dist/apis/DefaultApi.js +653 -1174
  7. package/dist/apis/DefaultApi.js.map +1 -1
  8. package/dist/auth/auth.d.ts +6 -6
  9. package/dist/auth/auth.js +19 -19
  10. package/dist/auth/auth.js.map +1 -1
  11. package/dist/configuration.d.ts +2 -2
  12. package/dist/configuration.js +4 -4
  13. package/dist/configuration.js.map +1 -1
  14. package/dist/models/BasicNotification.d.ts +14 -12
  15. package/dist/models/BasicNotification.js +20 -20
  16. package/dist/models/BasicNotification.js.map +1 -1
  17. package/dist/models/BasicNotificationAllOf.d.ts +10 -8
  18. package/dist/models/BasicNotificationAllOf.js +17 -11
  19. package/dist/models/BasicNotificationAllOf.js.map +1 -1
  20. package/dist/models/CreateNotificationSuccessResponse.d.ts +1 -3
  21. package/dist/models/CreateNotificationSuccessResponse.js +1 -7
  22. package/dist/models/CreateNotificationSuccessResponse.js.map +1 -1
  23. package/dist/models/{ExportPlayersRequestBody.d.ts → ExportSubscriptionsRequestBody.d.ts} +1 -1
  24. package/dist/models/ExportSubscriptionsRequestBody.js +34 -0
  25. package/dist/models/ExportSubscriptionsRequestBody.js.map +1 -0
  26. package/dist/models/{ExportPlayersSuccessResponse.d.ts → ExportSubscriptionsSuccessResponse.d.ts} +1 -1
  27. package/dist/models/ExportSubscriptionsSuccessResponse.js +22 -0
  28. package/dist/models/ExportSubscriptionsSuccessResponse.js.map +1 -0
  29. package/dist/models/Filter.d.ts +6 -2
  30. package/dist/models/Filter.js +24 -0
  31. package/dist/models/Filter.js.map +1 -1
  32. package/dist/models/FilterExpression.d.ts +27 -0
  33. package/dist/models/FilterExpression.js +70 -0
  34. package/dist/models/FilterExpression.js.map +1 -0
  35. package/dist/models/GenericError.d.ts +3 -2
  36. package/dist/models/GenericError.js +13 -1
  37. package/dist/models/GenericError.js.map +1 -1
  38. package/dist/models/{DeletePlayerSuccessResponse.d.ts → GenericSuccessBoolResponse.d.ts} +1 -1
  39. package/dist/models/GenericSuccessBoolResponse.js +22 -0
  40. package/dist/models/GenericSuccessBoolResponse.js.map +1 -0
  41. package/dist/models/{GetNotificationRequestBody.d.ts → GetNotificationHistoryRequestBody.d.ts} +3 -3
  42. package/dist/models/GetNotificationHistoryRequestBody.js +34 -0
  43. package/dist/models/GetNotificationHistoryRequestBody.js.map +1 -0
  44. package/dist/models/{PlayerSlice.d.ts → GetSegmentsSuccessResponse.d.ts} +3 -3
  45. package/dist/models/GetSegmentsSuccessResponse.js +40 -0
  46. package/dist/models/GetSegmentsSuccessResponse.js.map +1 -0
  47. package/dist/models/InvalidIdentifierError.d.ts +1 -1
  48. package/dist/models/InvalidIdentifierError.js +2 -2
  49. package/dist/models/InvalidIdentifierError.js.map +1 -1
  50. package/dist/models/{StringMap.d.ts → LanguageStringMap.d.ts} +1 -1
  51. package/dist/models/{StringMap.js → LanguageStringMap.js} +10 -10
  52. package/dist/models/LanguageStringMap.js.map +1 -0
  53. package/dist/models/Notification.d.ts +14 -12
  54. package/dist/models/Notification.js +20 -20
  55. package/dist/models/Notification.js.map +1 -1
  56. package/dist/models/NotificationTarget.d.ts +4 -4
  57. package/dist/models/NotificationTarget.js +3 -9
  58. package/dist/models/NotificationTarget.js.map +1 -1
  59. package/dist/models/NotificationWithMeta.d.ts +14 -12
  60. package/dist/models/NotificationWithMeta.js +20 -20
  61. package/dist/models/NotificationWithMeta.js.map +1 -1
  62. package/dist/models/ObjectSerializer.d.ts +15 -32
  63. package/dist/models/ObjectSerializer.js +50 -102
  64. package/dist/models/ObjectSerializer.js.map +1 -1
  65. package/dist/models/{InlineResponse202.d.ts → PropertiesBody.d.ts} +1 -1
  66. package/dist/models/PropertiesBody.js +22 -0
  67. package/dist/models/PropertiesBody.js.map +1 -0
  68. package/dist/models/{DeleteSegmentNotFoundResponse.d.ts → RateLimitError.d.ts} +3 -2
  69. package/dist/models/RateLimitError.js +28 -0
  70. package/dist/models/RateLimitError.js.map +1 -0
  71. package/dist/models/Segment.d.ts +2 -2
  72. package/dist/models/Segment.js +1 -1
  73. package/dist/models/Segment.js.map +1 -1
  74. package/dist/models/{CreateSubscriptionRequestBody.d.ts → SegmentData.d.ts} +8 -4
  75. package/dist/models/SegmentData.js +58 -0
  76. package/dist/models/SegmentData.js.map +1 -0
  77. package/dist/models/{SubscriptionObject.d.ts → Subscription.d.ts} +3 -3
  78. package/dist/models/{SubscriptionObject.js → Subscription.js} +11 -11
  79. package/dist/models/Subscription.js.map +1 -0
  80. package/dist/models/{CreatePlayerSuccessResponse.d.ts → SubscriptionBody.d.ts} +3 -3
  81. package/dist/models/SubscriptionBody.js +22 -0
  82. package/dist/models/SubscriptionBody.js.map +1 -0
  83. package/dist/models/{PlayerNotificationTarget.d.ts → SubscriptionNotificationTarget.d.ts} +7 -7
  84. package/dist/models/{PlayerNotificationTarget.js → SubscriptionNotificationTarget.js} +14 -20
  85. package/dist/models/SubscriptionNotificationTarget.js.map +1 -0
  86. package/dist/models/TransferSubscriptionRequestBody.d.ts +1 -1
  87. package/dist/models/TransferSubscriptionRequestBody.js +1 -1
  88. package/dist/models/TransferSubscriptionRequestBody.js.map +1 -1
  89. package/dist/models/UpdateLiveActivityRequest.d.ts +8 -3
  90. package/dist/models/UpdateLiveActivityRequest.js +33 -3
  91. package/dist/models/UpdateLiveActivityRequest.js.map +1 -1
  92. package/dist/models/UpdateLiveActivitySuccessResponse.d.ts +1 -3
  93. package/dist/models/UpdateLiveActivitySuccessResponse.js +2 -8
  94. package/dist/models/UpdateLiveActivitySuccessResponse.js.map +1 -1
  95. package/dist/models/User.d.ts +3 -5
  96. package/dist/models/User.js +2 -8
  97. package/dist/models/User.js.map +1 -1
  98. package/dist/models/{InlineResponse200.d.ts → UserIdentityBody.d.ts} +2 -2
  99. package/dist/models/UserIdentityBody.js +22 -0
  100. package/dist/models/UserIdentityBody.js.map +1 -0
  101. package/dist/models/{BeginLiveActivityRequest.d.ts → WebButton.d.ts} +5 -3
  102. package/dist/models/WebButton.js +40 -0
  103. package/dist/models/WebButton.js.map +1 -0
  104. package/dist/models/all.d.ts +15 -32
  105. package/dist/models/all.js +15 -32
  106. package/dist/models/all.js.map +1 -1
  107. package/dist/servers.js +1 -1
  108. package/dist/servers.js.map +1 -1
  109. package/dist/types/ObjectParamAPI.d.ts +52 -102
  110. package/dist/types/ObjectParamAPI.js +26 -47
  111. package/dist/types/ObjectParamAPI.js.map +1 -1
  112. package/dist/types/ObservableAPI.d.ts +25 -45
  113. package/dist/types/ObservableAPI.js +82 -250
  114. package/dist/types/ObservableAPI.js.map +1 -1
  115. package/dist/types/PromiseAPI.d.ts +25 -45
  116. package/dist/types/PromiseAPI.js +32 -60
  117. package/dist/types/PromiseAPI.js.map +1 -1
  118. package/models/App.ts +1 -1
  119. package/models/BasicNotification.ts +49 -46
  120. package/models/BasicNotificationAllOf.ts +34 -23
  121. package/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +1 -1
  122. package/models/Button.ts +1 -1
  123. package/models/CreateNotificationSuccessResponse.ts +5 -13
  124. package/models/CreateSegmentConflictResponse.ts +1 -1
  125. package/models/CreateSegmentSuccessResponse.ts +1 -1
  126. package/models/CreateUserConflictResponse.ts +1 -1
  127. package/models/CreateUserConflictResponseErrorsInner.ts +1 -1
  128. package/models/CreateUserConflictResponseErrorsItemsMeta.ts +1 -1
  129. package/models/DeliveryData.ts +1 -1
  130. package/models/ExportEventsSuccessResponse.ts +1 -1
  131. package/models/{ExportPlayersRequestBody.ts → ExportSubscriptionsRequestBody.ts} +3 -3
  132. package/models/{ExportPlayersSuccessResponse.ts → ExportSubscriptionsSuccessResponse.ts} +3 -3
  133. package/models/Filter.ts +45 -5
  134. package/models/FilterExpression.ts +120 -0
  135. package/models/GenericError.ts +17 -4
  136. package/models/{DeletePlayerSuccessResponse.ts → GenericSuccessBoolResponse.ts} +3 -3
  137. package/models/{GetNotificationRequestBody.ts → GetNotificationHistoryRequestBody.ts} +6 -6
  138. package/models/{PlayerSlice.ts → GetSegmentsSuccessResponse.ts} +20 -8
  139. package/models/InvalidIdentifierError.ts +6 -6
  140. package/models/{StringMap.ts → LanguageStringMap.ts} +3 -3
  141. package/models/Notification.ts +49 -46
  142. package/models/NotificationAllOf.ts +1 -1
  143. package/models/NotificationHistorySuccessResponse.ts +1 -1
  144. package/models/NotificationSlice.ts +1 -1
  145. package/models/NotificationTarget.ts +17 -25
  146. package/models/NotificationWithMeta.ts +49 -46
  147. package/models/NotificationWithMetaAllOf.ts +1 -1
  148. package/models/ObjectSerializer.ts +57 -109
  149. package/models/Operator.ts +1 -1
  150. package/models/OutcomeData.ts +1 -1
  151. package/models/OutcomesData.ts +1 -1
  152. package/models/PlatformDeliveryData.ts +1 -1
  153. package/models/PlatformDeliveryDataEmailAllOf.ts +1 -1
  154. package/models/PlatformDeliveryDataSmsAllOf.ts +1 -1
  155. package/models/{InlineResponse202.ts → PropertiesBody.ts} +3 -3
  156. package/models/PropertiesDeltas.ts +1 -1
  157. package/models/PropertiesObject.ts +1 -1
  158. package/models/Purchase.ts +1 -1
  159. package/models/{CreatePlayerSuccessResponse.ts → RateLimitError.ts} +10 -10
  160. package/models/Segment.ts +4 -4
  161. package/models/SegmentData.ts +94 -0
  162. package/models/SegmentNotificationTarget.ts +1 -1
  163. package/models/{SubscriptionObject.ts → Subscription.ts} +6 -6
  164. package/models/{InlineResponse201.ts → SubscriptionBody.ts} +6 -6
  165. package/models/{PlayerNotificationTarget.ts → SubscriptionNotificationTarget.ts} +21 -29
  166. package/models/TransferSubscriptionRequestBody.ts +3 -3
  167. package/models/UpdateLiveActivityRequest.ts +56 -9
  168. package/models/UpdateLiveActivitySuccessResponse.ts +4 -12
  169. package/models/UpdateUserRequest.ts +1 -1
  170. package/models/User.ts +6 -14
  171. package/models/{InlineResponse200.ts → UserIdentityBody.ts} +5 -5
  172. package/models/{BeginLiveActivityRequest.ts → WebButton.ts} +23 -9
  173. package/models/all.ts +15 -32
  174. package/package.json +2 -2
  175. package/servers.ts +1 -1
  176. package/types/ObjectParamAPI.ts +161 -357
  177. package/types/ObservableAPI.ts +108 -301
  178. package/types/PromiseAPI.ts +89 -184
  179. package/dist/models/BeginLiveActivityRequest.js +0 -28
  180. package/dist/models/BeginLiveActivityRequest.js.map +0 -1
  181. package/dist/models/CancelNotificationSuccessResponse.d.ts +0 -17
  182. package/dist/models/CancelNotificationSuccessResponse.js +0 -22
  183. package/dist/models/CancelNotificationSuccessResponse.js.map +0 -1
  184. package/dist/models/CreatePlayerSuccessResponse.js +0 -28
  185. package/dist/models/CreatePlayerSuccessResponse.js.map +0 -1
  186. package/dist/models/CreateSubscriptionRequestBody.js +0 -28
  187. package/dist/models/CreateSubscriptionRequestBody.js.map +0 -1
  188. package/dist/models/DeletePlayerNotFoundResponse.d.ts +0 -17
  189. package/dist/models/DeletePlayerNotFoundResponse.js +0 -22
  190. package/dist/models/DeletePlayerNotFoundResponse.js.map +0 -1
  191. package/dist/models/DeletePlayerSuccessResponse.js +0 -22
  192. package/dist/models/DeletePlayerSuccessResponse.js.map +0 -1
  193. package/dist/models/DeleteSegmentNotFoundResponse.js +0 -22
  194. package/dist/models/DeleteSegmentNotFoundResponse.js.map +0 -1
  195. package/dist/models/DeleteSegmentSuccessResponse.d.ts +0 -17
  196. package/dist/models/DeleteSegmentSuccessResponse.js +0 -22
  197. package/dist/models/DeleteSegmentSuccessResponse.js.map +0 -1
  198. package/dist/models/ExportPlayersRequestBody.js +0 -34
  199. package/dist/models/ExportPlayersRequestBody.js.map +0 -1
  200. package/dist/models/ExportPlayersSuccessResponse.js +0 -22
  201. package/dist/models/ExportPlayersSuccessResponse.js.map +0 -1
  202. package/dist/models/FilterExpressions.d.ts +0 -23
  203. package/dist/models/FilterExpressions.js +0 -46
  204. package/dist/models/FilterExpressions.js.map +0 -1
  205. package/dist/models/GetNotificationRequestBody.js +0 -34
  206. package/dist/models/GetNotificationRequestBody.js.map +0 -1
  207. package/dist/models/InlineResponse200.js +0 -22
  208. package/dist/models/InlineResponse200.js.map +0 -1
  209. package/dist/models/InlineResponse2003.d.ts +0 -17
  210. package/dist/models/InlineResponse2003.js +0 -22
  211. package/dist/models/InlineResponse2003.js.map +0 -1
  212. package/dist/models/InlineResponse201.d.ts +0 -18
  213. package/dist/models/InlineResponse201.js +0 -22
  214. package/dist/models/InlineResponse201.js.map +0 -1
  215. package/dist/models/InlineResponse202.js +0 -22
  216. package/dist/models/InlineResponse202.js.map +0 -1
  217. package/dist/models/Notification200Errors.d.ts +0 -18
  218. package/dist/models/Notification200Errors.js +0 -28
  219. package/dist/models/Notification200Errors.js.map +0 -1
  220. package/dist/models/Player.d.ts +0 -43
  221. package/dist/models/Player.js +0 -178
  222. package/dist/models/Player.js.map +0 -1
  223. package/dist/models/PlayerNotificationTarget.js.map +0 -1
  224. package/dist/models/PlayerNotificationTargetIncludeAliases.d.ts +0 -17
  225. package/dist/models/PlayerNotificationTargetIncludeAliases.js +0 -22
  226. package/dist/models/PlayerNotificationTargetIncludeAliases.js.map +0 -1
  227. package/dist/models/PlayerSlice.js +0 -40
  228. package/dist/models/PlayerSlice.js.map +0 -1
  229. package/dist/models/StringMap.js.map +0 -1
  230. package/dist/models/SubscriptionObject.js.map +0 -1
  231. package/dist/models/UpdatePlayerSuccessResponse.d.ts +0 -17
  232. package/dist/models/UpdatePlayerSuccessResponse.js +0 -22
  233. package/dist/models/UpdatePlayerSuccessResponse.js.map +0 -1
  234. package/dist/models/UpdatePlayerTagsRequestBody.d.ts +0 -17
  235. package/dist/models/UpdatePlayerTagsRequestBody.js +0 -22
  236. package/dist/models/UpdatePlayerTagsRequestBody.js.map +0 -1
  237. package/dist/models/UpdatePlayerTagsSuccessResponse.d.ts +0 -17
  238. package/dist/models/UpdatePlayerTagsSuccessResponse.js +0 -22
  239. package/dist/models/UpdatePlayerTagsSuccessResponse.js.map +0 -1
  240. package/dist/models/UpdateSubscriptionRequestBody.d.ts +0 -18
  241. package/dist/models/UpdateSubscriptionRequestBody.js +0 -22
  242. package/dist/models/UpdateSubscriptionRequestBody.js.map +0 -1
  243. package/dist/models/UserIdentityRequestBody.d.ts +0 -19
  244. package/dist/models/UserIdentityRequestBody.js +0 -22
  245. package/dist/models/UserIdentityRequestBody.js.map +0 -1
  246. package/dist/models/UserIdentityResponse.d.ts +0 -19
  247. package/dist/models/UserIdentityResponse.js +0 -22
  248. package/dist/models/UserIdentityResponse.js.map +0 -1
  249. package/dist/models/UserSubscriptionOptions.d.ts +0 -17
  250. package/dist/models/UserSubscriptionOptions.js +0 -22
  251. package/dist/models/UserSubscriptionOptions.js.map +0 -1
  252. package/models/CancelNotificationSuccessResponse.ts +0 -31
  253. package/models/CreateSubscriptionRequestBody.ts +0 -39
  254. package/models/DeletePlayerNotFoundResponse.ts +0 -31
  255. package/models/DeleteSegmentNotFoundResponse.ts +0 -31
  256. package/models/DeleteSegmentSuccessResponse.ts +0 -31
  257. package/models/FilterExpressions.ts +0 -80
  258. package/models/InlineResponse2003.ts +0 -31
  259. package/models/Notification200Errors.ts +0 -45
  260. package/models/Player.ts +0 -291
  261. package/models/PlayerNotificationTargetIncludeAliases.ts +0 -31
  262. package/models/UpdatePlayerSuccessResponse.ts +0 -31
  263. package/models/UpdatePlayerTagsRequestBody.ts +0 -34
  264. package/models/UpdatePlayerTagsSuccessResponse.ts +0 -31
  265. package/models/UpdateSubscriptionRequestBody.ts +0 -32
  266. package/models/UserIdentityRequestBody.ts +0 -31
  267. package/models/UserIdentityResponse.ts +0 -31
  268. package/models/UserSubscriptionOptions.ts +0 -31
@@ -2,13 +2,12 @@
2
2
  * OneSignal
3
3
  * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
4
4
  *
5
- * API Version: 1.2.2
5
+ * API Version: 5.0.0-alpha-01
6
6
  * Contact: devrel@onesignal.com
7
7
  */
8
8
 
9
- import { PlayerNotificationTarget } from './PlayerNotificationTarget';
10
- import { PlayerNotificationTargetIncludeAliases } from './PlayerNotificationTargetIncludeAliases';
11
9
  import { SegmentNotificationTarget } from './SegmentNotificationTarget';
10
+ import { SubscriptionNotificationTarget } from './SubscriptionNotificationTarget';
12
11
  import { HttpFile } from '../http/http';
13
12
 
14
13
  export class NotificationTarget {
@@ -21,13 +20,9 @@ export class NotificationTarget {
21
20
  */
22
21
  'excluded_segments'?: Array<string>;
23
22
  /**
24
- * Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call
23
+ * Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call
25
24
  */
26
- 'include_player_ids'?: Array<string>;
27
- /**
28
- * Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] 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 channel_for_external_user_ids to indicate you are sending a push or email or sms.
29
- */
30
- 'include_external_user_ids'?: Array<string>;
25
+ 'include_subscription_ids'?: Array<string>;
31
26
  /**
32
27
  * Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call
33
28
  */
@@ -37,30 +32,33 @@ export class NotificationTarget {
37
32
  */
38
33
  'include_phone_numbers'?: Array<string>;
39
34
  /**
40
- * Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call
35
+ * Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call
41
36
  */
42
37
  'include_ios_tokens'?: Array<string>;
43
38
  /**
44
- * Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call
39
+ * Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call
45
40
  */
46
41
  'include_wp_wns_uris'?: Array<string>;
47
42
  /**
48
- * Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call
43
+ * Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call
49
44
  */
50
45
  'include_amazon_reg_ids'?: Array<string>;
51
46
  /**
52
- * Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call
47
+ * Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call
53
48
  */
54
49
  'include_chrome_reg_ids'?: Array<string>;
55
50
  /**
56
- * Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call
51
+ * Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call
57
52
  */
58
53
  'include_chrome_web_reg_ids'?: Array<string>;
59
54
  /**
60
- * Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call
55
+ * Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call
61
56
  */
62
57
  'include_android_reg_ids'?: Array<string>;
63
- 'include_aliases'?: PlayerNotificationTargetIncludeAliases;
58
+ /**
59
+ * 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.
60
+ */
61
+ 'include_aliases'?: { [key: string]: Array<string>; };
64
62
  'target_channel'?: NotificationTargetTargetChannelEnum;
65
63
 
66
64
  static readonly discriminator: string | undefined = undefined;
@@ -79,14 +77,8 @@ export class NotificationTarget {
79
77
  "format": ""
80
78
  },
81
79
  {
82
- "name": "include_player_ids",
83
- "baseName": "include_player_ids",
84
- "type": "Array<string>",
85
- "format": ""
86
- },
87
- {
88
- "name": "include_external_user_ids",
89
- "baseName": "include_external_user_ids",
80
+ "name": "include_subscription_ids",
81
+ "baseName": "include_subscription_ids",
90
82
  "type": "Array<string>",
91
83
  "format": ""
92
84
  },
@@ -141,7 +133,7 @@ export class NotificationTarget {
141
133
  {
142
134
  "name": "include_aliases",
143
135
  "baseName": "include_aliases",
144
- "type": "PlayerNotificationTargetIncludeAliases",
136
+ "type": "{ [key: string]: Array<string>; }",
145
137
  "format": ""
146
138
  },
147
139
  {
@@ -2,7 +2,7 @@
2
2
  * OneSignal
3
3
  * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
4
4
  *
5
- * API Version: 1.2.2
5
+ * API Version: 5.0.0-alpha-01
6
6
  * Contact: devrel@onesignal.com
7
7
  */
8
8
 
@@ -10,13 +10,13 @@ import { BasicNotification } from './BasicNotification';
10
10
  import { BasicNotificationAllOfAndroidBackgroundLayout } from './BasicNotificationAllOfAndroidBackgroundLayout';
11
11
  import { Button } from './Button';
12
12
  import { DeliveryData } from './DeliveryData';
13
- import { Filter } from './Filter';
13
+ import { FilterExpression } from './FilterExpression';
14
+ import { LanguageStringMap } from './LanguageStringMap';
14
15
  import { NotificationWithMetaAllOf } from './NotificationWithMetaAllOf';
15
16
  import { OutcomeData } from './OutcomeData';
16
17
  import { OutcomesData } from './OutcomesData';
17
18
  import { PlatformDeliveryData } from './PlatformDeliveryData';
18
- import { PlayerNotificationTargetIncludeAliases } from './PlayerNotificationTargetIncludeAliases';
19
- import { StringMap } from './StringMap';
19
+ import { WebButton } from './WebButton';
20
20
  import { HttpFile } from '../http/http';
21
21
 
22
22
  export class NotificationWithMeta {
@@ -29,13 +29,9 @@ export class NotificationWithMeta {
29
29
  */
30
30
  'excluded_segments'?: Array<string>;
31
31
  /**
32
- * Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call
32
+ * Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call
33
33
  */
34
- 'include_player_ids'?: Array<string>;
35
- /**
36
- * Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] 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 channel_for_external_user_ids to indicate you are sending a push or email or sms.
37
- */
38
- 'include_external_user_ids'?: Array<string>;
34
+ 'include_subscription_ids'?: Array<string>;
39
35
  /**
40
36
  * Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call
41
37
  */
@@ -45,30 +41,33 @@ export class NotificationWithMeta {
45
41
  */
46
42
  'include_phone_numbers'?: Array<string>;
47
43
  /**
48
- * Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call
44
+ * Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call
49
45
  */
50
46
  'include_ios_tokens'?: Array<string>;
51
47
  /**
52
- * Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call
48
+ * Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call
53
49
  */
54
50
  'include_wp_wns_uris'?: Array<string>;
55
51
  /**
56
- * Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call
52
+ * Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call
57
53
  */
58
54
  'include_amazon_reg_ids'?: Array<string>;
59
55
  /**
60
- * Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call
56
+ * Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call
61
57
  */
62
58
  'include_chrome_reg_ids'?: Array<string>;
63
59
  /**
64
- * Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call
60
+ * Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call
65
61
  */
66
62
  'include_chrome_web_reg_ids'?: Array<string>;
67
63
  /**
68
- * Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call
64
+ * Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call
69
65
  */
70
66
  'include_android_reg_ids'?: Array<string>;
71
- 'include_aliases'?: PlayerNotificationTargetIncludeAliases;
67
+ /**
68
+ * 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.
69
+ */
70
+ 'include_aliases'?: { [key: string]: Array<string>; };
72
71
  'target_channel'?: NotificationWithMetaTargetChannelEnum;
73
72
  'id'?: string;
74
73
  'value'?: number;
@@ -118,10 +117,6 @@ export class NotificationWithMeta {
118
117
  */
119
118
  'is_chrome'?: boolean;
120
119
  /**
121
- * Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS.
122
- */
123
- 'channel_for_external_user_ids'?: string;
124
- /**
125
120
  * Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434.
126
121
  */
127
122
  'app_id': string;
@@ -129,9 +124,9 @@ export class NotificationWithMeta {
129
124
  * Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. 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 external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true
130
125
  */
131
126
  'external_id'?: string;
132
- 'contents'?: StringMap;
133
- 'headings'?: StringMap;
134
- 'subtitle'?: StringMap;
127
+ 'contents'?: LanguageStringMap;
128
+ 'headings'?: LanguageStringMap;
129
+ 'subtitle'?: LanguageStringMap;
135
130
  /**
136
131
  * Channel: Push Notifications Platform: Huawei A custom map of data that is passed back to your app. Same as using Additional Data within the dashboard. Can use up to 2048 bytes of data. Example: {\"abc\": 123, \"foo\": \"bar\", \"event_performed\": true, \"amount\": 12.1}
137
132
  */
@@ -199,7 +194,7 @@ export class NotificationWithMeta {
199
194
  /**
200
195
  * Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}]
201
196
  */
202
- 'web_buttons'?: Array<Button>;
197
+ 'web_buttons'?: Array<WebButton>;
203
198
  /**
204
199
  * Channel: Push Notifications Platform: iOS Category APS payload, use with registerUserNotificationSettings:categories in your Objective-C / Swift code. Example: calendar category which contains actions like accept and decline iOS 10+ This will trigger your UNNotificationContentExtension whose ID matches this category.
205
200
  */
@@ -378,6 +373,14 @@ export class NotificationWithMeta {
378
373
  */
379
374
  'summary_arg_count'?: number;
380
375
  /**
376
+ * Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1.
377
+ */
378
+ 'ios_relevance_score'?: number;
379
+ /**
380
+ * Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: [\'active\', \'passive\', \'time_sensitive\', \'critical\']. Default is active.
381
+ */
382
+ 'ios_interruption_level'?: string;
383
+ /**
381
384
  * Channel: Email Required. The subject of the email.
382
385
  */
383
386
  'email_subject'?: string;
@@ -409,7 +412,7 @@ export class NotificationWithMeta {
409
412
  * Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs.
410
413
  */
411
414
  'sms_media_urls'?: Array<string>;
412
- 'filters'?: Array<Filter>;
415
+ 'filters'?: Array<FilterExpression>;
413
416
  /**
414
417
  * Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25}
415
418
  */
@@ -469,14 +472,8 @@ export class NotificationWithMeta {
469
472
  "format": ""
470
473
  },
471
474
  {
472
- "name": "include_player_ids",
473
- "baseName": "include_player_ids",
474
- "type": "Array<string>",
475
- "format": ""
476
- },
477
- {
478
- "name": "include_external_user_ids",
479
- "baseName": "include_external_user_ids",
475
+ "name": "include_subscription_ids",
476
+ "baseName": "include_subscription_ids",
480
477
  "type": "Array<string>",
481
478
  "format": ""
482
479
  },
@@ -531,7 +528,7 @@ export class NotificationWithMeta {
531
528
  {
532
529
  "name": "include_aliases",
533
530
  "baseName": "include_aliases",
534
- "type": "PlayerNotificationTargetIncludeAliases",
531
+ "type": "{ [key: string]: Array<string>; }",
535
532
  "format": ""
536
533
  },
537
534
  {
@@ -624,12 +621,6 @@ export class NotificationWithMeta {
624
621
  "type": "boolean",
625
622
  "format": ""
626
623
  },
627
- {
628
- "name": "channel_for_external_user_ids",
629
- "baseName": "channel_for_external_user_ids",
630
- "type": "string",
631
- "format": ""
632
- },
633
624
  {
634
625
  "name": "app_id",
635
626
  "baseName": "app_id",
@@ -645,19 +636,19 @@ export class NotificationWithMeta {
645
636
  {
646
637
  "name": "contents",
647
638
  "baseName": "contents",
648
- "type": "StringMap",
639
+ "type": "LanguageStringMap",
649
640
  "format": ""
650
641
  },
651
642
  {
652
643
  "name": "headings",
653
644
  "baseName": "headings",
654
- "type": "StringMap",
645
+ "type": "LanguageStringMap",
655
646
  "format": ""
656
647
  },
657
648
  {
658
649
  "name": "subtitle",
659
650
  "baseName": "subtitle",
660
- "type": "StringMap",
651
+ "type": "LanguageStringMap",
661
652
  "format": ""
662
653
  },
663
654
  {
@@ -759,7 +750,7 @@ export class NotificationWithMeta {
759
750
  {
760
751
  "name": "web_buttons",
761
752
  "baseName": "web_buttons",
762
- "type": "Array<Button>",
753
+ "type": "Array<WebButton>",
763
754
  "format": ""
764
755
  },
765
756
  {
@@ -1032,6 +1023,18 @@ export class NotificationWithMeta {
1032
1023
  "type": "number",
1033
1024
  "format": ""
1034
1025
  },
1026
+ {
1027
+ "name": "ios_relevance_score",
1028
+ "baseName": "ios_relevance_score",
1029
+ "type": "number",
1030
+ "format": ""
1031
+ },
1032
+ {
1033
+ "name": "ios_interruption_level",
1034
+ "baseName": "ios_interruption_level",
1035
+ "type": "string",
1036
+ "format": ""
1037
+ },
1035
1038
  {
1036
1039
  "name": "email_subject",
1037
1040
  "baseName": "email_subject",
@@ -1083,7 +1086,7 @@ export class NotificationWithMeta {
1083
1086
  {
1084
1087
  "name": "filters",
1085
1088
  "baseName": "filters",
1086
- "type": "Array<Filter>",
1089
+ "type": "Array<FilterExpression>",
1087
1090
  "format": ""
1088
1091
  },
1089
1092
  {
@@ -2,7 +2,7 @@
2
2
  * OneSignal
3
3
  * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
4
4
  *
5
- * API Version: 1.2.2
5
+ * API Version: 5.0.0-alpha-01
6
6
  * Contact: devrel@onesignal.com
7
7
  */
8
8