onesignal 5.2.0.pre.beta1 → 5.3.0.pre.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 (165) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -5
  3. data/docs/ApiKeyToken.md +28 -0
  4. data/docs/ApiKeyTokensListResponse.md +18 -0
  5. data/docs/CopyTemplateRequest.md +18 -0
  6. data/docs/CreateApiKeyRequest.md +22 -0
  7. data/docs/CreateApiKeyResponse.md +20 -0
  8. data/docs/CreateTemplateRequest.md +32 -0
  9. data/docs/CustomEvent.md +26 -0
  10. data/docs/CustomEventsRequest.md +18 -0
  11. data/docs/DefaultApi.md +1132 -110
  12. data/docs/NotificationWithMeta.md +3 -1
  13. data/docs/NotificationWithMetaAllOf.md +3 -1
  14. data/docs/StartLiveActivityRequest.md +48 -0
  15. data/docs/StartLiveActivitySuccessResponse.md +18 -0
  16. data/docs/TemplateResource.md +28 -0
  17. data/docs/TemplatesListResponse.md +18 -0
  18. data/docs/UpdateApiKeyRequest.md +22 -0
  19. data/docs/UpdateTemplateRequest.md +30 -0
  20. data/lib/onesignal/api/default_api.rb +1043 -1
  21. data/lib/onesignal/api_client.rb +2 -2
  22. data/lib/onesignal/api_error.rb +1 -1
  23. data/lib/onesignal/configuration.rb +1 -1
  24. data/lib/onesignal/models/api_key_token.rb +300 -0
  25. data/lib/onesignal/models/api_key_tokens_list_response.rb +221 -0
  26. data/lib/onesignal/models/app.rb +1 -1
  27. data/lib/onesignal/models/basic_notification.rb +1 -1
  28. data/lib/onesignal/models/basic_notification_all_of.rb +1 -1
  29. data/lib/onesignal/models/basic_notification_all_of_android_background_layout.rb +1 -1
  30. data/lib/onesignal/models/button.rb +1 -1
  31. data/lib/onesignal/models/copy_template_request.rb +225 -0
  32. data/lib/onesignal/models/create_api_key_request.rb +273 -0
  33. data/lib/onesignal/models/create_api_key_response.rb +228 -0
  34. data/lib/onesignal/models/create_notification_success_response.rb +1 -1
  35. data/lib/onesignal/models/create_segment_conflict_response.rb +1 -1
  36. data/lib/onesignal/models/create_segment_success_response.rb +1 -1
  37. data/lib/onesignal/models/create_template_request.rb +307 -0
  38. data/lib/onesignal/models/create_user_conflict_response.rb +1 -1
  39. data/lib/onesignal/models/create_user_conflict_response_errors_inner.rb +1 -1
  40. data/lib/onesignal/models/create_user_conflict_response_errors_items_meta.rb +1 -1
  41. data/lib/onesignal/models/custom_event.rb +269 -0
  42. data/lib/onesignal/models/custom_events_request.rb +226 -0
  43. data/lib/onesignal/models/delivery_data.rb +1 -1
  44. data/lib/onesignal/models/export_events_success_response.rb +1 -1
  45. data/lib/onesignal/models/export_subscriptions_request_body.rb +1 -1
  46. data/lib/onesignal/models/export_subscriptions_success_response.rb +1 -1
  47. data/lib/onesignal/models/filter.rb +1 -1
  48. data/lib/onesignal/models/filter_expression.rb +1 -1
  49. data/lib/onesignal/models/generic_error.rb +1 -1
  50. data/lib/onesignal/models/generic_success_bool_response.rb +1 -1
  51. data/lib/onesignal/models/get_notification_history_request_body.rb +1 -1
  52. data/lib/onesignal/models/get_segments_success_response.rb +1 -1
  53. data/lib/onesignal/models/language_string_map.rb +1 -1
  54. data/lib/onesignal/models/notification.rb +1 -1
  55. data/lib/onesignal/models/notification_all_of.rb +1 -1
  56. data/lib/onesignal/models/notification_history_success_response.rb +1 -1
  57. data/lib/onesignal/models/notification_slice.rb +1 -1
  58. data/lib/onesignal/models/notification_target.rb +1 -1
  59. data/lib/onesignal/models/notification_with_meta.rb +15 -5
  60. data/lib/onesignal/models/notification_with_meta_all_of.rb +16 -6
  61. data/lib/onesignal/models/operator.rb +1 -1
  62. data/lib/onesignal/models/outcome_data.rb +1 -1
  63. data/lib/onesignal/models/outcomes_data.rb +1 -1
  64. data/lib/onesignal/models/platform_delivery_data.rb +1 -1
  65. data/lib/onesignal/models/platform_delivery_data_email_all_of.rb +1 -1
  66. data/lib/onesignal/models/platform_delivery_data_sms_all_of.rb +1 -1
  67. data/lib/onesignal/models/properties_body.rb +1 -1
  68. data/lib/onesignal/models/properties_deltas.rb +1 -1
  69. data/lib/onesignal/models/properties_object.rb +1 -1
  70. data/lib/onesignal/models/purchase.rb +1 -1
  71. data/lib/onesignal/models/rate_limit_error.rb +1 -1
  72. data/lib/onesignal/models/segment.rb +1 -1
  73. data/lib/onesignal/models/segment_data.rb +1 -1
  74. data/lib/onesignal/models/segment_notification_target.rb +1 -1
  75. data/lib/onesignal/models/start_live_activity_request.rb +454 -0
  76. data/lib/onesignal/models/start_live_activity_success_response.rb +219 -0
  77. data/lib/onesignal/models/subscription.rb +1 -1
  78. data/lib/onesignal/models/subscription_body.rb +1 -1
  79. data/lib/onesignal/models/subscription_notification_target.rb +1 -1
  80. data/lib/onesignal/models/template_resource.rb +302 -0
  81. data/lib/onesignal/models/templates_list_response.rb +221 -0
  82. data/lib/onesignal/models/transfer_subscription_request_body.rb +1 -1
  83. data/lib/onesignal/models/update_api_key_request.rb +273 -0
  84. data/lib/onesignal/models/update_live_activity_request.rb +1 -1
  85. data/lib/onesignal/models/update_live_activity_success_response.rb +1 -1
  86. data/lib/onesignal/models/update_template_request.rb +282 -0
  87. data/lib/onesignal/models/update_user_request.rb +1 -1
  88. data/lib/onesignal/models/user.rb +1 -1
  89. data/lib/onesignal/models/user_identity_body.rb +1 -1
  90. data/lib/onesignal/models/web_button.rb +1 -1
  91. data/lib/onesignal/version.rb +2 -2
  92. data/lib/onesignal.rb +15 -1
  93. data/onesignal.gemspec +1 -1
  94. data/spec/api/default_api_spec.rb +189 -1
  95. data/spec/api_client_spec.rb +1 -1
  96. data/spec/configuration_spec.rb +1 -1
  97. data/spec/models/api_key_token_spec.rb +68 -0
  98. data/spec/models/api_key_tokens_list_response_spec.rb +34 -0
  99. data/spec/models/app_spec.rb +1 -1
  100. data/spec/models/basic_notification_all_of_android_background_layout_spec.rb +1 -1
  101. data/spec/models/basic_notification_all_of_spec.rb +1 -1
  102. data/spec/models/basic_notification_spec.rb +1 -1
  103. data/spec/models/button_spec.rb +1 -1
  104. data/spec/models/copy_template_request_spec.rb +34 -0
  105. data/spec/models/create_api_key_request_spec.rb +50 -0
  106. data/spec/models/create_api_key_response_spec.rb +40 -0
  107. data/spec/models/create_notification_success_response_spec.rb +1 -1
  108. data/spec/models/create_segment_conflict_response_spec.rb +1 -1
  109. data/spec/models/create_segment_success_response_spec.rb +1 -1
  110. data/spec/models/create_template_request_spec.rb +76 -0
  111. data/spec/models/create_user_conflict_response_errors_inner_spec.rb +1 -1
  112. data/spec/models/create_user_conflict_response_errors_items_meta_spec.rb +1 -1
  113. data/spec/models/create_user_conflict_response_spec.rb +1 -1
  114. data/spec/models/custom_event_spec.rb +58 -0
  115. data/spec/models/custom_events_request_spec.rb +34 -0
  116. data/spec/models/delivery_data_spec.rb +1 -1
  117. data/spec/models/export_events_success_response_spec.rb +1 -1
  118. data/spec/models/export_subscriptions_request_body_spec.rb +1 -1
  119. data/spec/models/export_subscriptions_success_response_spec.rb +1 -1
  120. data/spec/models/filter_expression_spec.rb +1 -1
  121. data/spec/models/filter_spec.rb +1 -1
  122. data/spec/models/generic_error_spec.rb +1 -1
  123. data/spec/models/generic_success_bool_response_spec.rb +1 -1
  124. data/spec/models/get_notification_history_request_body_spec.rb +1 -1
  125. data/spec/models/get_segments_success_response_spec.rb +1 -1
  126. data/spec/models/language_string_map_spec.rb +1 -1
  127. data/spec/models/notification_all_of_spec.rb +1 -1
  128. data/spec/models/notification_history_success_response_spec.rb +1 -1
  129. data/spec/models/notification_slice_spec.rb +1 -1
  130. data/spec/models/notification_spec.rb +1 -1
  131. data/spec/models/notification_target_spec.rb +1 -1
  132. data/spec/models/notification_with_meta_all_of_spec.rb +7 -1
  133. data/spec/models/notification_with_meta_spec.rb +7 -1
  134. data/spec/models/operator_spec.rb +1 -1
  135. data/spec/models/outcome_data_spec.rb +1 -1
  136. data/spec/models/outcomes_data_spec.rb +1 -1
  137. data/spec/models/platform_delivery_data_email_all_of_spec.rb +1 -1
  138. data/spec/models/platform_delivery_data_sms_all_of_spec.rb +1 -1
  139. data/spec/models/platform_delivery_data_spec.rb +1 -1
  140. data/spec/models/properties_body_spec.rb +1 -1
  141. data/spec/models/properties_deltas_spec.rb +1 -1
  142. data/spec/models/properties_object_spec.rb +1 -1
  143. data/spec/models/purchase_spec.rb +1 -1
  144. data/spec/models/rate_limit_error_spec.rb +1 -1
  145. data/spec/models/segment_data_spec.rb +1 -1
  146. data/spec/models/segment_notification_target_spec.rb +1 -1
  147. data/spec/models/segment_spec.rb +1 -1
  148. data/spec/models/start_live_activity_request_spec.rb +128 -0
  149. data/spec/models/start_live_activity_success_response_spec.rb +34 -0
  150. data/spec/models/subscription_body_spec.rb +1 -1
  151. data/spec/models/subscription_notification_target_spec.rb +1 -1
  152. data/spec/models/subscription_spec.rb +1 -1
  153. data/spec/models/template_resource_spec.rb +68 -0
  154. data/spec/models/templates_list_response_spec.rb +34 -0
  155. data/spec/models/transfer_subscription_request_body_spec.rb +1 -1
  156. data/spec/models/update_api_key_request_spec.rb +50 -0
  157. data/spec/models/update_live_activity_request_spec.rb +1 -1
  158. data/spec/models/update_live_activity_success_response_spec.rb +1 -1
  159. data/spec/models/update_template_request_spec.rb +70 -0
  160. data/spec/models/update_user_request_spec.rb +1 -1
  161. data/spec/models/user_identity_body_spec.rb +1 -1
  162. data/spec/models/user_spec.rb +1 -1
  163. data/spec/models/web_button_spec.rb +1 -1
  164. data/spec/spec_helper.rb +1 -1
  165. metadata +57 -1
