@onesignal/node-onesignal 5.3.0-beta1 → 5.4.0-beta1

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