onesignal 5.12.0 → 5.13.0

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 (77) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/Gemfile.lock +2 -2
  4. data/README.md +3 -3
  5. data/docs/StartLiveActivityRequest.md +1 -1
  6. data/docs/UpdateLiveActivityRequest.md +7 -3
  7. data/lib/onesignal/api_client.rb +1 -1
  8. data/lib/onesignal/models/start_live_activity_request.rb +1 -1
  9. data/lib/onesignal/models/update_live_activity_request.rb +27 -6
  10. data/lib/onesignal/version.rb +1 -1
  11. data/spec/models/update_live_activity_request_spec.rb +12 -0
  12. data/vendor/bundle/ruby/3.2.0/cache/psych-5.5.0.gem +0 -0
  13. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/gem_make.out +28 -0
  14. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/psych.so +0 -0
  15. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/README.md +53 -0
  16. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/extconf.rb +22 -0
  17. data/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych/psych.c +68 -0
  18. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych.h +4 -0
  19. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_emitter.c +4 -0
  20. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_parser.c +79 -18
  21. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/class_loader.rb +1 -0
  22. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/parser.rb +40 -1
  23. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/scalar_scanner.rb +15 -3
  24. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/versions.rb +1 -1
  25. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/to_ruby.rb +20 -9
  26. data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/yaml_tree.rb +0 -3
  27. data/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/lib/psych.so +0 -0
  28. data/vendor/bundle/ruby/3.2.0/specifications/{psych-5.4.0.gemspec → psych-5.5.0.gemspec} +2 -2
  29. metadata +62 -62
  30. data/vendor/bundle/ruby/3.2.0/cache/psych-5.4.0.gem +0 -0
  31. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/gem_make.out +0 -28
  32. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/psych.so +0 -0
  33. data/vendor/bundle/ruby/3.2.0/gems/psych-5.4.0/ext/psych/psych.c +0 -36
  34. data/vendor/bundle/ruby/3.2.0/gems/psych-5.4.0/lib/psych.so +0 -0
  35. /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{psych-5.4.0 → psych-5.5.0}/gem.build_complete +0 -0
  36. /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{psych-5.4.0 → psych-5.5.0}/mkmf.log +0 -0
  37. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/CONTRIBUTING.md +0 -0
  38. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/LICENSE +0 -0
  39. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/Makefile +0 -0
  40. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/depend +0 -0
  41. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_emitter.h +0 -0
  42. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_parser.h +0 -0
  43. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_to_ruby.c +0 -0
  44. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_to_ruby.h +0 -0
  45. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_yaml_tree.c +0 -0
  46. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/ext/psych/psych_yaml_tree.h +0 -0
  47. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/coder.rb +0 -0
  48. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/core_ext.rb +0 -0
  49. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/exception.rb +0 -0
  50. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/handler.rb +0 -0
  51. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/handlers/document_stream.rb +0 -0
  52. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/handlers/recorder.rb +0 -0
  53. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/ruby_events.rb +0 -0
  54. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/stream.rb +0 -0
  55. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/tree_builder.rb +0 -0
  56. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/json/yaml_events.rb +0 -0
  57. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/alias.rb +0 -0
  58. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/document.rb +0 -0
  59. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/mapping.rb +0 -0
  60. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/node.rb +0 -0
  61. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/scalar.rb +0 -0
  62. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/sequence.rb +0 -0
  63. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes/stream.rb +0 -0
  64. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/nodes.rb +0 -0
  65. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/omap.rb +0 -0
  66. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/set.rb +0 -0
  67. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/stream.rb +0 -0
  68. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/streaming.rb +0 -0
  69. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/syntax_error.rb +0 -0
  70. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/tree_builder.rb +0 -0
  71. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/depth_first.rb +0 -0
  72. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/emitter.rb +0 -0
  73. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/json_tree.rb +0 -0
  74. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors/visitor.rb +0 -0
  75. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/visitors.rb +0 -0
  76. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych/y.rb +0 -0
  77. /data/vendor/bundle/ruby/3.2.0/gems/{psych-5.4.0 → psych-5.5.0}/lib/psych.rb +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 27bd25cedecc4400ebd5c5b3ba54705730aa708b4e061342044d05369864056c
