@onesignal/node-onesignal 1.0.0-beta4 → 1.0.0-beta5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/.github/ISSUE_TEMPLATE/ask-question.yml +25 -0
  2. package/.github/ISSUE_TEMPLATE/bug-report.yml +51 -0
  3. package/.github/ISSUE_TEMPLATE/general-feedback.yml +25 -0
  4. package/.github/pull_request_template.md +44 -0
  5. package/.github/workflows/npm_deploy.yml +21 -0
  6. package/CHANGELOG.md +26 -0
  7. package/DefaultApi.md +1232 -0
  8. package/LICENSE +24 -0
  9. package/README.md +205 -102
  10. package/RELEASE_INSTRUCTIONS.md +2 -0
  11. package/apis/DefaultApi.ts +519 -532
  12. package/apis/baseapi.ts +4 -4
  13. package/apis/exception.ts +4 -3
  14. package/auth/auth.ts +4 -1
  15. package/configuration.ts +21 -2
  16. package/http/http.ts +26 -26
  17. package/index.ts +1 -0
  18. package/middleware.ts +1 -1
  19. package/models/App.ts +8 -8
  20. package/models/BasicNotification.ts +1019 -0
  21. package/models/BasicNotificationAllOf.ts +897 -0
  22. package/models/{NotificationAllOfAndroidBackgroundLayout.ts → BasicNotificationAllOfAndroidBackgroundLayout.ts} +4 -4
  23. package/models/Button.ts +2 -2
  24. package/models/CancelNotificationSuccessResponse.ts +31 -0
  25. package/models/{InlineResponse400.ts → CreateNotificationBadRequestResponse.ts} +4 -4
  26. package/models/{InlineResponse200.ts → CreateNotificationSuccessResponse.ts} +7 -6
  27. package/models/{InlineResponse2004.ts → CreatePlayerSuccessResponse.ts} +4 -4
  28. package/models/CreateSegmentBadRequestResponse.ts +38 -0
  29. package/models/{InlineResponse409.ts → CreateSegmentConflictResponse.ts} +4 -4
  30. package/models/{InlineResponse201.ts → CreateSegmentSuccessResponse.ts} +4 -4
  31. package/models/DeletePlayerBadRequestResponse.ts +31 -0
  32. package/models/DeletePlayerNotFoundResponse.ts +31 -0
  33. package/models/{InlineResponse2003.ts → DeletePlayerSuccessResponse.ts} +4 -4
  34. package/models/{InlineResponse4002.ts → DeleteSegmentBadRequestResponse.ts} +4 -4
  35. package/models/DeleteSegmentNotFoundResponse.ts +31 -0
  36. package/models/DeleteSegmentSuccessResponse.ts +31 -0
  37. package/models/DeliveryData.ts +17 -2
  38. package/models/ExportPlayersRequestBody.ts +5 -5
  39. package/models/{InlineResponse2005.ts → ExportPlayersSuccessResponse.ts} +4 -4
  40. package/models/Filter.ts +4 -4
  41. package/models/FilterExpressions.ts +4 -4
  42. package/models/FilterNotificationTarget.ts +2 -2
  43. package/models/GetNotificationRequestBody.ts +2 -2
  44. package/models/InvalidIdentifierError.ts +44 -0
  45. package/models/Notification.ts +72 -174
  46. package/models/Notification200Errors.ts +45 -0
  47. package/models/NotificationAllOf.ts +3 -858
  48. package/models/{InlineResponse4001.ts → NotificationHistoryBadRequestResponse.ts} +4 -4
  49. package/models/{InlineResponse2002.ts → NotificationHistorySuccessResponse.ts} +6 -6
  50. package/models/NotificationSlice.ts +5 -5
  51. package/models/NotificationTarget.ts +3 -124
  52. package/models/NotificationWithMeta.ts +1127 -0
  53. package/models/NotificationWithMetaAllOf.ts +132 -0
  54. package/models/ObjectSerializer.ts +97 -46
  55. package/models/Operator.ts +2 -2
  56. package/models/OutcomeData.ts +2 -2
  57. package/models/OutcomesData.ts +32 -0
  58. package/models/PlatformDeliveryData.ts +18 -2
  59. package/models/PlatformDeliveryDataEmailAllOf.ts +94 -0
  60. package/models/PlatformDeliveryDataSmsAllOf.ts +54 -0
  61. package/models/Player.ts +14 -14
  62. package/models/PlayerNotificationTarget.ts +3 -3
  63. package/models/PlayerSlice.ts +2 -2
  64. package/models/Purchase.ts +2 -2
  65. package/models/Segment.ts +3 -3
  66. package/models/SegmentNotificationTarget.ts +2 -2
  67. package/models/StringMap.ts +3 -3
  68. package/models/{InlineResponse2001.ts → UpdatePlayerSuccessResponse.ts} +6 -6
  69. package/models/UpdatePlayerTagsRequestBody.ts +4 -4
  70. package/models/UpdatePlayerTagsSuccessResponse.ts +31 -0
  71. package/models/all.ts +28 -13
  72. package/package.json +14 -9
  73. package/tsconfig.json +1 -2
  74. package/types/ObjectParamAPI.ts +101 -86
  75. package/types/ObservableAPI.ts +116 -101
  76. package/types/PromiseAPI.ts +97 -82
  77. package/util.ts +10 -1
  78. package/dist/apis/DefaultApi.d.ts +0 -62
  79. package/dist/apis/DefaultApi.js +0 -1317
  80. package/dist/apis/DefaultApi.js.map +0 -1
  81. package/dist/apis/baseapi.d.ts +0 -16
  82. package/dist/apis/baseapi.js +0 -42
  83. package/dist/apis/baseapi.js.map +0 -1
  84. package/dist/apis/exception.d.ts +0 -5
  85. package/dist/apis/exception.js +0 -28
  86. package/dist/apis/exception.js.map +0 -1
  87. package/dist/auth/auth.d.ts +0 -40
  88. package/dist/auth/auth.js +0 -108
  89. package/dist/auth/auth.js.map +0 -1
  90. package/dist/configuration.d.ts +0 -18
  91. package/dist/configuration.js +0 -21
  92. package/dist/configuration.js.map +0 -1
  93. package/dist/http/http.d.ts +0 -72
  94. package/dist/http/http.js +0 -205
  95. package/dist/http/http.js.map +0 -1
  96. package/dist/http/isomorphic-fetch.d.ts +0 -5
  97. package/dist/http/isomorphic-fetch.js +0 -33
  98. package/dist/http/isomorphic-fetch.js.map +0 -1
  99. package/dist/index.d.ts +0 -9
  100. package/dist/index.js +0 -22
  101. package/dist/index.js.map +0 -1
  102. package/dist/middleware.d.ts +0 -16
  103. package/dist/middleware.js +0 -18
  104. package/dist/middleware.js.map +0 -1
  105. package/dist/models/App.d.ts +0 -47
  106. package/dist/models/App.js +0 -196
  107. package/dist/models/App.js.map +0 -1
  108. package/dist/models/Button.d.ts +0 -19
  109. package/dist/models/Button.js +0 -34
  110. package/dist/models/Button.js.map +0 -1
  111. package/dist/models/DeliveryData.d.ts +0 -21
  112. package/dist/models/DeliveryData.js +0 -46
  113. package/dist/models/DeliveryData.js.map +0 -1
  114. package/dist/models/ExportPlayersRequestBody.d.ts +0 -19
  115. package/dist/models/ExportPlayersRequestBody.js +0 -34
  116. package/dist/models/ExportPlayersRequestBody.js.map +0 -1
  117. package/dist/models/Filter.d.ts +0 -21
  118. package/dist/models/Filter.js +0 -40
  119. package/dist/models/Filter.js.map +0 -1
  120. package/dist/models/FilterExpressions.d.ts +0 -23
  121. package/dist/models/FilterExpressions.js +0 -46
  122. package/dist/models/FilterExpressions.js.map +0 -1
  123. package/dist/models/FilterNotificationTarget.d.ts +0 -28
  124. package/dist/models/FilterNotificationTarget.js +0 -88
  125. package/dist/models/FilterNotificationTarget.js.map +0 -1
  126. package/dist/models/GetNotificationRequestBody.d.ts +0 -20
  127. package/dist/models/GetNotificationRequestBody.js +0 -34
  128. package/dist/models/GetNotificationRequestBody.js.map +0 -1
  129. package/dist/models/InlineResponse200.d.ts +0 -20
  130. package/dist/models/InlineResponse200.js +0 -40
  131. package/dist/models/InlineResponse200.js.map +0 -1
  132. package/dist/models/InlineResponse2001.d.ts +0 -17
  133. package/dist/models/InlineResponse2001.js +0 -22
  134. package/dist/models/InlineResponse2001.js.map +0 -1
  135. package/dist/models/InlineResponse2002.d.ts +0 -18
  136. package/dist/models/InlineResponse2002.js +0 -28
  137. package/dist/models/InlineResponse2002.js.map +0 -1
  138. package/dist/models/InlineResponse2003.d.ts +0 -17
  139. package/dist/models/InlineResponse2003.js +0 -22
  140. package/dist/models/InlineResponse2003.js.map +0 -1
  141. package/dist/models/InlineResponse2004.d.ts +0 -18
  142. package/dist/models/InlineResponse2004.js +0 -28
  143. package/dist/models/InlineResponse2004.js.map +0 -1
  144. package/dist/models/InlineResponse2005.d.ts +0 -17
  145. package/dist/models/InlineResponse2005.js +0 -22
  146. package/dist/models/InlineResponse2005.js.map +0 -1
  147. package/dist/models/InlineResponse201.d.ts +0 -18
  148. package/dist/models/InlineResponse201.js +0 -28
  149. package/dist/models/InlineResponse201.js.map +0 -1
  150. package/dist/models/InlineResponse400.d.ts +0 -17
  151. package/dist/models/InlineResponse400.js +0 -22
  152. package/dist/models/InlineResponse400.js.map +0 -1
  153. package/dist/models/InlineResponse4001.d.ts +0 -18
  154. package/dist/models/InlineResponse4001.js +0 -28
  155. package/dist/models/InlineResponse4001.js.map +0 -1
  156. package/dist/models/InlineResponse4002.d.ts +0 -17
  157. package/dist/models/InlineResponse4002.js +0 -22
  158. package/dist/models/InlineResponse4002.js.map +0 -1
  159. package/dist/models/InlineResponse409.d.ts +0 -18
  160. package/dist/models/InlineResponse409.js +0 -28
  161. package/dist/models/InlineResponse409.js.map +0 -1
  162. package/dist/models/Notification.d.ts +0 -132
  163. package/dist/models/Notification.js +0 -688
  164. package/dist/models/Notification.js.map +0 -1
  165. package/dist/models/NotificationAllOf.d.ts +0 -108
  166. package/dist/models/NotificationAllOf.js +0 -544
  167. package/dist/models/NotificationAllOf.js.map +0 -1
  168. package/dist/models/NotificationAllOfAndroidBackgroundLayout.d.ts +0 -19
  169. package/dist/models/NotificationAllOfAndroidBackgroundLayout.js +0 -34
  170. package/dist/models/NotificationAllOfAndroidBackgroundLayout.js.map +0 -1
  171. package/dist/models/NotificationSlice.d.ts +0 -21
  172. package/dist/models/NotificationSlice.js +0 -40
  173. package/dist/models/NotificationSlice.js.map +0 -1
  174. package/dist/models/NotificationTarget.d.ts +0 -40
  175. package/dist/models/NotificationTarget.js +0 -160
  176. package/dist/models/NotificationTarget.js.map +0 -1
  177. package/dist/models/ObjectSerializer.d.ts +0 -44
  178. package/dist/models/ObjectSerializer.js +0 -312
  179. package/dist/models/ObjectSerializer.js.map +0 -1
  180. package/dist/models/Operator.d.ts +0 -18
  181. package/dist/models/Operator.js +0 -22
  182. package/dist/models/Operator.js.map +0 -1
  183. package/dist/models/OutcomeData.d.ts +0 -20
  184. package/dist/models/OutcomeData.js +0 -34
  185. package/dist/models/OutcomeData.js.map +0 -1
  186. package/dist/models/PlatformDeliveryData.d.ts +0 -23
  187. package/dist/models/PlatformDeliveryData.js +0 -52
  188. package/dist/models/PlatformDeliveryData.js.map +0 -1
  189. package/dist/models/Player.d.ts +0 -43
  190. package/dist/models/Player.js +0 -178
  191. package/dist/models/Player.js.map +0 -1
  192. package/dist/models/PlayerNotificationTarget.d.ts +0 -26
  193. package/dist/models/PlayerNotificationTarget.js +0 -76
  194. package/dist/models/PlayerNotificationTarget.js.map +0 -1
  195. package/dist/models/PlayerSlice.d.ts +0 -21
  196. package/dist/models/PlayerSlice.js +0 -40
  197. package/dist/models/PlayerSlice.js.map +0 -1
  198. package/dist/models/Purchase.d.ts +0 -19
  199. package/dist/models/Purchase.js +0 -34
  200. package/dist/models/Purchase.js.map +0 -1
  201. package/dist/models/Segment.d.ts +0 -20
  202. package/dist/models/Segment.js +0 -34
  203. package/dist/models/Segment.js.map +0 -1
  204. package/dist/models/SegmentNotificationTarget.d.ts +0 -18
  205. package/dist/models/SegmentNotificationTarget.js +0 -28
  206. package/dist/models/SegmentNotificationTarget.js.map +0 -1
  207. package/dist/models/StringMap.d.ts +0 -59
  208. package/dist/models/StringMap.js +0 -274
  209. package/dist/models/StringMap.js.map +0 -1
  210. package/dist/models/UpdatePlayerTagsRequestBody.d.ts +0 -17
  211. package/dist/models/UpdatePlayerTagsRequestBody.js +0 -22
  212. package/dist/models/UpdatePlayerTagsRequestBody.js.map +0 -1
  213. package/dist/models/all.d.ts +0 -35
  214. package/dist/models/all.js +0 -48
  215. package/dist/models/all.js.map +0 -1
  216. package/dist/rxjsStub.d.ts +0 -10
  217. package/dist/rxjsStub.js +0 -33
  218. package/dist/rxjsStub.js.map +0 -1
  219. package/dist/servers.d.ts +0 -17
  220. package/dist/servers.js +0 -32
  221. package/dist/servers.js.map +0 -1
  222. package/dist/types/ObjectParamAPI.d.ts +0 -121
  223. package/dist/types/ObjectParamAPI.js +0 -69
  224. package/dist/types/ObjectParamAPI.js.map +0 -1
  225. package/dist/types/ObservableAPI.d.ts +0 -45
  226. package/dist/types/ObservableAPI.js +0 -472
  227. package/dist/types/ObservableAPI.js.map +0 -1
  228. package/dist/types/PromiseAPI.d.ts +0 -42
  229. package/dist/types/PromiseAPI.js +0 -88
  230. package/dist/types/PromiseAPI.js.map +0 -1
  231. package/dist/util.d.ts +0 -1
  232. package/dist/util.js +0 -25
  233. package/dist/util.js.map +0 -1
  234. package/git_push.sh +0 -52