@@ -123,6 +123,7 @@
123
123
  | **send_after** | **Integer** | Unix timestamp indicating when notification delivery should begin. | [optional] |
124
124
  | **completed_at** | **Integer** | Unix timestamp indicating when notification delivery completed. The delivery duration from start to finish can be calculated with completed_at - send_after. | [optional] |
125
125
  | **platform_delivery_stats** | [**PlatformDeliveryData**](PlatformDeliveryData.md) | | [optional] |
126
+ | **canceled** | **Boolean** | Indicates whether the notification was canceled before it could be sent. | [optional] |
126
127
 
127
128
  ## Example
128
129
 
@@ -248,7 +249,8 @@ instance = OneSignal::NotificationWithMeta.new(
248
249
  queued_at: null,
249
250
  send_after: null,
250
251
  completed_at: null,
251
- platform_delivery_stats: null
252
+ platform_delivery_stats: null,
253
+ canceled: null
252
254
  )
253
255
  ```
254
256
 
@@ -15,6 +15,7 @@
15
15
  | **platform_delivery_stats** | [**PlatformDeliveryData**](PlatformDeliveryData.md) | | [optional] |
16
16
  | **received** | **Integer** | Confirmed Deliveries number of devices that received the push notification. Paid Feature Only. Free accounts will see 0. | [optional] |
17
17
  | **throttle_rate_per_minute** | **Integer** | 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. | [optional] |
18
+ | **canceled** | **Boolean** | Indicates whether the notification was canceled before it could be sent. | [optional] |
18
19
 
19
20
  ## Example
20
21
 
@@ -32,7 +33,8 @@ instance = OneSignal::NotificationWithMetaAllOf.new(
32
33
  completed_at: null,
33
34
  platform_delivery_stats: null,
34
35
  received: null,
35
- throttle_rate_per_minute: null
36
+ throttle_rate_per_minute: null,
37
+ canceled: null
36
38
  )
37
39
  ```