4
- data.tar.gz: fa05c3df694bafe71db0473036e303ea99db1a6eae2c9cc92b8dc83622599725
3
+ metadata.gz: 12484b4b8625118acab9f635ca17136c8826bef48db62697df3ce53f0b85f604
4
+ data.tar.gz: 7b7f879c398aa7b241b8a8804c1cf95347ab6bbbafccb2bd5fc91248ad64a8ca
5
5
  SHA512:
6
- metadata.gz: '00911ff2d2543fa8e34a01a9592f77255355c371c980274bfabe14616f14a5616005f75f06b164d8b2ad4a52c258ce820c76519e078d424ccf972f7175bc49cb'
7
- data.tar.gz: b4656a05741829e8ed2b95056a1094ab002460cd161ae9afac540e0ab51695fba3d699b94239a2a34b88673017e491dd70db2064b29b1f4ad3c6bc461385fa89
6
+ metadata.gz: b0de961cf9d2f5dbe09758b5224ba2a1c2890d5893e5af4642c03886beca7c697b23fb9adcd249cb6a10ae455dd0bb56905e415183f85c5e210e8a239a6292bd
7
+ data.tar.gz: 4ff0128dabbd88b0d6a1daf59edd3951596df235a99ca1549e699ecc9338db0c20152d909a2655161732f89003d96f8624831b78eba303826ce7b039c907f821
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.12.0](https://github.com/OneSignal/onesignal-ruby-api/compare/v5.11.2...v5.12.0) (2026-08-20)
4
+
5
+ ### Features
6
+
7
+ * add v5.12.0 package updates ([8cdba86](https://github.com/OneSignal/onesignal-ruby-api/commit/8cdba867feb6274e6bf99e3f8c97aaf64cc6948a))
8
+ * add v5.12.0 package updates ([#121](https://github.com/OneSignal/onesignal-ruby-api/issues/121)) ([352fb99](https://github.com/OneSignal/onesignal-ruby-api/commit/352fb99ea3e2287ad10bff7546ab8333092fd09a)), closes [OneSignal/api-client-libraries#450](https://github.com/OneSignal/api-client-libraries/issues/450)
9
+
3
10
  ## [5.11.2](https://github.com/OneSignal/onesignal-ruby-api/compare/v5.11.1...v5.11.2) (2026-08-12)
4
11
 
5
12
  ## [5.11.1](https://github.com/OneSignal/onesignal-ruby-api/compare/v5.11.0...v5.11.1) (2026-07-29)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- onesignal (5.12.0)
4
+ onesignal (5.13.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -32,7 +32,7 @@ GEM
32
32
  pry-byebug (3.12.0)
33
33
  byebug (~> 13.0)
34
34
  pry (>= 0.13, < 0.17)
35
- psych (5.4.0)
35
+ psych (5.5.0)
36
36
  date
37
37
  stringio
38
38
  racc (1.8.1)
data/README.md CHANGED
@@ -6,15 +6,15 @@ OneSignal - the Ruby gem for OneSignal
6
6
 
7
7
  A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
8
8
 
9
- - API version: 5.12.0
10
- - Package version: 5.12.0
9
+ - API version: 5.13.0
10
+ - Package version: 5.13.0
11
11
 
12
12
  ## Installation
13
13
 
14
14
  Add to your `Gemfile`:
15
15
 
16
16
  ```ruby
17
- gem 'onesignal', '~> 5.12.0'
17
+ gem 'onesignal', '~> 5.13.0'
18
18
  ```
19
19
 
20
20
  Then run `bundle install`.
@@ -13,7 +13,7 @@
13
13
  | **headings** | [**LanguageStringMap**](LanguageStringMap.md) | | |
14
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
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&#39;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] |
16
+ | **ios_relevance_score** | **Float** | A value between 0 and 1. When more than one Live Activity is active for your app, the one with the highest relevance score shows in the Dynamic Island. If the scores are equal, the system shows the Live Activity that started first. The score also sets the order of Live Activities on the Lock Screen. Only available on iOS 16.2 and later. | [optional] |
17
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&#39;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
18
  | **include_aliases** | **Hash&lt;String, Array&lt;String&gt;&gt;** | 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: { \&quot;external_id\&quot;: [\&quot;exId1\&quot;, \&quot;extId2\&quot;], \&quot;internal_label\&quot;: [\&quot;id1\&quot;, \&quot;id2\&quot;] } Keys must match API spellings exactly (for example the label for External ID is the string &#x60;external_id&#x60;; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). 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
19
  | **include_subscription_ids** | **Array&lt;String&gt;** | Specific subscription ids to target. Not compatible with other targeting parameters. | [optional] |
@@ -9,10 +9,12 @@
9
9
  | **event_updates** | **Object** | This must match the ContentState interface you have defined within your Live Activity in your app. | |
10
10
  | **contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
11
11
  | **headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] |
12
- | **sound** | **String** | Sound file that is included in your app to play instead of the default device notification sound. Omit to disable vibration and sound for the notification. | [optional] |
12
+ | **sound** | **String** | Deprecated. The API ignores this field. Use &#x60;ios_sound&#x60;. | [optional] |
13
+ | **ios_sound** | **String** | Sound file that is included in your app to play instead of the default device notification sound. Omit to disable vibration and sound for the notification. Requires &#x60;headings&#x60; on the same request: ActivityKit ignores an update whose alert has no title, which silently drops the sound. Supersedes the deprecated &#x60;sound&#x60; field. | [optional] |
13
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] |
14
15
  | **dismissal_date** | **Integer** | Accepts Unix timestamp in seconds; only allowed if event is \&quot;end\&quot; | [optional] |
15
- | **priority** | **Integer** | Delivery priority through the 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&#39;s device. If not set, defaults to 10. Some providers (APNs) allow for a limited budget of high priority notifications per hour, and if that budget is exceeded, the provider may throttle notification delivery. | [optional] |
16
+ | **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&#39;s device. If not set, defaults to 10. Some providers (APNs) allow for a limited budget of high priority notifications per hour, and if that budget is exceeded, the provider may throttle notification delivery. | [optional] |
17
+ | **ios_relevance_score** | **Float** | A value between 0 and 1. When more than one Live Activity is active for your app, the one with the highest relevance score shows in the Dynamic Island. If the scores are equal, the system shows the Live Activity that started first. The score also sets the order of Live Activities on the Lock Screen. Only available on iOS 16.2 and later. | [optional] |
16
18
 
17
19
  ## Example
18
20
 
@@ -26,9 +28,11 @@ instance = OneSignal::UpdateLiveActivityRequest.new(
26
28
  contents: nil,
27
29
  headings: nil,
28
30
  sound: nil,
31
+ ios_sound: nil,
29
32
  stale_date: nil,
30
33
  dismissal_date: nil,
31
- priority: nil
34
+ priority: nil,
35
+ ios_relevance_score: nil
32
36
  )
33
37
  ```
34
38
 
@@ -89,7 +89,7 @@ module OneSignal
89
89
  url = build_request_url(path, opts)
90
90
  http_method = http_method.to_sym.downcase
91
91
 
92
- opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-ruby, version=5.12.0'
92
+ opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-ruby, version=5.13.0'
93
93
  header_params = @default_headers.merge(opts[:header_params] || {})
94
94
  query_params = opts[:query_params] || {}
95
95
  form_params = opts[:form_params] || {}
@@ -38,7 +38,7 @@ module OneSignal
38
38
  # 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.
39
39
  attr_accessor :priority
40
40
 
41
- # iOS 15+. A score to indicate how a notification should be displayed when grouped. Use a float between 0-1.
41
+ # A value between 0 and 1. When more than one Live Activity is active for your app, the one with the highest relevance score shows in the Dynamic Island. If the scores are equal, the system shows the Live Activity that started first. The score also sets the order of Live Activities on the Lock Screen. Only available on iOS 16.2 and later.
42
42
  attr_accessor :ios_relevance_score
43
43
 
44
44
  # 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
@@ -26,18 +26,24 @@ module OneSignal
26
26
 
27
27
  attr_accessor :headings
28
28
 
29
- # Sound file that is included in your app to play instead of the default device notification sound. Omit to disable vibration and sound for the notification.
29
+ # Deprecated. The API ignores this field. Use `ios_sound`.
30
30
  attr_accessor :sound
31
31
 
32
+ # Sound file that is included in your app to play instead of the default device notification sound. Omit to disable vibration and sound for the notification. Requires `headings` on the same request: ActivityKit ignores an update whose alert has no title, which silently drops the sound. Supersedes the deprecated `sound` field.
33
+ attr_accessor :ios_sound
34
+
32
35
  # 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.
33
36
  attr_accessor :stale_date
34
37
 
35
38
  # Accepts Unix timestamp in seconds; only allowed if event is \"end\"
36
39
  attr_accessor :dismissal_date
37
40
 
38
- # Delivery priority through the 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. Some providers (APNs) allow for a limited budget of high priority notifications per hour, and if that budget is exceeded, the provider may throttle notification delivery.
41
+ # 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. Some providers (APNs) allow for a limited budget of high priority notifications per hour, and if that budget is exceeded, the provider may throttle notification delivery.
39
42
  attr_accessor :priority
40
43
 
44
+ # A value between 0 and 1. When more than one Live Activity is active for your app, the one with the highest relevance score shows in the Dynamic Island. If the scores are equal, the system shows the Live Activity that started first. The score also sets the order of Live Activities on the Lock Screen. Only available on iOS 16.2 and later.
45
+ attr_accessor :ios_relevance_score
46
+
41
47
  class EnumAttributeValidator
42
48
  attr_reader :datatype
43
49
  attr_reader :allowable_values
@@ -69,9 +75,11 @@ module OneSignal
69
75
  :'contents' => :'contents',
70
76
  :'headings' => :'headings',
71
77
  :'sound' => :'sound',
78
+ :'ios_sound' => :'ios_sound',
72
79
  :'stale_date' => :'stale_date',
73
80
  :'dismissal_date' => :'dismissal_date',
74
- :'priority' => :'priority'
81
+ :'priority' => :'priority',
82
+ :'ios_relevance_score' => :'ios_relevance_score'
75
83
  }
76
84
  end
77
85
 
@@ -89,15 +97,18 @@ module OneSignal
89
97
  :'contents' => :'LanguageStringMap',
90
98
  :'headings' => :'LanguageStringMap',
91
99
  :'sound' => :'String',
100
+ :'ios_sound' => :'String',
92
101
  :'stale_date' => :'Integer',
93
102
  :'dismissal_date' => :'Integer',
94
- :'priority' => :'Integer'
103
+ :'priority' => :'Integer',
104
+ :'ios_relevance_score' => :'Float'
95
105
  }
96
106
  end
97
107
 
98
108
  # List of attributes with nullable: true
99
109
  def self.openapi_nullable
100
110
  Set.new([
111
+ :'ios_relevance_score'
101
112
  ])
102
113
  end
103
114
 
@@ -140,6 +151,10 @@ module OneSignal
140
151
  self.sound = attributes[:'sound']
141
152
  end
142
153
 
154
+ if attributes.key?(:'ios_sound')
155
+ self.ios_sound = attributes[:'ios_sound']
156
+ end
157
+
143
158
  if attributes.key?(:'stale_date')
144
159
  self.stale_date = attributes[:'stale_date']
145
160
  end
@@ -151,6 +166,10 @@ module OneSignal
151
166
  if attributes.key?(:'priority')
152
167
  self.priority = attributes[:'priority']
153
168
  end
169
+
170
+ if attributes.key?(:'ios_relevance_score')
171
+ self.ios_relevance_score = attributes[:'ios_relevance_score']
172
+ end
154
173
  end
155
174
 
156
175
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -204,9 +223,11 @@ module OneSignal
204
223
  contents == o.contents &&
205
224
  headings == o.headings &&
206
225
  sound == o.sound &&
226
+ ios_sound == o.ios_sound &&
207
227
  stale_date == o.stale_date &&
208
228
  dismissal_date == o.dismissal_date &&
209
- priority == o.priority
229
+ priority == o.priority &&
230
+ ios_relevance_score == o.ios_relevance_score
210
231
  end
211
232
 
212
233
  # @see the `==` method
@@ -218,7 +239,7 @@ module OneSignal
218
239
  # Calculates hash code according to all attributes.
219
240
  # @return [Integer] Hash code
220
241
  def hash
221
- [name, event, event_updates, contents, headings, sound, stale_date, dismissal_date, priority].hash
242
+ [name, event, event_updates, contents, headings, sound, ios_sound, stale_date, dismissal_date, priority, ios_relevance_score].hash
222
243
  end
223
244
 
224
245
  # Builds the object from hash
@@ -10,5 +10,5 @@ OpenAPI Generator version: 6.0.0-SNAPSHOT
10
10
  =end
11
11
 
12
12
  module OneSignal
13
- VERSION = '5.12.0'
13
+ VERSION = '5.13.0'
14
14
  end
@@ -64,6 +64,12 @@ describe OneSignal::UpdateLiveActivityRequest do
64
64
  end
65
65
  end
66
66
 
67
+ describe 'test attribute "ios_sound"' do
68
+ it 'should work' do
69
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
70
+ end
71
+ end
72
+
67
73
  describe 'test attribute "stale_date"' do
68
74
  it 'should work' do
69
75
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -82,4 +88,10 @@ describe OneSignal::UpdateLiveActivityRequest do
82
88
  end
83
89
  end
84
90
 
91
+ describe 'test attribute "ios_relevance_score"' do
92
+ it 'should work' do
93
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
94
+ end
95
+ end
96
+
85
97
  end
@@ -0,0 +1,28 @@
1
+ current directory: /home/runner/work/onesignal-ruby-api/onesignal-ruby-api/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych
2
+ /opt/hostedtoolcache/Ruby/3.2.11/x64/bin/ruby extconf.rb
3
+ creating Makefile
4
+
5
+ current directory: /home/runner/work/onesignal-ruby-api/onesignal-ruby-api/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych
6
+ make DESTDIR\= sitearchdir\=./.gem.20260825-2130-bppjtk sitelibdir\=./.gem.20260825-2130-bppjtk clean
7
+ cd libyaml && make clean
8
+ /bin/sh: 1: cd: can't cd to libyaml
9
+ make: [Makefile:283: clean-so] Error 2 (ignored)
10
+
11
+ current directory: /home/runner/work/onesignal-ruby-api/onesignal-ruby-api/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych
12
+ make DESTDIR\= sitearchdir\=./.gem.20260825-2130-bppjtk sitelibdir\=./.gem.20260825-2130-bppjtk
13
+ compiling psych.c
14
+ compiling psych_emitter.c
15
+ compiling psych_parser.c
16
+ compiling psych_to_ruby.c
17
+ compiling psych_yaml_tree.c
18
+ linking shared-object psych.so
19
+
20
+ current directory: /home/runner/work/onesignal-ruby-api/onesignal-ruby-api/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych
21
+ make DESTDIR\= sitearchdir\=./.gem.20260825-2130-bppjtk sitelibdir\=./.gem.20260825-2130-bppjtk install
22
+ /usr/bin/install -c -m 0755 psych.so ./.gem.20260825-2130-bppjtk
23
+
24
+ current directory: /home/runner/work/onesignal-ruby-api/onesignal-ruby-api/vendor/bundle/ruby/3.2.0/gems/psych-5.5.0/ext/psych
25
+ make DESTDIR\= sitearchdir\=./.gem.20260825-2130-bppjtk sitelibdir\=./.gem.20260825-2130-bppjtk clean
26
+ cd libyaml && make clean
27
+ /bin/sh: 1: cd: can't cd to libyaml
28
+ make: [Makefile:283: clean-so] Error 2 (ignored)
@@ -23,6 +23,7 @@ Psych.dump("foo") # => "--- foo\n...\n"
23
23
  ## Dependencies
24
24
 
25
25
  * libyaml
26
+ * libfyaml (optional, only for the experimental `--enable-libfyaml` backend)
26
27
 
27
28
  ## Installation
28
29
 
@@ -57,6 +58,58 @@ gem 'psych'
57
58
 
58
59
  JRuby ships with a pure Java implementation of Psych.
59
60
 
61
+ ## Experimental libfyaml backend
62
+
63
+ Psych ships an experimental, opt-in backend built on
64
+ [libfyaml](https://github.com/pantoniou/libfyaml), a fully YAML 1.2 compliant
65
+ parser and emitter. It is compiled only when you explicitly pass
66
+ `--enable-libfyaml` at build time. Without the flag the default libyaml
67
+ backend is used and nothing changes.
68
+
69
+ ```bash
70
+ # libfyaml and pkg-config must be installed first, for example:
71
+ # apt-get install libfyaml-dev # Debian/Ubuntu
72
+ # brew install libfyaml # macOS
73
+ gem install psych -- --enable-libfyaml
74
+ ```
75
+
76
+ This backend is not supported on Windows.
77
+
78
+ Because libfyaml follows YAML 1.2, the YAML 1.1 booleans `yes`, `no`, `on`, and
79
+ `off` load as plain strings instead of `true`/`false` (only `true`/`false` are
80
+ booleans). This resolves the so-called "Norway problem", where the country
81
+ code `no` was parsed as `false`:
82
+
83
+ ```ruby
84
+ Psych.load("country: no") # => {"country" => "no"}
85
+ ```
86
+
87
+ You can check which backend is active:
88
+
89
+ ```ruby
90
+ Psych::BACKEND # => "libfyaml" (or "libyaml")
91
+ Psych.libfyaml_version # => "0.9.6"
92
+ ```
93
+
94
+ The backend is experimental. Its output is valid YAML but is formatted
95
+ differently from libyaml in places, and a few emitter edge cases are not yet
96
+ matched. The default libyaml backend remains the supported choice.
97
+
98
+ Two more differences are worth knowing. Scalars emitted with the default
99
+ (`ANY`) style may be quoted or laid out differently from libyaml, so
100
+ byte-for-byte output is not guaranteed to match. On a parse error,
101
+ `Psych::SyntaxError#problem` carries libfyaml's full diagnostic message and
102
+ `Psych::SyntaxError#context` is always `nil`, whereas libyaml splits the
103
+ description across `#problem` and `#context`.
104
+
105
+ This backend targets YAML 1.2 compliance, not speed. In a rough
106
+ single-machine benchmark that loads and dumps in-memory documents, parsing
107
+ was roughly on par with libyaml (sometimes faster on string-heavy input),
108
+ while emitting was about 1.7x to 1.9x slower. Your numbers will vary, but the
109
+ shape holds: libfyaml is competitive at parsing and slower at emitting. Use
110
+ this backend when you need YAML 1.2 semantics. If throughput is your priority,
111
+ keep using the default libyaml backend.
112
+
60
113
  ## Release
61
114
 
62
115
  We used the trusted publisher and [rubygems/release-gem](https://github.com/rubygems/release-gem) workflow.
@@ -2,6 +2,28 @@
2
2
  # frozen_string_literal: true
3
3
  require 'mkmf'
4
4
 
5
+ # Experimental, opt-in libfyaml backend. Only used when psych is built with
6
+ # --enable-libfyaml. Without the flag nothing below changes and the default
7
+ # libyaml backend is built exactly as before.
8
+ if enable_config("libfyaml", false)
9
+ if $mswin or $mingw or $cygwin
10
+ abort "The libfyaml backend (--enable-libfyaml) is not supported on Windows"
11
+ end
12
+ unless pkg_config('libfyaml')
13
+ abort "libfyaml was requested with --enable-libfyaml but was not found via pkg-config"
14
+ end
15
+ # libfyaml 0.8 and earlier crash psych's emitter, so require a known-good
16
+ # version rather than building something that segfaults at runtime.
17
+ pkgconfig = ENV["PKG_CONFIG"] || "pkg-config"
18
+ unless system(pkgconfig, "--atleast-version=0.9", "libfyaml")
19
+ abort "The libfyaml backend requires libfyaml 0.9 or newer"
20
+ end
21
+ $defs << "-DPSYCH_USE_LIBFYAML"
22
+
23
+ create_makefile 'psych'
24
+ return
25
+ end
26
+
5
27
  if $mswin or $mingw or $cygwin
6
28
  $CPPFLAGS << " -DYAML_DECLARE_STATIC"
7
29
  end
@@ -0,0 +1,68 @@
1
+ #include <psych.h>
2
+
3
+ /* call-seq: Psych.libyaml_version
4
+ *
5
+ * Returns the version of the underlying YAML library as a three-element
6
+ * array. This is libyaml by default. On the experimental libfyaml backend,
7
+ * where libyaml is not linked, it reports the libfyaml version instead.
8
+ */
9
+ static VALUE libyaml_version(VALUE module)
10
+ {
11
+ int major, minor, patch;
12
+ VALUE list[3];
13
+
14
+ #ifdef PSYCH_USE_LIBFYAML
15
+ /* Experimental libfyaml backend: there is no libyaml linked in. Report
16
+ * the libfyaml version so callers still receive a 3-element version. */
17
+ const struct fy_version *v = fy_version_default();
18
+ major = v ? v->major : 0;
19
+ minor = v ? v->minor : 0;
20
+ patch = 0;
21
+ #else
22
+ yaml_get_version(&major, &minor, &patch);
23
+ #endif
24
+
25
+ list[0] = INT2NUM(major);
26
+ list[1] = INT2NUM(minor);
27
+ list[2] = INT2NUM(patch);
28
+
29
+ return rb_ary_new4((long)3, list);
30
+ }
31
+
32
+ #ifdef PSYCH_USE_LIBFYAML
33
+ /* call-seq: Psych.libfyaml_version
34
+ *
35
+ * Returns the libfyaml version string. This method is only defined when
36
+ * psych was built with the experimental libfyaml backend
37
+ * (+--enable-libfyaml+).
38
+ */
39
+ static VALUE libfyaml_version(VALUE module)
40
+ {
41
+ const char *v = fy_library_version();
42
+ return v ? rb_usascii_str_new2(v) : Qnil;
43
+ }
44
+ #endif
45
+
46
+ VALUE mPsych;
47
+
48
+ void Init_psych(void)
49
+ {
50
+ #ifdef HAVE_RB_EXT_RACTOR_SAFE
51
+ RB_EXT_RACTOR_SAFE(true);
52
+ #endif
53
+ mPsych = rb_define_module("Psych");
54
+
55
+ rb_define_singleton_method(mPsych, "libyaml_version", libyaml_version, 0);
56
+
57
+ #ifdef PSYCH_USE_LIBFYAML
58
+ rb_define_singleton_method(mPsych, "libfyaml_version", libfyaml_version, 0);
59
+ rb_define_const(mPsych, "BACKEND", rb_usascii_str_new2("libfyaml"));
60
+ #else
61
+ rb_define_const(mPsych, "BACKEND", rb_usascii_str_new2("libyaml"));
62
+ #endif
63
+
64
+ Init_psych_parser();
65
+ Init_psych_emitter();
66
+ Init_psych_to_ruby();
67
+ Init_psych_yaml_tree();
68
+ }
@@ -4,7 +4,11 @@
4
4
  #include <ruby.h>
5
5
  #include <ruby/encoding.h>
6
6
 
7
+ #ifdef PSYCH_USE_LIBFYAML
8
+ #include <libfyaml.h>
9
+ #else
7
10
  #include <yaml.h>
11
+ #endif
8
12
 
9
13
  #include <psych_parser.h>
10
14
  #include <psych_emitter.h>
@@ -1,5 +1,7 @@
1
1
  #include <psych.h>
2
2
 
3
+ #ifndef PSYCH_USE_LIBFYAML
4
+
3
5
  #if !defined(RARRAY_CONST_PTR)
4
6
  #define RARRAY_CONST_PTR(s) (const VALUE *)RARRAY_PTR(s)
5
7
  #endif
@@ -587,3 +589,5 @@ void Init_psych_emitter(void)
587
589
  id_indentation = rb_intern("indentation");
588
590
  id_canonical = rb_intern("canonical");
589
591
  }
592
+
593
+ #endif /* PSYCH_USE_LIBFYAML */