@@ -0,0 +1,132 @@
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: 1.0.1
6
+ * Contact: devrel@onesignal.com
7
+ */
8
+
9
+ import { PlatformDeliveryData } from './PlatformDeliveryData';
10
+ import { HttpFile } from '../http/http';
11
+
12
+ export class NotificationWithMetaAllOf {
13
+ /**
14
+ * Number of notifications that have not been sent out yet. This can mean either our system is still processing the notification or you have delayed options set.
15
+ */
16
+ 'remaining'?: number;
17
+ /**
18
+ * Number of notifications that were successfully delivered.
19
+ */
20
+ 'successful'?: number;
21
+ /**
22
+ * Number of notifications that could not be delivered due to those devices being unsubscribed.
23
+ */
24
+ 'failed'?: number;
25
+ /**
26
+ * Number of notifications that could not be delivered due to an error. You can find more information by viewing the notification in the dashboard.
27
+ */
28
+ 'errored'?: number;
29
+ /**
30
+ * Number of users who have clicked / tapped on your notification.
31
+ */
32
+ 'converted'?: number;
33
+ /**
34
+ * Unix timestamp indicating when the notification was created.
35
+ */
36
+ 'queued_at'?: number;
37
+ /**
38
+ * Unix timestamp indicating when notification delivery should begin.
39
+ */
40
+ 'send_after'?: number;
41
+ /**
42
+ * Unix timestamp indicating when notification delivery completed. The delivery duration from start to finish can be calculated with completed_at - send_after.
43
+ */
44
+ 'completed_at'?: number;
45
+ 'platform_delivery_stats'?: PlatformDeliveryData;
46
+ /**
47
+ * Confirmed Deliveries number of devices that received the push notification. Paid Feature Only. Free accounts will see 0.
48
+ */
49
+ 'received'?: number;
50
+ /**
51
+ * number of push notifications sent per minute. Paid Feature Only. If throttling is not enabled for the app or the notification, and for free accounts, null is returned. Refer to Throttling for more details.
52
+ */
53
+ 'throttle_rate_per_minute'?: number;
54
+
55
+ static readonly discriminator: string | undefined = undefined;
56
+
57
+ static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
58
+ {
59
+ "name": "remaining",
60
+ "baseName": "remaining",
61
+ "type": "number",
62
+ "format": ""
63
+ },
64
+ {
65
+ "name": "successful",
66
+ "baseName": "successful",
67
+ "type": "number",
68
+ "format": ""
69
+ },
70
+ {
71
+ "name": "failed",
72
+ "baseName": "failed",
73
+ "type": "number",
74
+ "format": ""
75
+ },
76
+ {
77
+ "name": "errored",
78
+ "baseName": "errored",
79
+ "type": "number",
80
+ "format": ""
81
+ },
82
+ {
83
+ "name": "converted",
84
+ "baseName": "converted",
85
+ "type": "number",
86
+ "format": ""
87
+ },
88
+ {
89
+ "name": "queued_at",
90
+ "baseName": "queued_at",
91
+ "type": "number",
92
+ "format": "int64"
93
+ },
94
+ {
95
+ "name": "send_after",
96
+ "baseName": "send_after",
97
+ "type": "number",
98
+ "format": "int64"
99
+ },
100
+ {
101
+ "name": "completed_at",
102
+ "baseName": "completed_at",
103
+ "type": "number",
104
+ "format": "int64"
105
+ },
106
+ {
107
+ "name": "platform_delivery_stats",
108
+ "baseName": "platform_delivery_stats",
109
+ "type": "PlatformDeliveryData",
110
+ "format": ""
111
+ },
112
+ {
113
+ "name": "received",
114
+ "baseName": "received",
115
+ "type": "number",
116
+ "format": ""
117
+ },
118
+ {
119
+ "name": "throttle_rate_per_minute",
120
+ "baseName": "throttle_rate_per_minute",
121
+ "type": "number",
122
+ "format": ""
123
+ } ];
124
+
125
+ static getAttributeTypeMap() {
126
+ return NotificationWithMetaAllOf.attributeTypeMap;
127
+ }
128
+
129
+ public constructor() {
130
+ }
131
+ }
132
+
@@ -1,30 +1,43 @@
1
1
  export * from './App';