38
40
 
@@ -0,0 +1,48 @@
1
+ # OneSignal::StartLiveActivityRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | An internal name to assist with your campaign organization. This does not get displayed in the message itself. | |
8
+ | **event** | **String** | | [default to 'start'] |
9
+ | **activity_id** | **String** | Set a unique activity_id to track and manage the Live Activity. | |
10
+ | **event_attributes** | **Object** | Default/static data to initialize the Live Activity upon start. | |
11
+ | **event_updates** | **Object** | Dynamic content used to update the running Live Activity at start. Must match the ContentState interface defined in your app. | |
12
+ | **contents** | [**LanguageStringMap**](LanguageStringMap.md) | | |
13
+ | **headings** | [**LanguageStringMap**](LanguageStringMap.md) | | |
14
+ | **stale_date** | **Integer** | Accepts Unix timestamp in seconds. When time reaches the configured stale date, the system considers the Live Activity out of date, and the ActivityState of the Live Activity changes to ActivityState.stale. | [optional] |
15
+ | **priority** | **Integer** | Delivery priority through the push provider (APNs). Pass 10 for higher priority notifications, or 5 for lower priority notifications. Lower priority notifications are sent based on the power considerations of the end user's device. If not set, defaults to 10. | [optional] |
16
+ | **ios_relevance_score** | **Float** | iOS 15+. A score to indicate how a notification should be displayed when grouped. Use a float between 0-1. | [optional] |
17
+ | **idempotency_key** | **String** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] |
18
+ | **include_aliases** | **Hash<String, Array<String>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: If targeting push, email, or sms subscribers with same ids, use with target_channel to indicate you are sending a push or email or sms. | [optional] |
19
+ | **include_subscription_ids** | **Array<String>** | Specific subscription ids to target. Not compatible with other targeting parameters. | [optional] |
20
+ | **included_segments** | **Array<String>** | Segment names to include. Only compatible with excluded_segments. | [optional] |
21
+ | **excluded_segments** | **Array<String>** | Segment names to exclude. Only compatible with included_segments. | [optional] |
22
+ | **filters** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] |
23
+
24
+ ## Example
25
+
26
+ ```ruby
27
+ require 'onesignal'
28
+
29
+ instance = OneSignal::StartLiveActivityRequest.new(
30
+ name: null,
31
+ event: null,
32
+ activity_id: null,
33
+ event_attributes: null,
34
+ event_updates: null,
35
+ contents: null,
36
+ headings: null,
37
+ stale_date: null,
38
+ priority: null,
39
+ ios_relevance_score: null,
40
+ idempotency_key: null,
41
+ include_aliases: null,
42
+ include_subscription_ids: null,
43
+ included_segments: null,
44
+ excluded_segments: null,
45
+ filters: null
46
+ )
47
+ ```
48
+
@@ -0,0 +1,18 @@
1
+ # OneSignal::StartLiveActivitySuccessResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **notification_id** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'onesignal'
13
+
14
+ instance = OneSignal::StartLiveActivitySuccessResponse.new(
15
+ notification_id: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,28 @@
1
+ # OneSignal::TemplateResource
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **name** | **String** | | [optional] |
9
+ | **created_at** | **Time** | | [optional] |
10
+ | **updated_at** | **Time** | | [optional] |
11
+ | **channel** | **String** | | [optional] |
12
+ | **content** | **Hash<String, Object>** | Rendered content and channel/platform flags for the template. | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'onesignal'
18
+
19
+ instance = OneSignal::TemplateResource.new(
20
+ id: null,
21
+ name: null,
22
+ created_at: null,
23
+ updated_at: null,
24
+ channel: null,
25
+ content: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,18 @@
1
+ # OneSignal::TemplatesListResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **templates** | [**Array<TemplateResource>**](TemplateResource.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'onesignal'
13
+
14
+ instance = OneSignal::TemplatesListResponse.new(
15
+ templates: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,22 @@
1
+ # OneSignal::UpdateApiKeyRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | | [optional] |
8
+ | **ip_allowlist_mode** | **String** | | [optional] |
9
+ | **ip_allowlist** | **Array<String>** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'onesignal'
15
+
16
+ instance = OneSignal::UpdateApiKeyRequest.new(
17
+ name: null,
18
+ ip_allowlist_mode: null,
19
+ ip_allowlist: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,30 @@
1
+ # OneSignal::UpdateTemplateRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | Updated name of the template. | [optional] |
8
+ | **contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
9
+ | **is_email** | **Boolean** | Set true for an Email template. | [optional] |
10
+ | **email_subject** | **String** | Subject of the email. | [optional] |
11
+ | **email_body** | **String** | Body of the email (HTML supported). | [optional] |
12
+ | **is_sms** | **Boolean** | Set true for an SMS template. | [optional] |
13
+ | **dynamic_content** | **String** | JSON string for dynamic content personalization. | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'onesignal'
19
+
20
+ instance = OneSignal::UpdateTemplateRequest.new(
21
+ name: null,
22
+ contents: null,
23
+ is_email: null,
24
+ email_subject: null,
25
+ email_body: null,
26
+ is_sms: null,
27
+ dynamic_content: null
28
+ )
29
+ ```
30
+