@onesignal/node-onesignal 5.2.1-beta1 → 5.3.1-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.
Files changed (198) hide show
  1. package/dist/apis/DefaultApi.d.ts +40 -0
  2. package/dist/apis/DefaultApi.js +1363 -100
  3. package/dist/models/ApiKeyToken.d.ts +23 -0
  4. package/dist/models/ApiKeyToken.js +52 -0
  5. package/dist/models/ApiKeyTokensListResponse.d.ts +18 -0
  6. package/dist/models/ApiKeyTokensListResponse.js +22 -0
  7. package/dist/models/CopyTemplateRequest.d.ts +17 -0
  8. package/dist/models/CopyTemplateRequest.js +22 -0
  9. package/dist/models/CreateApiKeyRequest.d.ts +20 -0
  10. package/dist/models/CreateApiKeyRequest.js +34 -0
  11. package/dist/models/CreateApiKeyResponse.d.ts +18 -0
  12. package/dist/models/CreateApiKeyResponse.js +28 -0
  13. package/dist/models/CreateTemplateRequest.d.ts +25 -0
  14. package/dist/models/CreateTemplateRequest.js +64 -0
  15. package/dist/models/CustomEvent.d.ts +23 -0
  16. package/dist/models/CustomEvent.js +46 -0
  17. package/dist/models/CustomEventsRequest.d.ts +18 -0
  18. package/dist/models/CustomEventsRequest.js +22 -0
  19. package/dist/models/NotificationWithMeta.d.ts +1 -0
  20. package/dist/models/NotificationWithMeta.js +6 -0
  21. package/dist/models/NotificationWithMetaAllOf.d.ts +1 -0
  22. package/dist/models/NotificationWithMetaAllOf.js +6 -0
  23. package/dist/models/ObjectSerializer.d.ts +14 -0
  24. package/dist/models/ObjectSerializer.js +47 -0
  25. package/dist/models/StartLiveActivityRequest.d.ts +37 -0
  26. package/dist/models/StartLiveActivityRequest.js +112 -0
  27. package/dist/models/StartLiveActivitySuccessResponse.d.ts +17 -0
  28. package/dist/models/StartLiveActivitySuccessResponse.js +22 -0
  29. package/dist/models/TemplateResource.d.ts +25 -0
  30. package/dist/models/TemplateResource.js +52 -0
  31. package/dist/models/TemplatesListResponse.d.ts +18 -0
  32. package/dist/models/TemplatesListResponse.js +22 -0
  33. package/dist/models/UpdateApiKeyRequest.d.ts +20 -0
  34. package/dist/models/UpdateApiKeyRequest.js +34 -0
  35. package/dist/models/UpdateTemplateRequest.d.ts +24 -0
  36. package/dist/models/UpdateTemplateRequest.js +58 -0
  37. package/dist/models/all.d.ts +14 -0
  38. package/dist/models/all.js +14 -0
  39. package/dist/types/ObjectParamAPI.d.ts +88 -0
  40. package/dist/types/ObjectParamAPI.js +42 -0
  41. package/dist/types/ObservableAPI.d.ts +26 -0
  42. package/dist/types/ObservableAPI.js +422 -86
  43. package/dist/types/PromiseAPI.d.ts +26 -0
  44. package/dist/types/PromiseAPI.js +56 -0
  45. package/package.json +9 -3
  46. package/.github/ISSUE_TEMPLATE/ask-question.yml +0 -25
  47. package/.github/ISSUE_TEMPLATE/bug-report.yml +0 -51
  48. package/.github/ISSUE_TEMPLATE/general-feedback.yml +0 -25
  49. package/.github/pull_request_template.md +0 -44
  50. package/.github/workflows/asana-add-comment.yml +0 -47
  51. package/.github/workflows/asana-create-task.yml +0 -119
  52. package/.github/workflows/asana-update-issue.yml +0 -172
  53. package/.github/workflows/npm_deploy.yml +0 -22
  54. package/.github/workflows/project.yml +0 -17
  55. package/CHANGELOG.md +0 -48
  56. package/DefaultApi.md +0 -2177
  57. package/RELEASE_INSTRUCTIONS.md +0 -2
  58. package/apis/DefaultApi.ts +0 -3270
  59. package/apis/baseapi.ts +0 -37
  60. package/apis/exception.ts +0 -15
  61. package/auth/auth.ts +0 -110
  62. package/configuration.ts +0 -85
  63. package/dist/apis/DefaultApi.js.map +0 -1
  64. package/dist/apis/baseapi.js.map +0 -1
  65. package/dist/apis/exception.js.map +0 -1
  66. package/dist/auth/auth.js.map +0 -1
  67. package/dist/configuration.js.map +0 -1
  68. package/dist/http/http.js.map +0 -1
  69. package/dist/http/isomorphic-fetch.js.map +0 -1
  70. package/dist/index.js.map +0 -1
  71. package/dist/middleware.js.map +0 -1
  72. package/dist/models/App.js.map +0 -1
  73. package/dist/models/BasicNotification.js.map +0 -1
  74. package/dist/models/BasicNotificationAllOf.js.map +0 -1
  75. package/dist/models/BasicNotificationAllOfAndroidBackgroundLayout.js.map +0 -1
  76. package/dist/models/Button.js.map +0 -1
  77. package/dist/models/CreateNotificationSuccessResponse.js.map +0 -1
  78. package/dist/models/CreateSegmentConflictResponse.js.map +0 -1
  79. package/dist/models/CreateSegmentSuccessResponse.js.map +0 -1
  80. package/dist/models/CreateUserConflictResponse.js.map +0 -1
  81. package/dist/models/CreateUserConflictResponseErrorsInner.js.map +0 -1
  82. package/dist/models/CreateUserConflictResponseErrorsItemsMeta.js.map +0 -1
  83. package/dist/models/DeliveryData.js.map +0 -1
  84. package/dist/models/ExportEventsSuccessResponse.js.map +0 -1
  85. package/dist/models/ExportSubscriptionsRequestBody.js.map +0 -1
  86. package/dist/models/ExportSubscriptionsSuccessResponse.js.map +0 -1
  87. package/dist/models/Filter.js.map +0 -1
  88. package/dist/models/FilterExpression.js.map +0 -1
  89. package/dist/models/GenericError.js.map +0 -1
  90. package/dist/models/GenericSuccessBoolResponse.js.map +0 -1
  91. package/dist/models/GetNotificationHistoryRequestBody.js.map +0 -1
  92. package/dist/models/GetSegmentsSuccessResponse.js.map +0 -1
  93. package/dist/models/LanguageStringMap.js.map +0 -1
  94. package/dist/models/Notification.js.map +0 -1
  95. package/dist/models/NotificationAllOf.js.map +0 -1
  96. package/dist/models/NotificationHistorySuccessResponse.js.map +0 -1
  97. package/dist/models/NotificationSlice.js.map +0 -1
  98. package/dist/models/NotificationTarget.js.map +0 -1
  99. package/dist/models/NotificationWithMeta.js.map +0 -1
  100. package/dist/models/NotificationWithMetaAllOf.js.map +0 -1
  101. package/dist/models/ObjectSerializer.js.map +0 -1
  102. package/dist/models/Operator.js.map +0 -1
  103. package/dist/models/OutcomeData.js.map +0 -1
  104. package/dist/models/OutcomesData.js.map +0 -1
  105. package/dist/models/PlatformDeliveryData.js.map +0 -1
  106. package/dist/models/PlatformDeliveryDataEmailAllOf.js.map +0 -1
  107. package/dist/models/PlatformDeliveryDataSmsAllOf.js.map +0 -1
  108. package/dist/models/PropertiesBody.js.map +0 -1
  109. package/dist/models/PropertiesDeltas.js.map +0 -1
  110. package/dist/models/PropertiesObject.js.map +0 -1
  111. package/dist/models/Purchase.js.map +0 -1
  112. package/dist/models/RateLimitError.js.map +0 -1
  113. package/dist/models/Segment.js.map +0 -1
  114. package/dist/models/SegmentData.js.map +0 -1
  115. package/dist/models/SegmentNotificationTarget.js.map +0 -1
  116. package/dist/models/Subscription.js.map +0 -1
  117. package/dist/models/SubscriptionBody.js.map +0 -1
  118. package/dist/models/SubscriptionNotificationTarget.js.map +0 -1
  119. package/dist/models/TransferSubscriptionRequestBody.js.map +0 -1
  120. package/dist/models/UpdateLiveActivityRequest.js.map +0 -1
  121. package/dist/models/UpdateLiveActivitySuccessResponse.js.map +0 -1
  122. package/dist/models/UpdateUserRequest.js.map +0 -1
  123. package/dist/models/User.js.map +0 -1
  124. package/dist/models/UserIdentityBody.js.map +0 -1
  125. package/dist/models/WebButton.js.map +0 -1
  126. package/dist/models/all.js.map +0 -1
  127. package/dist/rxjsStub.js.map +0 -1
  128. package/dist/servers.js.map +0 -1
  129. package/dist/types/ObjectParamAPI.js.map +0 -1
  130. package/dist/types/ObservableAPI.js.map +0 -1
  131. package/dist/types/PromiseAPI.js.map +0 -1
  132. package/dist/util.js.map +0 -1
  133. package/http/http.ts +0 -205
  134. package/http/isomorphic-fetch.ts +0 -30
  135. package/index.ts +0 -12
  136. package/middleware.ts +0 -66
  137. package/models/App.ts +0 -328
  138. package/models/BasicNotification.ts +0 -1088
  139. package/models/BasicNotificationAllOf.ts +0 -958
  140. package/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +0 -57
  141. package/models/Button.ts +0 -45
  142. package/models/CreateNotificationSuccessResponse.ts +0 -48
  143. package/models/CreateSegmentConflictResponse.ts +0 -38
  144. package/models/CreateSegmentSuccessResponse.ts +0 -41
  145. package/models/CreateUserConflictResponse.ts +0 -32
  146. package/models/CreateUserConflictResponseErrorsInner.ts +0 -46
  147. package/models/CreateUserConflictResponseErrorsItemsMeta.ts +0 -31
  148. package/models/DeliveryData.ts +0 -74
  149. package/models/ExportEventsSuccessResponse.ts +0 -31
  150. package/models/ExportSubscriptionsRequestBody.ts +0 -54
  151. package/models/ExportSubscriptionsSuccessResponse.ts +0 -31
  152. package/models/Filter.ts +0 -107
  153. package/models/FilterExpression.ts +0 -120
  154. package/models/GenericError.ts +0 -45
  155. package/models/GenericSuccessBoolResponse.ts +0 -31
  156. package/models/GetNotificationHistoryRequestBody.ts +0 -54
  157. package/models/GetSegmentsSuccessResponse.ts +0 -65
  158. package/models/LanguageStringMap.ts +0 -454
  159. package/models/Notification.ts +0 -1098
  160. package/models/NotificationAllOf.ts +0 -34
  161. package/models/NotificationHistorySuccessResponse.ts +0 -38
  162. package/models/NotificationSlice.ts +0 -53
  163. package/models/NotificationTarget.ts +0 -156
  164. package/models/NotificationWithMeta.ts +0 -1196
  165. package/models/NotificationWithMetaAllOf.ts +0 -132
  166. package/models/ObjectSerializer.ts +0 -395
  167. package/models/Operator.ts +0 -37
  168. package/models/OutcomeData.ts +0 -48
  169. package/models/OutcomesData.ts +0 -32
  170. package/models/PlatformDeliveryData.ts +0 -86
  171. package/models/PlatformDeliveryDataEmailAllOf.ts +0 -94
  172. package/models/PlatformDeliveryDataSmsAllOf.ts +0 -54
  173. package/models/PropertiesBody.ts +0 -32
  174. package/models/PropertiesDeltas.ts +0 -46
  175. package/models/PropertiesObject.ts +0 -102
  176. package/models/Purchase.ts +0 -61
  177. package/models/RateLimitError.ts +0 -38
  178. package/models/Segment.ts +0 -55
  179. package/models/SegmentData.ts +0 -94
  180. package/models/SegmentNotificationTarget.ts +0 -44
  181. package/models/Subscription.ts +0 -146
  182. package/models/SubscriptionBody.ts +0 -32
  183. package/models/SubscriptionNotificationTarget.ts +0 -134
  184. package/models/TransferSubscriptionRequestBody.ts +0 -31
  185. package/models/UpdateLiveActivityRequest.ts +0 -109
  186. package/models/UpdateLiveActivitySuccessResponse.ts +0 -31
  187. package/models/UpdateUserRequest.ts +0 -47
  188. package/models/User.ts +0 -47
  189. package/models/UserIdentityBody.ts +0 -31
  190. package/models/WebButton.ts +0 -52
  191. package/models/all.ts +0 -53
  192. package/rxjsStub.ts +0 -27
  193. package/servers.ts +0 -53
  194. package/tsconfig.json +0 -28
  195. package/types/ObjectParamAPI.ts +0 -884
  196. package/types/ObservableAPI.ts +0 -831
  197. package/types/PromiseAPI.ts +0 -411
  198. package/util.ts +0 -37