2
+ export * from './BasicNotification';
3
+ export * from './BasicNotificationAllOf';
4
+ export * from './BasicNotificationAllOfAndroidBackgroundLayout';
2
5
  export * from './Button';
6
+ export * from './CancelNotificationSuccessResponse';
7
+ export * from './CreateNotificationBadRequestResponse';
8
+ export * from './CreateNotificationSuccessResponse';
9
+ export * from './CreatePlayerSuccessResponse';
10
+ export * from './CreateSegmentBadRequestResponse';
11
+ export * from './CreateSegmentConflictResponse';
12
+ export * from './CreateSegmentSuccessResponse';
13
+ export * from './DeletePlayerBadRequestResponse';
14
+ export * from './DeletePlayerNotFoundResponse';
15
+ export * from './DeletePlayerSuccessResponse';
16
+ export * from './DeleteSegmentBadRequestResponse';
17
+ export * from './DeleteSegmentNotFoundResponse';
18
+ export * from './DeleteSegmentSuccessResponse';
3
19
  export * from './DeliveryData';
4
20
  export * from './ExportPlayersRequestBody';
21
+ export * from './ExportPlayersSuccessResponse';
5
22
  export * from './Filter';
6
23
  export * from './FilterExpressions';
7
- export * from './FilterNotificationTarget';
8
24
  export * from './GetNotificationRequestBody';
9
- export * from './InlineResponse200';
10
- export * from './InlineResponse2001';
11
- export * from './InlineResponse2002';
12
- export * from './InlineResponse2003';
13
- export * from './InlineResponse2004';
14
- export * from './InlineResponse2005';
15
- export * from './InlineResponse201';
16
- export * from './InlineResponse400';
17
- export * from './InlineResponse4001';
18
- export * from './InlineResponse4002';
19
- export * from './InlineResponse409';
25
+ export * from './InvalidIdentifierError';
20
26
  export * from './Notification';
27
+ export * from './Notification200Errors';
21
28
  export * from './NotificationAllOf';
22
- export * from './NotificationAllOfAndroidBackgroundLayout';
29
+ export * from './NotificationHistoryBadRequestResponse';
30
+ export * from './NotificationHistorySuccessResponse';
23
31
  export * from './NotificationSlice';
24
32
  export * from './NotificationTarget';
33
+ export * from './NotificationWithMeta';
34
+ export * from './NotificationWithMetaAllOf';
25
35
  export * from './Operator';
26
36
  export * from './OutcomeData';
37
+ export * from './OutcomesData';
27
38
  export * from './PlatformDeliveryData';
39
+ export * from './PlatformDeliveryDataEmailAllOf';
40
+ export * from './PlatformDeliveryDataSmsAllOf';
28
41
  export * from './Player';