@@ -1,132 +0,0 @@
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.2.0
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,395 +0,0 @@
1
- export * from './App';
2
- export * from './BasicNotification';
3
- export * from './BasicNotificationAllOf';
4
- export * from './BasicNotificationAllOfAndroidBackgroundLayout';
5
- export * from './Button';
6
- export * from './CreateNotificationSuccessResponse';
7
- export * from './CreateSegmentConflictResponse';
8
- export * from './CreateSegmentSuccessResponse';
9
- export * from './CreateUserConflictResponse';
10
- export * from './CreateUserConflictResponseErrorsInner';
11
- export * from './CreateUserConflictResponseErrorsItemsMeta';
12
- export * from './DeliveryData';
13
- export * from './ExportEventsSuccessResponse';
14
- export * from './ExportSubscriptionsRequestBody';
15
- export * from './ExportSubscriptionsSuccessResponse';
16
- export * from './Filter';
17
- export * from './FilterExpression';
18
- export * from './GenericError';
19
- export * from './GenericSuccessBoolResponse';
20
- export * from './GetNotificationHistoryRequestBody';
21
- export * from './GetSegmentsSuccessResponse';
22
- export * from './LanguageStringMap';
23
- export * from './Notification';
24
- export * from './NotificationAllOf';
25
- export * from './NotificationHistorySuccessResponse';
26
- export * from './NotificationSlice';
27
- export * from './NotificationTarget';
28
- export * from './NotificationWithMeta';
29
- export * from './NotificationWithMetaAllOf';
30
- export * from './Operator';
31
- export * from './OutcomeData';
32
- export * from './OutcomesData';
33
- export * from './PlatformDeliveryData';
34
- export * from './PlatformDeliveryDataEmailAllOf';
35
- export * from './PlatformDeliveryDataSmsAllOf';
36
- export * from './PropertiesBody';
37
- export * from './PropertiesDeltas';
38
- export * from './PropertiesObject';
39
- export * from './Purchase';
40
- export * from './RateLimitError';
41
- export * from './Segment';
42
- export * from './SegmentData';
43
- export * from './SegmentNotificationTarget';
44
- export * from './Subscription';
45
- export * from './SubscriptionBody';
46
- export * from './SubscriptionNotificationTarget';
47
- export * from './TransferSubscriptionRequestBody';
48
- export * from './UpdateLiveActivityRequest';
49
- export * from './UpdateLiveActivitySuccessResponse';
50
- export * from './UpdateUserRequest';
51
- export * from './User';
52
- export * from './UserIdentityBody';
53
- export * from './WebButton';
54
-
55
- import { App , AppApnsEnvEnum } from './App';
56
- import { BasicNotification , BasicNotificationTargetChannelEnum , BasicNotificationAggregationEnum } from './BasicNotification';
57
- import { BasicNotificationAllOf , BasicNotificationAllOfAggregationEnum } from './BasicNotificationAllOf';
58
- import { BasicNotificationAllOfAndroidBackgroundLayout } from './BasicNotificationAllOfAndroidBackgroundLayout';
59
- import { Button } from './Button';
60
- import { CreateNotificationSuccessResponse } from './CreateNotificationSuccessResponse';
61
- import { CreateSegmentConflictResponse } from './CreateSegmentConflictResponse';
62
- import { CreateSegmentSuccessResponse } from './CreateSegmentSuccessResponse';
63
- import { CreateUserConflictResponse } from './CreateUserConflictResponse';
64
- import { CreateUserConflictResponseErrorsInner } from './CreateUserConflictResponseErrorsInner';
65
- import { CreateUserConflictResponseErrorsItemsMeta } from './CreateUserConflictResponseErrorsItemsMeta';
66
- import { DeliveryData } from './DeliveryData';
67
- import { ExportEventsSuccessResponse } from './ExportEventsSuccessResponse';
68
- import { ExportSubscriptionsRequestBody } from './ExportSubscriptionsRequestBody';
69
- import { ExportSubscriptionsSuccessResponse } from './ExportSubscriptionsSuccessResponse';
70
- import { Filter , FilterRelationEnum } from './Filter';
71
- import { FilterExpression , FilterExpressionRelationEnum , FilterExpressionOperatorEnum } from './FilterExpression';
72
- import { GenericError } from './GenericError';
73
- import { GenericSuccessBoolResponse } from './GenericSuccessBoolResponse';
74
- import { GetNotificationHistoryRequestBody, GetNotificationHistoryRequestBodyEventsEnum } from './GetNotificationHistoryRequestBody';
75
- import { GetSegmentsSuccessResponse } from './GetSegmentsSuccessResponse';
76
- import { LanguageStringMap } from './LanguageStringMap';
77
- import { Notification , NotificationTargetChannelEnum , NotificationAggregationEnum } from './Notification';
78
- import { NotificationAllOf } from './NotificationAllOf';
79
- import { NotificationHistorySuccessResponse } from './NotificationHistorySuccessResponse';
80
- import { NotificationSlice } from './NotificationSlice';
81
- import { NotificationTarget , NotificationTargetTargetChannelEnum } from './NotificationTarget';
82
- import { NotificationWithMeta , NotificationWithMetaTargetChannelEnum , NotificationWithMetaAggregationEnum } from './NotificationWithMeta';
83
- import { NotificationWithMetaAllOf } from './NotificationWithMetaAllOf';
84
- import { Operator, OperatorOperatorEnum } from './Operator';
85
- import { OutcomeData , OutcomeDataAggregationEnum } from './OutcomeData';
86
- import { OutcomesData } from './OutcomesData';
87
- import { PlatformDeliveryData } from './PlatformDeliveryData';
88
- import { PlatformDeliveryDataEmailAllOf } from './PlatformDeliveryDataEmailAllOf';
89
- import { PlatformDeliveryDataSmsAllOf } from './PlatformDeliveryDataSmsAllOf';
90
- import { PropertiesBody } from './PropertiesBody';
91
- import { PropertiesDeltas } from './PropertiesDeltas';
92
- import { PropertiesObject } from './PropertiesObject';
93
- import { Purchase } from './Purchase';
94
- import { RateLimitError } from './RateLimitError';
95
- import { Segment } from './Segment';
96
- import { SegmentData } from './SegmentData';
97
- import { SegmentNotificationTarget } from './SegmentNotificationTarget';
98
- import { Subscription , SubscriptionTypeEnum } from './Subscription';
99
- import { SubscriptionBody } from './SubscriptionBody';
100
- import { SubscriptionNotificationTarget , SubscriptionNotificationTargetTargetChannelEnum } from './SubscriptionNotificationTarget';
101
- import { TransferSubscriptionRequestBody } from './TransferSubscriptionRequestBody';
102
- import { UpdateLiveActivityRequest , UpdateLiveActivityRequestEventEnum } from './UpdateLiveActivityRequest';
103
- import { UpdateLiveActivitySuccessResponse } from './UpdateLiveActivitySuccessResponse';
104
- import { UpdateUserRequest } from './UpdateUserRequest';
105
- import { User } from './User';
106
- import { UserIdentityBody } from './UserIdentityBody';
107
- import { WebButton } from './WebButton';
108
-
109
- /* tslint:disable:no-unused-variable */
110
- let primitives = [
111
- "string",
112
- "boolean",
113
- "double",
114
- "integer",
115
- "long",
116
- "float",
117
- "number",
118
- "any"
119
- ];
120
-
121
- const supportedMediaTypes: { [mediaType: string]: number } = {
122
- "application/json": Infinity,
123
- "application/octet-stream": 0,
124
- "application/x-www-form-urlencoded": 0
125
- }
126
-
127
-
128
- let enumsMap: Set<string> = new Set<string>([
129
- "AppApnsEnvEnum",
130
- "BasicNotificationTargetChannelEnum",
131
- "BasicNotificationAggregationEnum",
132
- "BasicNotificationAllOfAggregationEnum",
133
- "FilterRelationEnum",
134
- "FilterExpressionRelationEnum",
135
- "FilterExpressionOperatorEnum",
136
- "GetNotificationHistoryRequestBodyEventsEnum",
137
- "NotificationTargetChannelEnum",
138
- "NotificationAggregationEnum",
139
- "NotificationTargetTargetChannelEnum",
140
- "NotificationWithMetaTargetChannelEnum",
141
- "NotificationWithMetaAggregationEnum",
142
- "OperatorOperatorEnum",
143
- "OutcomeDataAggregationEnum",
144
- "SubscriptionTypeEnum",
145
- "SubscriptionNotificationTargetTargetChannelEnum",
146
- "UpdateLiveActivityRequestEventEnum",
147
- ]);
148
-
149
- let typeMap: {[index: string]: any} = {
150
- "App": App,
151
- "BasicNotification": BasicNotification,
152
- "BasicNotificationAllOf": BasicNotificationAllOf,
153
- "BasicNotificationAllOfAndroidBackgroundLayout": BasicNotificationAllOfAndroidBackgroundLayout,
154
- "Button": Button,
155
- "CreateNotificationSuccessResponse": CreateNotificationSuccessResponse,
156
- "CreateSegmentConflictResponse": CreateSegmentConflictResponse,
157
- "CreateSegmentSuccessResponse": CreateSegmentSuccessResponse,
158
- "CreateUserConflictResponse": CreateUserConflictResponse,
159
- "CreateUserConflictResponseErrorsInner": CreateUserConflictResponseErrorsInner,
160
- "CreateUserConflictResponseErrorsItemsMeta": CreateUserConflictResponseErrorsItemsMeta,
161
- "DeliveryData": DeliveryData,
162
- "ExportEventsSuccessResponse": ExportEventsSuccessResponse,
163
- "ExportSubscriptionsRequestBody": ExportSubscriptionsRequestBody,
164
- "ExportSubscriptionsSuccessResponse": ExportSubscriptionsSuccessResponse,
165
- "Filter": Filter,
166
- "FilterExpression": FilterExpression,
167
- "GenericError": GenericError,
168
- "GenericSuccessBoolResponse": GenericSuccessBoolResponse,
169
- "GetNotificationHistoryRequestBody": GetNotificationHistoryRequestBody,
170
- "GetSegmentsSuccessResponse": GetSegmentsSuccessResponse,
171
- "LanguageStringMap": LanguageStringMap,
172
- "Notification": Notification,
173
- "NotificationAllOf": NotificationAllOf,
174
- "NotificationHistorySuccessResponse": NotificationHistorySuccessResponse,
175
- "NotificationSlice": NotificationSlice,
176
- "NotificationTarget": NotificationTarget,
177
- "NotificationWithMeta": NotificationWithMeta,
178
- "NotificationWithMetaAllOf": NotificationWithMetaAllOf,
179
- "Operator": Operator,
180
- "OutcomeData": OutcomeData,
181
- "OutcomesData": OutcomesData,
182
- "PlatformDeliveryData": PlatformDeliveryData,
183
- "PlatformDeliveryDataEmailAllOf": PlatformDeliveryDataEmailAllOf,
184
- "PlatformDeliveryDataSmsAllOf": PlatformDeliveryDataSmsAllOf,
185
- "PropertiesBody": PropertiesBody,
186
- "PropertiesDeltas": PropertiesDeltas,
187
- "PropertiesObject": PropertiesObject,
188
- "Purchase": Purchase,
189
- "RateLimitError": RateLimitError,
190
- "Segment": Segment,
191
- "SegmentData": SegmentData,
192
- "SegmentNotificationTarget": SegmentNotificationTarget,
193
- "Subscription": Subscription,
194
- "SubscriptionBody": SubscriptionBody,
195
- "SubscriptionNotificationTarget": SubscriptionNotificationTarget,
196
- "TransferSubscriptionRequestBody": TransferSubscriptionRequestBody,
197
- "UpdateLiveActivityRequest": UpdateLiveActivityRequest,
198
- "UpdateLiveActivitySuccessResponse": UpdateLiveActivitySuccessResponse,
199
- "UpdateUserRequest": UpdateUserRequest,
200
- "User": User,
201
- "UserIdentityBody": UserIdentityBody,
202
- "WebButton": WebButton,
203
- }
204
-
205
- export class ObjectSerializer {
206
- public static findCorrectType(data: any, expectedType: string) {
207
- if (data == undefined) {
208
- return expectedType;
209
- } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) {
210
- return expectedType;
211
- } else if (expectedType === "Date") {
212
- return expectedType;
213
- } else {
214
- if (enumsMap.has(expectedType)) {
215
- return expectedType;
216
- }
217
-
218
- if (!typeMap[expectedType]) {
219
- return expectedType; // w/e we don't know the type
220
- }
221
-
222
- // Check the discriminator
223
- let discriminatorProperty = typeMap[expectedType].discriminator;
224
- if (discriminatorProperty == null) {
225
- return expectedType; // the type does not have a discriminator. use it.
226
- } else {
227
- if (data[discriminatorProperty]) {
228
- var discriminatorType = data[discriminatorProperty];
229
- if(typeMap[discriminatorType]){
230
- return discriminatorType; // use the type given in the discriminator
231
- } else {
232
- return expectedType; // discriminator did not map to a type
233
- }
234
- } else {
235
- return expectedType; // discriminator was not present (or an empty string)
236
- }
237
- }
238
- }
239
- }
240
-
241
- public static serialize(data: any, type: string, format: string) {
242
- if (data == undefined) {
243
- return data;
244
- } else if (primitives.indexOf(type.toLowerCase()) !== -1) {
245
- return data;
246
- } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
247
- let subType: string = type.replace("Array<", ""); // Array<Type> => Type>
248
- subType = subType.substring(0, subType.length - 1); // Type> => Type
249
- let transformedData: any[] = [];
250
- for (let index in data) {
251
- let date = data[index];
252
- transformedData.push(ObjectSerializer.serialize(date, subType, format));
253
- }
254
- return transformedData;
255
- } else if (type === "Date") {
256
- if (format == "date") {
257
- let month = data.getMonth()+1
258
- month = month < 10 ? "0" + month.toString() : month.toString()
259
- let day = data.getDate();
260
- day = day < 10 ? "0" + day.toString() : day.toString();
261
-
262
- return data.getFullYear() + "-" + month + "-" + day;
263
- } else {
264
- return data.toISOString();
265
- }
266
- } else {
267
- if (enumsMap.has(type)) {
268
- return data;
269
- }
270
- if (!typeMap[type]) { // in case we dont know the type
271
- return data;
272
- }
273
-
274
- // Get the actual type of this object
275
- type = this.findCorrectType(data, type);
276
-
277
- // get the map for the correct type.
278
- let attributeTypes = typeMap[type].getAttributeTypeMap();
279
- let instance: {[index: string]: any} = {};
280
- for (let index in attributeTypes) {
281
- let attributeType = attributeTypes[index];
282
- instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type, attributeType.format);
283
- }
284
- return instance;
285
- }
286
- }
287
-
288
- public static deserialize(data: any, type: string, format: string) {
289
- // polymorphism may change the actual type.
290
- type = ObjectSerializer.findCorrectType(data, type);
291
- if (data == undefined) {
292
- return data;
293
- } else if (primitives.indexOf(type.toLowerCase()) !== -1) {
294
- return data;
295
- } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
296
- let subType: string = type.replace("Array<", ""); // Array<Type> => Type>
297
- subType = subType.substring(0, subType.length - 1); // Type> => Type
298
- let transformedData: any[] = [];
299
- for (let index in data) {
300
- let date = data[index];
301
- transformedData.push(ObjectSerializer.deserialize(date, subType, format));
302
- }
303
- return transformedData;
304
- } else if (type === "Date") {
305
- return new Date(data);
306
- } else {
307
- if (enumsMap.has(type)) {// is Enum
308
- return data;
309
- }
310
-
311
- if (!typeMap[type]) { // dont know the type
312
- return data;
313
- }
314
- let instance = new typeMap[type]();
315
- let attributeTypes = typeMap[type].getAttributeTypeMap();
316
- for (let index in attributeTypes) {
317
- let attributeType = attributeTypes[index];
318
- let value = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format);
319
- if (value !== undefined) {
320
- instance[attributeType.name] = value;
321
- }
322
- }
323
- return instance;
324
- }
325
- }
326
-
327
-
328
- /**
329
- * Normalize media type
330
- *
331
- * We currently do not handle any media types attributes, i.e. anything
332
- * after a semicolon. All content is assumed to be UTF-8 compatible.
333
- */
334
- public static normalizeMediaType(mediaType: string | undefined): string | undefined {
335
- if (mediaType === undefined) {
336
- return undefined;
337
- }
338
- return mediaType.split(";")[0].trim().toLowerCase();
339
- }
340
-
341
- /**
342
- * From a list of possible media types, choose the one we can handle best.
343
- *
344
- * The order of the given media types does not have any impact on the choice
345
- * made.
346
- */
347
- public static getPreferredMediaType(mediaTypes: Array<string>): string {
348
- /** According to OAS 3 we should default to json */
349
- if (!mediaTypes) {
350
- return "application/json";
351
- }
352
-
353
- const normalMediaTypes = mediaTypes.map(this.normalizeMediaType);
354
- let selectedMediaType: string | undefined = undefined;
355
- let selectedRank: number = -Infinity;
356
- for (const mediaType of normalMediaTypes) {
357
- if (supportedMediaTypes[mediaType!] > selectedRank) {
358
- selectedMediaType = mediaType;
359
- selectedRank = supportedMediaTypes[mediaType!];
360
- }
361
- }
362
-
363
- if (selectedMediaType === undefined) {
364
- throw new Error("None of the given media types are supported: " + mediaTypes.join(", "));
365
- }
366
-
367
- return selectedMediaType!;
368
- }
369
-
370
- /**
371
- * Convert data to a string according the given media type
372
- */
373
- public static stringify(data: any, mediaType: string): string {
374
- if (mediaType === "application/json") {
375
- return JSON.stringify(data);
376
- }
377
-
378
- throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.stringify.");
379
- }
380
-
381
- /**
382
- * Parse data from a string according to the given media type
383
- */
384
- public static parse(rawData: string, mediaType: string | undefined) {
385
- if (mediaType === undefined) {
386
- throw new Error("Cannot parse content. No Content-Type defined.");
387
- }
388
-
389
- if (mediaType === "application/json") {
390
- return JSON.parse(rawData);
391
- }
392
-
393
- throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.parse.");
394
- }
395
- }
@@ -1,37 +0,0 @@
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.2.0
6
- * Contact: devrel@onesignal.com
7
- */
8
-
9
- import { HttpFile } from '../http/http';
10
-
11
- export class Operator {
12
- /**
13
- * Strictly, this must be either `\"OR\"`, or `\"AND\"`. It can be used to compose Filters as part of a Filters object.
14
- */
15
- 'operator'?: OperatorOperatorEnum;
16
-
17
- static readonly discriminator: string | undefined = undefined;
18
-
19
- static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
20
- {
21
- "name": "operator",
22
- "baseName": "operator",
23
- "type": "OperatorOperatorEnum",
24
- "format": ""
25
- } ];
26
-
27
- static getAttributeTypeMap() {
28
- return Operator.attributeTypeMap;
29
- }
30
-
31
- public constructor() {
32
- }
33
- }
34
-
35
-
36
- export type OperatorOperatorEnum = "OR" | "AND" ;
37
-
@@ -1,48 +0,0 @@
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.2.0
6
- * Contact: devrel@onesignal.com
7
- */
8
-
9
- import { HttpFile } from '../http/http';
10
-
11
- export class OutcomeData {
12
- 'id': string;
13
- 'value': number;
14
- 'aggregation': OutcomeDataAggregationEnum;
15
-
16
- static readonly discriminator: string | undefined = undefined;
17
-
18
- static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
19
- {
20
- "name": "id",
21
- "baseName": "id",
22
- "type": "string",
23
- "format": ""
24
- },
25
- {
26
- "name": "value",
27
- "baseName": "value",
28
- "type": "number",
29
- "format": ""
30
- },
31
- {
32
- "name": "aggregation",
33
- "baseName": "aggregation",
34
- "type": "OutcomeDataAggregationEnum",
35
- "format": ""
36
- } ];
37
-
38
- static getAttributeTypeMap() {
39
- return OutcomeData.attributeTypeMap;
40
- }
41
-
42
- public constructor() {
43
- }
44
- }
45
-
46
-
47
- export type OutcomeDataAggregationEnum = "sum" | "count" ;
48
-
@@ -1,32 +0,0 @@
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.2.0
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
-