29
42
  export * from './PlayerNotificationTarget';
30
43
  export * from './PlayerSlice';
@@ -32,35 +45,50 @@ export * from './Purchase';
32
45
  export * from './Segment';
33
46
  export * from './SegmentNotificationTarget';
34
47
  export * from './StringMap';
48
+ export * from './UpdatePlayerSuccessResponse';
35
49
  export * from './UpdatePlayerTagsRequestBody';
50
+ export * from './UpdatePlayerTagsSuccessResponse';
36
51
 
37
52
  import { App , AppApnsEnvEnum } from './App';
53
+ import { BasicNotification , BasicNotificationAggregationEnum } from './BasicNotification';
54
+ import { BasicNotificationAllOf , BasicNotificationAllOfAggregationEnum } from './BasicNotificationAllOf';
55
+ import { BasicNotificationAllOfAndroidBackgroundLayout } from './BasicNotificationAllOfAndroidBackgroundLayout';
38
56
  import { Button } from './Button';
57
+ import { CancelNotificationSuccessResponse } from './CancelNotificationSuccessResponse';
58
+ import { CreateNotificationBadRequestResponse } from './CreateNotificationBadRequestResponse';
59
+ import { CreateNotificationSuccessResponse } from './CreateNotificationSuccessResponse';
60
+ import { CreatePlayerSuccessResponse } from './CreatePlayerSuccessResponse';
61
+ import { CreateSegmentBadRequestResponse } from './CreateSegmentBadRequestResponse';
62
+ import { CreateSegmentConflictResponse } from './CreateSegmentConflictResponse';
63
+ import { CreateSegmentSuccessResponse } from './CreateSegmentSuccessResponse';
64
+ import { DeletePlayerBadRequestResponse } from './DeletePlayerBadRequestResponse';
65
+ import { DeletePlayerNotFoundResponse } from './DeletePlayerNotFoundResponse';
66
+ import { DeletePlayerSuccessResponse } from './DeletePlayerSuccessResponse';
67
+ import { DeleteSegmentBadRequestResponse } from './DeleteSegmentBadRequestResponse';
68
+ import { DeleteSegmentNotFoundResponse } from './DeleteSegmentNotFoundResponse';
69
+ import { DeleteSegmentSuccessResponse } from './DeleteSegmentSuccessResponse';
39
70
  import { DeliveryData } from './DeliveryData';
40
71
  import { ExportPlayersRequestBody } from './ExportPlayersRequestBody';
72
+ import { ExportPlayersSuccessResponse } from './ExportPlayersSuccessResponse';
41
73
  import { Filter , FilterRelationEnum } from './Filter';
42
74
  import { FilterExpressions , FilterExpressionsRelationEnum , FilterExpressionsOperatorEnum } from './FilterExpressions';
43
- import { FilterNotificationTarget } from './FilterNotificationTarget';
44
75
  import { GetNotificationRequestBody, GetNotificationRequestBodyEventsEnum } from './GetNotificationRequestBody';
45
- import { InlineResponse200 } from './InlineResponse200';
46
- import { InlineResponse2001 } from './InlineResponse2001';
47
- import { InlineResponse2002 } from './InlineResponse2002';
48
- import { InlineResponse2003 } from './InlineResponse2003';
49
- import { InlineResponse2004 } from './InlineResponse2004';
50
- import { InlineResponse2005 } from './InlineResponse2005';
51
- import { InlineResponse201 } from './InlineResponse201';
52
- import { InlineResponse400 } from './InlineResponse400';
53
- import { InlineResponse4001 } from './InlineResponse4001';
54
- import { InlineResponse4002 } from './InlineResponse4002';
55
- import { InlineResponse409 } from './InlineResponse409';
56
- import { Notification , NotificationAggregationEnum } from './Notification';
57
- import { NotificationAllOf , NotificationAllOfAggregationEnum } from './NotificationAllOf';
58
- import { NotificationAllOfAndroidBackgroundLayout } from './NotificationAllOfAndroidBackgroundLayout';
76
+ import { InvalidIdentifierError } from './InvalidIdentifierError';
77
+ import { Notification , NotificationAggregationEnum } from './Notification';
78
+ import { Notification200Errors } from './Notification200Errors';
79
+ import { NotificationAllOf } from './NotificationAllOf';
80
+ import { NotificationHistoryBadRequestResponse } from './NotificationHistoryBadRequestResponse';
81
+ import { NotificationHistorySuccessResponse } from './NotificationHistorySuccessResponse';
59
82
  import { NotificationSlice } from './NotificationSlice';
60
83
  import { NotificationTarget } from './NotificationTarget';
84
+ import { NotificationWithMeta , NotificationWithMetaAggregationEnum } from './NotificationWithMeta';
85
+ import { NotificationWithMetaAllOf } from './NotificationWithMetaAllOf';
61
86
  import { Operator, OperatorOperatorEnum } from './Operator';
62
87
  import { OutcomeData , OutcomeDataAggregationEnum } from './OutcomeData';
88
+ import { OutcomesData } from './OutcomesData';
63
89
  import { PlatformDeliveryData } from './PlatformDeliveryData';
90
+ import { PlatformDeliveryDataEmailAllOf } from './PlatformDeliveryDataEmailAllOf';
91
+ import { PlatformDeliveryDataSmsAllOf } from './PlatformDeliveryDataSmsAllOf';
64
92
  import { Player } from './Player';
65
93
  import { PlayerNotificationTarget } from './PlayerNotificationTarget';
66
94
  import { PlayerSlice } from './PlayerSlice';
@@ -68,7 +96,9 @@ import { Purchase } from './Purchase';
68
96
  import { Segment } from './Segment';
69
97
  import { SegmentNotificationTarget } from './SegmentNotificationTarget';
70
98
  import { StringMap } from './StringMap';
99
+ import { UpdatePlayerSuccessResponse } from './UpdatePlayerSuccessResponse';
71
100
  import { UpdatePlayerTagsRequestBody } from './UpdatePlayerTagsRequestBody';
101
+ import { UpdatePlayerTagsSuccessResponse } from './UpdatePlayerTagsSuccessResponse';
72
102
 
73
103
  /* tslint:disable:no-unused-variable */
74
104
  let primitives = [
@@ -84,50 +114,66 @@ let primitives = [
84
114
 
85
115
  const supportedMediaTypes: { [mediaType: string]: number } = {
86
116
  "application/json": Infinity,
87
- "application/octet-stream": 0
117
+ "application/octet-stream": 0,
118
+ "application/x-www-form-urlencoded": 0
88
119
  }
89
120
 
90
-
121
+
91
122
  let enumsMap: Set<string> = new Set<string>([
92
123
  "AppApnsEnvEnum",
124
+ "BasicNotificationAggregationEnum",
125
+ "BasicNotificationAllOfAggregationEnum",
93
126
  "FilterRelationEnum",
94
127
  "FilterExpressionsRelationEnum",
95
128
  "FilterExpressionsOperatorEnum",
96
129
  "GetNotificationRequestBodyEventsEnum",
97
130
  "NotificationAggregationEnum",
98
- "NotificationAllOfAggregationEnum",
131
+ "NotificationWithMetaAggregationEnum",
99
132
  "OperatorOperatorEnum",
100
133
  "OutcomeDataAggregationEnum",
101
134
  ]);
102
135
 
103
136
  let typeMap: {[index: string]: any} = {
104
137
  "App": App,
138
+ "BasicNotification": BasicNotification,
139
+ "BasicNotificationAllOf": BasicNotificationAllOf,
140
+ "BasicNotificationAllOfAndroidBackgroundLayout": BasicNotificationAllOfAndroidBackgroundLayout,
105
141
  "Button": Button,
142
+ "CancelNotificationSuccessResponse": CancelNotificationSuccessResponse,
143
+ "CreateNotificationBadRequestResponse": CreateNotificationBadRequestResponse,
144
+ "CreateNotificationSuccessResponse": CreateNotificationSuccessResponse,
145
+ "CreatePlayerSuccessResponse": CreatePlayerSuccessResponse,
146
+ "CreateSegmentBadRequestResponse": CreateSegmentBadRequestResponse,
147
+ "CreateSegmentConflictResponse": CreateSegmentConflictResponse,
148
+ "CreateSegmentSuccessResponse": CreateSegmentSuccessResponse,
149
+ "DeletePlayerBadRequestResponse": DeletePlayerBadRequestResponse,
150
+ "DeletePlayerNotFoundResponse": DeletePlayerNotFoundResponse,
151
+ "DeletePlayerSuccessResponse": DeletePlayerSuccessResponse,
152
+ "DeleteSegmentBadRequestResponse": DeleteSegmentBadRequestResponse,
153
+ "DeleteSegmentNotFoundResponse": DeleteSegmentNotFoundResponse,
154
+ "DeleteSegmentSuccessResponse": DeleteSegmentSuccessResponse,
106
155
  "DeliveryData": DeliveryData,
107
156
  "ExportPlayersRequestBody": ExportPlayersRequestBody,
157
+ "ExportPlayersSuccessResponse": ExportPlayersSuccessResponse,
108
158
  "Filter": Filter,
109
159
  "FilterExpressions": FilterExpressions,
110
- "FilterNotificationTarget": FilterNotificationTarget,
111
160
  "GetNotificationRequestBody": GetNotificationRequestBody,
112
- "InlineResponse200": InlineResponse200,
113
- "InlineResponse2001": InlineResponse2001,
114
- "InlineResponse2002": InlineResponse2002,
115
- "InlineResponse2003": InlineResponse2003,
116
- "InlineResponse2004": InlineResponse2004,
117
- "InlineResponse2005": InlineResponse2005,
118
- "InlineResponse201": InlineResponse201,
119
- "InlineResponse400": InlineResponse400,
120
- "InlineResponse4001": InlineResponse4001,
121
- "InlineResponse4002": InlineResponse4002,
122
- "InlineResponse409": InlineResponse409,
161
+ "InvalidIdentifierError": InvalidIdentifierError,
123
162
  "Notification": Notification,
163
+ "Notification200Errors": Notification200Errors,
124
164
  "NotificationAllOf": NotificationAllOf,
125
- "NotificationAllOfAndroidBackgroundLayout": NotificationAllOfAndroidBackgroundLayout,
165
+ "NotificationHistoryBadRequestResponse": NotificationHistoryBadRequestResponse,
166
+ "NotificationHistorySuccessResponse": NotificationHistorySuccessResponse,
126
167
  "NotificationSlice": NotificationSlice,
127
168
  "NotificationTarget": NotificationTarget,
169
+ "NotificationWithMeta": NotificationWithMeta,
170
+ "NotificationWithMetaAllOf": NotificationWithMetaAllOf,
128
171
  "Operator": Operator,
129
172
  "OutcomeData": OutcomeData,
173
+ "OutcomesData": OutcomesData,
130
174
  "PlatformDeliveryData": PlatformDeliveryData,
175
+ "PlatformDeliveryDataEmailAllOf": PlatformDeliveryDataEmailAllOf,
176
+ "PlatformDeliveryDataSmsAllOf": PlatformDeliveryDataSmsAllOf,
131
177
  "Player": Player,
132
178
  "PlayerNotificationTarget": PlayerNotificationTarget,
133
179
  "PlayerSlice": PlayerSlice,
@@ -135,7 +181,9 @@ let typeMap: {[index: string]: any} = {
135
181
  "Segment": Segment,
136
182
  "SegmentNotificationTarget": SegmentNotificationTarget,
137
183
  "StringMap": StringMap,
184
+ "UpdatePlayerSuccessResponse": UpdatePlayerSuccessResponse,
138
185
  "UpdatePlayerTagsRequestBody": UpdatePlayerTagsRequestBody,
186
+ "UpdatePlayerTagsSuccessResponse": UpdatePlayerTagsSuccessResponse,
139
187
  }
140
188
 
141
189
  export class ObjectSerializer {
@@ -206,7 +254,7 @@ export class ObjectSerializer {
206
254
  if (!typeMap[type]) { // in case we dont know the type
207
255
  return data;
208
256
  }
209
-
257
+
210
258
  // Get the actual type of this object
211
259
  type = this.findCorrectType(data, type);
212
260
 
@@ -251,7 +299,10 @@ export class ObjectSerializer {
251
299
  let attributeTypes = typeMap[type].getAttributeTypeMap();
252
300
  for (let index in attributeTypes) {
253
301
  let attributeType = attributeTypes[index];
254
- instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format);
302
+ let value = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format);
303
+ if (value !== undefined) {
304
+ instance[attributeType.name] = value;
305
+ }
255
306
  }
256
307
  return instance;
257
308
  }
@@ -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.0.0
5
+ * API Version: 1.0.1
6
6
  * Contact: devrel@onesignal.com
7
7
  */
8
8
 
@@ -27,7 +27,7 @@ export class Operator {
27
27
  static getAttributeTypeMap() {
28
28
  return Operator.attributeTypeMap;
29
29
  }
30
-
30
+
31
31
  public constructor() {
32
32
  }
33
33
  }
@@ -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.0.0
5
+ * API Version: 1.0.1
6
6
  * Contact: devrel@onesignal.com
7
7
  */
8
8
 
@@ -38,7 +38,7 @@ export class OutcomeData {
38
38
  static getAttributeTypeMap() {
39
39
  return OutcomeData.attributeTypeMap;
40
40
  }
41
-
41
+
42
42
  public constructor() {
43
43
  }
44
44
  }
@@ -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: 1.0.1
6
+ * Contact: devrel@onesignal.com
7
+ */
8
+
9
+ import { OutcomeData } from './OutcomeData';
10
+ import { HttpFile } from '../http/http';
11
+
12
+ export class OutcomesData {
13
+ 'outcomes'?: Array<OutcomeData>;
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": "outcomes",
20
+ "baseName": "outcomes",
21
+ "type": "Array<OutcomeData>",
22
+ "format": ""
23
+ } ];
24
+
25
+ static getAttributeTypeMap() {
26
+ return OutcomesData.attributeTypeMap;
27
+ }
28
+
29
+ public constructor() {
30
+ }
31
+ }
32
+
@@ -2,11 +2,13 @@
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.0.0
5
+ * API Version: 1.0.1
6
6
  * Contact: devrel@onesignal.com
7
7
  */
8
8
 
9
9
  import { DeliveryData } from './DeliveryData';
10
+ import { PlatformDeliveryDataEmailAllOf } from './PlatformDeliveryDataEmailAllOf';
11
+ import { PlatformDeliveryDataSmsAllOf } from './PlatformDeliveryDataSmsAllOf';
10
12
  import { HttpFile } from '../http/http';
11
13
 
12
14
  /**
@@ -19,6 +21,8 @@ export class PlatformDeliveryData {
19
21
  'safari_web_push'?: DeliveryData;
20
22
  'android'?: DeliveryData;
21
23
  'ios'?: DeliveryData;
24
+ 'sms'?: DeliveryData & PlatformDeliveryDataSmsAllOf;
25
+ 'email'?: DeliveryData & PlatformDeliveryDataEmailAllOf;
22
26
 
23
27
  static readonly discriminator: string | undefined = undefined;
24
28
 
@@ -58,12 +62,24 @@ export class PlatformDeliveryData {
58
62
  "baseName": "ios",
59
63
  "type": "DeliveryData",
60
64
  "format": ""
65
+ },
66
+ {
67
+ "name": "sms",
68
+ "baseName": "sms",
69
+ "type": "DeliveryData & PlatformDeliveryDataSmsAllOf",
70
+ "format": ""
71
+ },
72
+ {
73
+ "name": "email",
74
+ "baseName": "email",
75
+ "type": "DeliveryData & PlatformDeliveryDataEmailAllOf",
76
+ "format": ""
61
77
  } ];
62
78
 
63
79
  static getAttributeTypeMap() {
64
80
  return PlatformDeliveryData.attributeTypeMap;
65
81
  }
66
-
82
+
67
83
  public constructor() {
68
84
  }
69
85
  }
@@ -0,0 +1,94 @@
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: 1.0.1
6
+ * Contact: devrel@onesignal.com
7
+ */
8
+
9
+ import { HttpFile } from '../http/http';
10
+
11
+ export class PlatformDeliveryDataEmailAllOf {
12
+ /**
13
+ * Number of times an email has been opened.
14
+ */
15
+ 'opened'?: number;
16
+ /**
17
+ * Number of unique recipients who have opened your email.
18
+ */
19
+ 'unique_opens'?: number;
20
+ /**
21
+ * Number of clicked links from your email. This can include the recipient clicking email links multiple times.
22
+ */
23
+ 'clicks'?: number;
24
+ /**
25
+ * Number of unique clicks that your recipients have made on links from your email.
26
+ */
27
+ 'unique_clicks'?: number;
28
+ /**
29
+ * Number of recipients who registered as a hard or soft bounce and didn\'t receive your email.
30
+ */
31
+ 'bounced'?: number;
32
+ /**
33
+ * Number of recipients who reported this email as spam.
34
+ */
35
+ 'reported_spam'?: number;
36
+ /**
37
+ * Number of recipients who opted out of your emails using the unsubscribe link in this email.
38
+ */
39
+ 'unsubscribed'?: number;
40
+
41
+ static readonly discriminator: string | undefined = undefined;
42
+
43
+ static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
44
+ {
45
+ "name": "opened",
46
+ "baseName": "opened",
47
+ "type": "number",
48
+ "format": ""
49
+ },
50
+ {
51
+ "name": "unique_opens",
52
+ "baseName": "unique_opens",
53
+ "type": "number",
54
+ "format": ""
55
+ },
56
+ {
57
+ "name": "clicks",
58
+ "baseName": "clicks",
59
+ "type": "number",
60
+ "format": ""
61
+ },
62
+ {
63
+ "name": "unique_clicks",
64
+ "baseName": "unique_clicks",
65
+ "type": "number",
66
+ "format": ""
67
+ },
68
+ {
69
+ "name": "bounced",
70
+ "baseName": "bounced",
71
+ "type": "number",
72
+ "format": ""
73
+ },
74
+ {
75
+ "name": "reported_spam",
76
+ "baseName": "reported_spam",
77
+ "type": "number",
78
+ "format": ""
79
+ },
80
+ {
81
+ "name": "unsubscribed",
82
+ "baseName": "unsubscribed",
83
+ "type": "number",
84
+ "format": ""
85
+ } ];
86
+
87
+ static getAttributeTypeMap() {
88
+ return PlatformDeliveryDataEmailAllOf.attributeTypeMap;
89
+ }
90
+
91
+ public constructor() {
92
+ }
93
+ }
94
+
@@ -0,0 +1,54 @@
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: 1.0.1
6
+ * Contact: devrel@onesignal.com
7
+ */
8
+
9
+ import { HttpFile } from '../http/http';
10
+
11
+ export class PlatformDeliveryDataSmsAllOf {
12
+ /**
13
+ * Number of messages reported as delivered successfully by the SMS service provider.
14
+ */
15
+ 'provider_successful'?: number;
16
+ /**
17
+ * Number of recipients who didn\'t receive your message as reported by the SMS service provider.
18
+ */
19
+ 'provider_failed'?: number;
20
+ /**
21
+ * Number of errors reported by the SMS service provider.
22
+ */
23
+ 'provider_errored'?: number;
24
+
25
+ static readonly discriminator: string | undefined = undefined;
26
+
27
+ static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
28
+ {
29
+ "name": "provider_successful",
30
+ "baseName": "provider_successful",
31
+ "type": "number",
32
+ "format": ""
33
+ },
34
+ {
35
+ "name": "provider_failed",
36
+ "baseName": "provider_failed",
37
+ "type": "number",
38
+ "format": ""
39
+ },
40
+ {
41
+ "name": "provider_errored",
42
+ "baseName": "provider_errored",
43
+ "type": "number",
44
+ "format": ""
45
+ } ];
46
+
47
+ static getAttributeTypeMap() {
48
+ return PlatformDeliveryDataSmsAllOf.attributeTypeMap;
49
+ }
50
+
51
+ public constructor() {
52
+ }
53
+ }
54
+