onesignal 5.16.0 → 5.17.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 (47) 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/DefaultApi.md +89 -6
  6. data/docs/DuplicateJourneyOverrides.md +30 -0
  7. data/docs/DuplicateJourneyRequest.md +18 -0
  8. data/docs/JourneyNode.md +2 -2
  9. data/docs/UpdateJourneyNodeRequest.md +2 -2
  10. data/lib/onesignal/api/default_api.rb +82 -6
  11. data/lib/onesignal/api_client.rb +1 -1
  12. data/lib/onesignal/models/duplicate_journey_overrides.rb +282 -0
  13. data/lib/onesignal/models/duplicate_journey_request.rb +219 -0
  14. data/lib/onesignal/models/journey.rb +1 -1
  15. data/lib/onesignal/models/journey_node.rb +2 -2
  16. data/lib/onesignal/models/update_journey_node_request.rb +2 -2
  17. data/lib/onesignal/version.rb +1 -1
  18. data/lib/onesignal.rb +2 -0
  19. data/spec/api/default_api_spec.rb +17 -3
  20. data/spec/models/duplicate_journey_overrides_spec.rb +69 -0
  21. data/spec/models/duplicate_journey_request_spec.rb +33 -0
  22. data/vendor/bundle/ruby/3.2.0/cache/io-console-0.9.4.gem +0 -0
  23. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
  24. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
  25. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.9.2 → io-console-0.9.4}/gem_make.out +12 -10
  26. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.4/io/console.so +0 -0
  27. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.9.2 → io-console-0.9.4}/mkmf.log +33 -6
  28. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  29. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/gem_make.out +5 -5
  30. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
  31. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
  32. data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/ext/io/console/Makefile +3 -3
  33. data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/ext/io/console/console.c +101 -13
  34. data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/ext/io/console/extconf.rb +27 -2
  35. data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/lib/io/console/size.rb +4 -2
  36. data/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.4/lib/io/console.so +0 -0
  37. data/vendor/bundle/ruby/3.2.0/specifications/{io-console-0.9.2.gemspec → io-console-0.9.4.gemspec} +3 -3
  38. metadata +117 -109
  39. data/vendor/bundle/ruby/3.2.0/cache/io-console-0.9.2.gem +0 -0
  40. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/io/console.so +0 -0
  41. data/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.2/lib/io/console.so +0 -0
  42. /data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/{io-console-0.9.2 → io-console-0.9.4}/gem.build_complete +0 -0
  43. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/.document +0 -0
  44. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/BSDL +0 -0
  45. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/COPYING +0 -0
  46. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/README.md +0 -0
  47. /data/vendor/bundle/ruby/3.2.0/gems/{io-console-0.9.2 → io-console-0.9.4}/ext/io/console/win32_vk.inc +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec6437db60463bed7b865d5ac5059a48bd9352d83634200102457c5bad51cb1c
4
- data.tar.gz: db39d74d08c633d7546b1686be1ca8bbb2d750d5296b5d2d8f47edba1f9ec4f6
3
+ metadata.gz: 1b41bdc34e70437322c8bb7db670c5686f9832af8e78035907534a721c0e59d3
4
+ data.tar.gz: 2b1582c9da87273abced5b74127f9bfaeffda11354123cb342f6d2801656a556
5
5
  SHA512:
6
- metadata.gz: e32af171e6615a73118e0fd1ac82a15912b8314d33e550e597d130d8db305230d1f25864b564933bd9f3e2a7f9f30a9a3ac3fd1a7b3f02f6ffc1016d7f30ff6f
7
- data.tar.gz: 559f6275009040ad7b539bb7dfa140f2315561f09908c1e8b34d0e350661c16d143d718c21adc53f6359c306c8ff516f0d23a51cc3cfd0cef86d6b9cb0be5458
6
+ metadata.gz: 6457110df5fc0f411892d777064ef6c26b101d3b532482eb2fb8b01ef30c8d21a3780bf5ee9e84581f44bd0d21056764084224889f080cdedcaddda943b2e5e6
7
+ data.tar.gz: 53c79da8af5027cb2415d14fe086b5280d702c1e3650ebfb148cd4400c3c0d52ae5424d79d0e667e5b9ed7ef0d8fbb6a71c339ae2138dd568908f9451039c876
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.16.0](https://github.com/OneSignal/onesignal-ruby-api/compare/v5.15.0...v5.16.0) (2026-09-09)
4
+
5
+ ### Features
6
+
7
+ * add v5.16.0 package updates ([9a42499](https://github.com/OneSignal/onesignal-ruby-api/commit/9a4249909ed463768b54175a70c5d0e4edf66af4))
8
+ * add v5.16.0 package updates ([#131](https://github.com/OneSignal/onesignal-ruby-api/issues/131)) ([bd77ccc](https://github.com/OneSignal/onesignal-ruby-api/commit/bd77cccc3f4d95dabaa99cc5a5d4d35f690666b4)), closes [OneSignal/api-client-libraries#464](https://github.com/OneSignal/api-client-libraries/issues/464) [OneSignal/api-client-libraries#465](https://github.com/OneSignal/api-client-libraries/issues/465)
9
+
3
10
  ## [5.15.0](https://github.com/OneSignal/onesignal-ruby-api/compare/v5.14.0...v5.15.0) (2026-08-31)
4
11
 
5
12
  ### Features
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- onesignal (5.16.0)
4
+ onesignal (5.17.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -17,7 +17,7 @@ GEM
17
17
  ffi (>= 1.15.0)
18
18
  logger
19
19
  ffi (1.17.4-x86_64-linux-gnu)
20
- io-console (0.9.2)
20
+ io-console (0.9.4)
21
21
  jaro_winkler (1.5.6)
22
22
  logger (1.7.0)
23
23
  method_source (1.1.0)
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.16.0
10
- - Package version: 5.16.0
9
+ - API version: 5.17.0
10
+ - Package version: 5.17.0
11
11
 
12
12
  ## Installation
13
13
 
14
14
  Add to your `Gemfile`:
15
15
 
16
16
  ```ruby
17
- gem 'onesignal', '~> 5.16.0'
17
+ gem 'onesignal', '~> 5.17.0'
18
18
  ```
19
19
 
20
20
  Then run `bundle install`.
data/docs/DefaultApi.md CHANGED
@@ -24,6 +24,7 @@ All URIs are relative to *https://api.onesignal.com*
24
24
  | [**delete_subscription**](DefaultApi.md#delete_subscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} | |
25
25
  | [**delete_template**](DefaultApi.md#delete_template) | **DELETE** /templates/{template_id} | Delete template |
26
26
  | [**delete_user**](DefaultApi.md#delete_user) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} | |
27
+ | [**duplicate_journey**](DefaultApi.md#duplicate_journey) | **POST** /apps/{app_id}/journeys/{journey_id}/duplicate | Duplicate journey |
27
28
  | [**estimate_notification_recipients**](DefaultApi.md#estimate_notification_recipients) | **POST** /notifications/count-unsaved | Estimate notification recipients |
28
29
  | [**export_events**](DefaultApi.md#export_events) | **POST** /notifications/{notification_id}/export_events | Export CSV of Events |
29
30
  | [**export_subscriptions**](DefaultApi.md#export_subscriptions) | **POST** /players/csv_export?app_id={app_id} | Export CSV of Subscriptions |
@@ -1448,7 +1449,7 @@ end
1448
1449
 
1449
1450
  api_instance = OneSignal::DefaultApi.new
1450
1451
  app_id = 'YOUR_APP_ID' # String | The OneSignal App ID for your app. Available in Keys & IDs.
1451
- segment_id = 'd6c5a3e1-9f17-44a1-9d10-7c0e4a2b1c8e' # String | The segment_id can be found in the URL of the segment when viewing it in the dashboard.
1452
+ segment_id = 'd6c5a3e1-9f17-44a1-9d10-7c0e4a2b1c8e' # String | The segment's unique identifier. In the dashboard, go to Audience > Segments, open the segment's options menu, and select Copy segment ID. You can also get it from the View Segments API or the segment's URL in the dashboard.
1452
1453
 
1453
1454
  begin
1454
1455
  # Delete Segment
@@ -1489,7 +1490,7 @@ end
1489
1490
  | Name | Type | Description | Notes |
1490
1491
  | ---- | ---- | ----------- | ----- |
1491
1492
  | **app_id** | **String** | The OneSignal App ID for your app. Available in Keys & IDs. | |
1492
- | **segment_id** | **String** | The segment_id can be found in the URL of the segment when viewing it in the dashboard. | |
1493
+ | **segment_id** | **String** | The segment's unique identifier. In the dashboard, go to Audience > Segments, open the segment's options menu, and select Copy segment ID. You can also get it from the View Segments API or the segment's URL in the dashboard. | |
1493
1494
 
1494
1495
  ### Return type
1495
1496
 
@@ -1739,6 +1740,88 @@ nil (empty response body)
1739
1740
  - **Accept**: application/json
1740
1741
 
1741
1742
 
1743
+ ## duplicate_journey
1744
+
1745
+ > <Journey> duplicate_journey(app_id, journey_id, opts)
1746
+
1747
+ Duplicate journey
1748
+
1749
+ The Journeys API is in beta. Endpoints and response fields can still change. Copy an existing journey into a new draft. The source does not change. The copy is always a draft, and started_at and archived_at are null. If you omit the body, or omit overrides, the copy keeps the source description, audience, nodes, early_exit, and reentry_rules. The copy takes the source name plus \" (Copy)\". The copy does not keep schedule. Send schedule under overrides to set it. Server-controlled fields are rejected with 400. The authenticated App API key must have permission to create journeys.
1750
+
1751
+ ### Examples
1752
+
1753
+ ```ruby
1754
+ require 'onesignal'
1755
+ # setup authorization
1756
+ OneSignal.configure do |config|
1757
+ # Configure Bearer authorization: rest_api_key
1758
+ config.rest_api_key = 'YOUR_REST_API_KEY'
1759
+
1760
+ end
1761
+
1762
+ api_instance = OneSignal::DefaultApi.new
1763
+ app_id = 'YOUR_APP_ID' # String | Your OneSignal App ID in UUID v4 format.
1764
+ journey_id = 'YOUR_JOURNEY_ID' # String | UUID of the journey to copy.
1765
+ opts = {
1766
+ duplicate_journey_request: OneSignal::DuplicateJourneyRequest.new # DuplicateJourneyRequest |
1767
+ }
1768
+
1769
+ begin
1770
+ # Duplicate journey
1771
+ result = api_instance.duplicate_journey(app_id, journey_id, opts)
1772
+ p result
1773
+ rescue OneSignal::ApiError => e
1774
+ puts "Error when calling DefaultApi->duplicate_journey: #{e}"
1775
+ puts "Status Code: #{e.code}"
1776
+ # `e.error_messages` flattens any error-envelope shape to an Array<String>;
1777
+ # the raw body remains on `e.response_body`.
1778
+ puts "Error Messages: #{e.error_messages}"
1779
+ puts "Response Body: #{e.response_body}"
1780
+ end
1781
+ ```
1782
+
1783
+ #### Using the duplicate_journey_with_http_info variant
1784
+
1785
+ This returns an Array which contains the response data, status code and headers.
1786
+
1787
+ > <Array(<Journey>, Integer, Hash)> duplicate_journey_with_http_info(app_id, journey_id, opts)
1788
+
1789
+ ```ruby
1790
+ begin
1791
+ # Duplicate journey
1792
+ data, status_code, headers = api_instance.duplicate_journey_with_http_info(app_id, journey_id, opts)
1793
+ p status_code # => 2xx
1794
+ p headers # => { ... }
1795
+ p data # => <Journey>
1796
+ rescue OneSignal::ApiError => e
1797
+ puts "Error when calling DefaultApi->duplicate_journey_with_http_info: #{e}"
1798
+ puts "Status Code: #{e.code}"
1799
+ puts "Response Body: #{e.response_body}"
1800
+ end
1801
+ ```
1802
+
1803
+ ### Parameters
1804
+
1805
+ | Name | Type | Description | Notes |
1806
+ | ---- | ---- | ----------- | ----- |
1807
+ | **app_id** | **String** | Your OneSignal App ID in UUID v4 format. | |
1808
+ | **journey_id** | **String** | UUID of the journey to copy. | |
1809
+ | **duplicate_journey_request** | [**DuplicateJourneyRequest**](DuplicateJourneyRequest.md) | | [optional] |
1810
+
1811
+ ### Return type
1812
+
1813
+ [**Journey**](Journey.md)
1814
+
1815
+ ### Authorization
1816
+
1817
+ [rest_api_key](https://github.com/OneSignal/onesignal-ruby-api#configuration)
1818
+
1819
+ ### HTTP request headers
1820
+
1821
+ - **Content-Type**: application/json
1822
+ - **Accept**: application/json
1823
+
1824
+
1742
1825
  ## estimate_notification_recipients
1743
1826
 
1744
1827
  > <EstimateNotificationRecipientsSuccessResponse> estimate_notification_recipients(estimate_notification_recipients_request)
@@ -2707,7 +2790,7 @@ end
2707
2790
 
2708
2791
  api_instance = OneSignal::DefaultApi.new
2709
2792
  app_id = 'YOUR_APP_ID' # String | The OneSignal App ID for your app. Available in Keys & IDs.
2710
- segment_id = 'd6c5a3e1-9f17-44a1-9d10-7c0e4a2b1c8e' # String | The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard.
2793
+ segment_id = 'd6c5a3e1-9f17-44a1-9d10-7c0e4a2b1c8e' # String | The segment's unique identifier. In the dashboard, go to Audience > Segments, open the segment's options menu, and select Copy segment ID. You can also get it from the View Segments API or the segment's URL in the dashboard.
2711
2794
  opts = {
2712
2795
  include_segment_detail: true # Boolean | Set to true to include segment metadata and filters in the response.
2713
2796
  }
@@ -2751,7 +2834,7 @@ end
2751
2834
  | Name | Type | Description | Notes |
2752
2835
  | ---- | ---- | ----------- | ----- |
2753
2836
  | **app_id** | **String** | The OneSignal App ID for your app. Available in Keys &amp; IDs. | |
2754
- | **segment_id** | **String** | The segment&#39;s unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. | |
2837
+ | **segment_id** | **String** | The segment&#39;s unique identifier. In the dashboard, go to Audience &gt; Segments, open the segment&#39;s options menu, and select Copy segment ID. You can also get it from the View Segments API or the segment&#39;s URL in the dashboard. | |
2755
2838
  | **include_segment_detail** | **Boolean** | Set to true to include segment metadata and filters in the response. | [optional] |
2756
2839
 
2757
2840
  ### Return type
@@ -3769,7 +3852,7 @@ end
3769
3852
 
3770
3853
  api_instance = OneSignal::DefaultApi.new
3771
3854
  app_id = 'YOUR_APP_ID' # String | The OneSignal App ID for your app. Available in Keys & IDs.
3772
- segment_id = 'd6c5a3e1-9f17-44a1-9d10-7c0e4a2b1c8e' # String | The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard.
3855
+ segment_id = 'd6c5a3e1-9f17-44a1-9d10-7c0e4a2b1c8e' # String | The segment's unique identifier. In the dashboard, go to Audience > Segments, open the segment's options menu, and select Copy segment ID. You can also get it from the View Segments API or the segment's URL in the dashboard.
3773
3856
  opts = {
3774
3857
  update_segment_request: OneSignal::UpdateSegmentRequest.new({name: 'name_example'}) # UpdateSegmentRequest |
3775
3858
  }
@@ -3813,7 +3896,7 @@ end
3813
3896
  | Name | Type | Description | Notes |
3814
3897
  | ---- | ---- | ----------- | ----- |
3815
3898
  | **app_id** | **String** | The OneSignal App ID for your app. Available in Keys &amp; IDs. | |
3816
- | **segment_id** | **String** | The segment&#39;s unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. | |
3899
+ | **segment_id** | **String** | The segment&#39;s unique identifier. In the dashboard, go to Audience &gt; Segments, open the segment&#39;s options menu, and select Copy segment ID. You can also get it from the View Segments API or the segment&#39;s URL in the dashboard. | |
3817
3900
  | **update_segment_request** | [**UpdateSegmentRequest**](UpdateSegmentRequest.md) | | [optional] |
3818
3901
 
3819
3902
  ### Return type
@@ -0,0 +1,30 @@
1
+ # OneSignal::DuplicateJourneyOverrides
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | Name for the copy, up to 300 characters. If you omit it, the copy takes the name of the source plus \&quot; (Copy)\&quot;. | [optional] |
8
+ | **description** | **String** | Optional journey description, up to 1024 characters. If you omit it, the copy takes the description of the source. Send null to clear it. | [optional] |
9
+ | **audience** | [**JourneyAudience**](JourneyAudience.md) | | [optional] |
10
+ | **early_exit** | [**JourneyEarlyExit**](JourneyEarlyExit.md) | | [optional] |
11
+ | **reentry_rules** | [**JourneyReentryRules**](JourneyReentryRules.md) | | [optional] |
12
+ | **schedule** | [**JourneySchedule**](JourneySchedule.md) | | [optional] |
13
+ | **nodes** | [**Array&lt;JourneyNode&gt;**](JourneyNode.md) | Full ordered list of nodes. Replaces the copied graph. Server-assigned id fields are rejected. | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'onesignal'
19
+
20
+ instance = OneSignal::DuplicateJourneyOverrides.new(
21
+ name: nil,
22
+ description: nil,
23
+ audience: nil,
24
+ early_exit: nil,
25
+ reentry_rules: nil,
26
+ schedule: nil,
27
+ nodes: nil
28
+ )
29
+ ```
30
+
@@ -0,0 +1,18 @@
1
+ # OneSignal::DuplicateJourneyRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **overrides** | [**DuplicateJourneyOverrides**](DuplicateJourneyOverrides.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'onesignal'
13
+
14
+ instance = OneSignal::DuplicateJourneyRequest.new(
15
+ overrides: nil
16
+ )
17
+ ```
18
+
data/docs/JourneyNode.md CHANGED
@@ -7,7 +7,7 @@
7
7
  | **id** | **String** | Server-assigned node UUID. Returned on reads. Required on update to keep an existing node. Rejected on create with a 400 validation error. | [optional] |
8
8
  | **kind** | **String** | Node kind. Selects which other fields apply. | |
9
9
  | **client_node_id** | **String** | Optional client-assigned identifier, unique within the journey. Use it to reference this node from elsewhere in the same request. Persisted and returned on reads. | [optional] |
10
- | **annotation** | **String** | Optional free-text label, up to 255 characters. Stored and returned as-is with no effect on journey behavior. | [optional] |
10
+ | **annotation** | **String** | Optional free-text label, up to 1024 characters. Stored and returned as-is with no effect on journey behavior. | [optional] |
11
11
  | **duration_seconds** | **Integer** | wait nodes: seconds to hold the user. Minimum 60, maximum 31556952 (1 year). | [optional] |
12
12
  | **relative_to** | **String** | time_window nodes: schedule_in_timezone uses the configured windows; last_active_time holds relative to the user&#39;s last active time. | [optional] |
13
13
  | **windows** | [**Array&lt;JourneyTimeWindow&gt;**](JourneyTimeWindow.md) | time_window nodes: one or more time windows. A window with no day_of_week applies to every day. Required when relative_to is schedule_in_timezone; omit when it is last_active_time. | [optional] |
@@ -19,7 +19,7 @@
19
19
  | **webhook_id** | **String** | send_webhook nodes: UUID of the webhook to send. | [optional] |
20
20
  | **assignments** | **Hash&lt;String, String&gt;** | tag nodes: tag key-value pairs to assign. An empty string value removes the tag. Keys are limited to 255 characters and values to 1024. | [optional] |
21
21
  | **randomize_on_entry** | **Boolean** | split_range nodes: when true, assigns each user to a branch at random on entry. Defaults to false. | [optional] |
22
- | **branches** | [**Array&lt;JourneyBranch&gt;**](JourneyBranch.md) | Branching nodes: nested branches. split_range requires 2-20 weighted branches that sum to 100. yes_no requires exactly 2 branches. wait_until requires 1-10 condition branches. | [optional] |
22
+ | **branches** | [**Array&lt;JourneyBranch&gt;**](JourneyBranch.md) | Branching nodes: nested branches. split_range requires 2-25 weighted branches that sum to 100. yes_no requires exactly 2 branches. wait_until requires 1-25 condition branches. | [optional] |
23
23
  | **expiration** | [**JourneyWaitUntilExpiration**](JourneyWaitUntilExpiration.md) | | [optional] |
24
24
 
25
25
  ## Example
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **client_node_id** | **String** | Optional client-assigned identifier, unique within the journey. Use it to reference this node from elsewhere in the same request. Persisted and returned on reads. | [optional] |
8
- | **annotation** | **String** | Optional free-text label, up to 255 characters. Stored and returned as-is with no effect on journey behavior. | [optional] |
8
+ | **annotation** | **String** | Optional free-text label, up to 1024 characters. Stored and returned as-is with no effect on journey behavior. | [optional] |
9
9
  | **duration_seconds** | **Integer** | wait nodes: seconds to hold the user. Minimum 60, maximum 31556952 (1 year). | [optional] |
10
10
  | **relative_to** | **String** | time_window nodes: schedule_in_timezone uses the configured windows; last_active_time holds relative to the user&#39;s last active time. | [optional] |
11
11
  | **windows** | [**Array&lt;JourneyTimeWindow&gt;**](JourneyTimeWindow.md) | time_window nodes: one or more time windows. A window with no day_of_week applies to every day. Required when relative_to is schedule_in_timezone; omit when it is last_active_time. | [optional] |
@@ -17,7 +17,7 @@
17
17
  | **webhook_id** | **String** | send_webhook nodes: UUID of the webhook to send. | [optional] |
18
18
  | **assignments** | **Hash&lt;String, String&gt;** | tag nodes: tag key-value pairs to assign. An empty string value removes the tag. Keys are limited to 255 characters and values to 1024. | [optional] |
19
19
  | **randomize_on_entry** | **Boolean** | split_range nodes: when true, assigns each user to a branch at random on entry. Defaults to false. | [optional] |
20
- | **branches** | [**Array&lt;JourneyBranch&gt;**](JourneyBranch.md) | Branching nodes: nested branches. split_range requires 2-20 weighted branches that sum to 100. yes_no requires exactly 2 branches. wait_until requires 1-10 condition branches. | [optional] |
20
+ | **branches** | [**Array&lt;JourneyBranch&gt;**](JourneyBranch.md) | Branching nodes: nested branches. split_range requires 2-25 weighted branches that sum to 100. yes_no requires exactly 2 branches. wait_until requires 1-25 condition branches. | [optional] |
21
21
  | **expiration** | [**JourneyWaitUntilExpiration**](JourneyWaitUntilExpiration.md) | | [optional] |
22
22
  | **concurrency_key** | **String** | Optional optimistic-concurrency token. Pass the concurrency_key from a prior fetch to reject the update with 409 if the journey changed. Omit to skip the check. It is not merged onto the node. | [optional] |
23
23
 
@@ -1203,7 +1203,7 @@ module OneSignal
1203
1203
  # Delete Segment
1204
1204
  # Delete a segment (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard.
1205
1205
  # @param app_id [String] The OneSignal App ID for your app. Available in Keys &amp; IDs.
1206
- # @param segment_id [String] The segment_id can be found in the URL of the segment when viewing it in the dashboard.
1206
+ # @param segment_id [String] The segment&#39;s unique identifier. In the dashboard, go to Audience &gt; Segments, open the segment&#39;s options menu, and select Copy segment ID. You can also get it from the View Segments API or the segment&#39;s URL in the dashboard.
1207
1207
  # @param [Hash] opts the optional parameters
1208
1208
  # @return [GenericSuccessBoolResponse]
1209
1209
  def delete_segment(app_id, segment_id, opts = {})
@@ -1214,7 +1214,7 @@ module OneSignal
1214
1214
  # Delete Segment
1215
1215
  # Delete a segment (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard.
1216
1216
  # @param app_id [String] The OneSignal App ID for your app. Available in Keys &amp; IDs.
1217
- # @param segment_id [String] The segment_id can be found in the URL of the segment when viewing it in the dashboard.
1217
+ # @param segment_id [String] The segment&#39;s unique identifier. In the dashboard, go to Audience &gt; Segments, open the segment&#39;s options menu, and select Copy segment ID. You can also get it from the View Segments API or the segment&#39;s URL in the dashboard.
1218
1218
  # @param [Hash] opts the optional parameters
1219
1219
  # @return [Array<(GenericSuccessBoolResponse, Integer, Hash)>] GenericSuccessBoolResponse data, response status code and response headers
1220
1220
  def delete_segment_with_http_info(app_id, segment_id, opts = {})
@@ -1479,6 +1479,82 @@ module OneSignal
1479
1479
  return data, status_code, headers
1480
1480
  end
1481
1481
 
1482
+ # Duplicate journey
1483
+ # The Journeys API is in beta. Endpoints and response fields can still change. Copy an existing journey into a new draft. The source does not change. The copy is always a draft, and started_at and archived_at are null. If you omit the body, or omit overrides, the copy keeps the source description, audience, nodes, early_exit, and reentry_rules. The copy takes the source name plus \" (Copy)\". The copy does not keep schedule. Send schedule under overrides to set it. Server-controlled fields are rejected with 400. The authenticated App API key must have permission to create journeys.
1484
+ # @param app_id [String] Your OneSignal App ID in UUID v4 format.
1485
+ # @param journey_id [String] UUID of the journey to copy.
1486
+ # @param [Hash] opts the optional parameters
1487
+ # @option opts [DuplicateJourneyRequest] :duplicate_journey_request
1488
+ # @return [Journey]
1489
+ def duplicate_journey(app_id, journey_id, opts = {})
1490
+ data, _status_code, _headers = duplicate_journey_with_http_info(app_id, journey_id, opts)
1491
+ data
1492
+ end
1493
+
1494
+ # Duplicate journey
1495
+ # The Journeys API is in beta. Endpoints and response fields can still change. Copy an existing journey into a new draft. The source does not change. The copy is always a draft, and started_at and archived_at are null. If you omit the body, or omit overrides, the copy keeps the source description, audience, nodes, early_exit, and reentry_rules. The copy takes the source name plus \&quot; (Copy)\&quot;. The copy does not keep schedule. Send schedule under overrides to set it. Server-controlled fields are rejected with 400. The authenticated App API key must have permission to create journeys.
1496
+ # @param app_id [String] Your OneSignal App ID in UUID v4 format.
1497
+ # @param journey_id [String] UUID of the journey to copy.
1498
+ # @param [Hash] opts the optional parameters
1499
+ # @option opts [DuplicateJourneyRequest] :duplicate_journey_request
1500
+ # @return [Array<(Journey, Integer, Hash)>] Journey data, response status code and response headers
1501
+ def duplicate_journey_with_http_info(app_id, journey_id, opts = {})
1502
+ if @api_client.config.debugging
1503
+ @api_client.config.logger.debug 'Calling API: DefaultApi.duplicate_journey ...'
1504
+ end
1505
+ # verify the required parameter 'app_id' is set
1506
+ if @api_client.config.client_side_validation && app_id.nil?
1507
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling DefaultApi.duplicate_journey"
1508
+ end
1509
+ # verify the required parameter 'journey_id' is set
1510
+ if @api_client.config.client_side_validation && journey_id.nil?
1511
+ fail ArgumentError, "Missing the required parameter 'journey_id' when calling DefaultApi.duplicate_journey"
1512
+ end
1513
+ # resource path
1514
+ local_var_path = '/apps/{app_id}/journeys/{journey_id}/duplicate'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'journey_id' + '}', CGI.escape(journey_id.to_s))
1515
+
1516
+ # query parameters
1517
+ query_params = opts[:query_params] || {}
1518
+
1519
+ # header parameters
1520
+ header_params = opts[:header_params] || {}
1521
+ # HTTP header 'Accept' (if needed)
1522
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1523
+ # HTTP header 'Content-Type'
1524
+ content_type = @api_client.select_header_content_type(['application/json'])
1525
+ if !content_type.nil?
1526
+ header_params['Content-Type'] = content_type
1527
+ end
1528
+
1529
+ # form parameters
1530
+ form_params = opts[:form_params] || {}
1531
+
1532
+ # http body (model)
1533
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'duplicate_journey_request'])
1534
+
1535
+ # return_type
1536
+ return_type = opts[:debug_return_type] || 'Journey'
1537
+
1538
+ # auth_names
1539
+ auth_names = opts[:debug_auth_names] || ['rest_api_key']
1540
+
1541
+ new_options = opts.merge(
1542
+ :operation => :"DefaultApi.duplicate_journey",
1543
+ :header_params => header_params,
1544
+ :query_params => query_params,
1545
+ :form_params => form_params,
1546
+ :body => post_body,
1547
+ :auth_names => auth_names,
1548
+ :return_type => return_type
1549
+ )
1550
+
1551
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1552
+ if @api_client.config.debugging
1553
+ @api_client.config.logger.debug "API called: DefaultApi#duplicate_journey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1554
+ end
1555
+ return data, status_code, headers
1556
+ end
1557
+
1482
1558
  # Estimate notification recipients
1483
1559
  # Returns the estimated number of recipients for a notification's targeting, without creating or sending anything. The returned `count` reflects the same audience-size estimate you would see under \"Choose your target audience\" when composing a message. It is based on the user targeting method you've set and the specific platforms the message is targeted to send to. This endpoint only supports a subset of targeting parameters: `included_segments` is required (its `\"All\"` shorthand targets every subscriber), and `excluded_segments`, `filters`, `include_aliases`, and `target_channel` narrow that audience further. Use `target_channel` to select platforms. `include_subscription_ids` and the other raw subscription id/token fields, and the individual `isIos` / `isAndroid` / etc. platform flags, are not supported. All other notification fields (content, delivery options, and so on) are accepted, but ignored.
1484
1560
  # @param estimate_notification_recipients_request [EstimateNotificationRecipientsRequest]
@@ -2319,7 +2395,7 @@ module OneSignal
2319
2395
  # View Segment
2320
2396
  # Retrieve details for a single segment by its ID, including subscriber count and optionally segment metadata and filters.
2321
2397
  # @param app_id [String] The OneSignal App ID for your app. Available in Keys &amp; IDs.
2322
- # @param segment_id [String] The segment&#39;s unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard.
2398
+ # @param segment_id [String] The segment&#39;s unique identifier. In the dashboard, go to Audience &gt; Segments, open the segment&#39;s options menu, and select Copy segment ID. You can also get it from the View Segments API or the segment&#39;s URL in the dashboard.
2323
2399
  # @param [Hash] opts the optional parameters
2324
2400
  # @option opts [Boolean] :include_segment_detail Set to true to include segment metadata and filters in the response.
2325
2401
  # @return [GetSegmentSuccessResponse]
@@ -2331,7 +2407,7 @@ module OneSignal
2331
2407
  # View Segment
2332
2408
  # Retrieve details for a single segment by its ID, including subscriber count and optionally segment metadata and filters.
2333
2409
  # @param app_id [String] The OneSignal App ID for your app. Available in Keys &amp; IDs.
2334
- # @param segment_id [String] The segment&#39;s unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard.
2410
+ # @param segment_id [String] The segment&#39;s unique identifier. In the dashboard, go to Audience &gt; Segments, open the segment&#39;s options menu, and select Copy segment ID. You can also get it from the View Segments API or the segment&#39;s URL in the dashboard.
2335
2411
  # @param [Hash] opts the optional parameters
2336
2412
  # @option opts [Boolean] :include_segment_detail Set to true to include segment metadata and filters in the response.
2337
2413
  # @return [Array<(GetSegmentSuccessResponse, Integer, Hash)>] GetSegmentSuccessResponse data, response status code and response headers
@@ -3360,7 +3436,7 @@ module OneSignal
3360
3436
  # Update Segment
3361
3437
  # Update an existing segment's name and/or filters. The name parameter is always required. When filters are provided, all existing filters are replaced with the new ones.
3362
3438
  # @param app_id [String] The OneSignal App ID for your app. Available in Keys &amp; IDs.
3363
- # @param segment_id [String] The segment&#39;s unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard.
3439
+ # @param segment_id [String] The segment&#39;s unique identifier. In the dashboard, go to Audience &gt; Segments, open the segment&#39;s options menu, and select Copy segment ID. You can also get it from the View Segments API or the segment&#39;s URL in the dashboard.
3364
3440
  # @param [Hash] opts the optional parameters
3365
3441
  # @option opts [UpdateSegmentRequest] :update_segment_request
3366
3442
  # @return [UpdateSegmentSuccessResponse]
@@ -3372,7 +3448,7 @@ module OneSignal
3372
3448
  # Update Segment
3373
3449
  # Update an existing segment&#39;s name and/or filters. The name parameter is always required. When filters are provided, all existing filters are replaced with the new ones.
3374
3450
  # @param app_id [String] The OneSignal App ID for your app. Available in Keys &amp; IDs.
3375
- # @param segment_id [String] The segment&#39;s unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard.
3451
+ # @param segment_id [String] The segment&#39;s unique identifier. In the dashboard, go to Audience &gt; Segments, open the segment&#39;s options menu, and select Copy segment ID. You can also get it from the View Segments API or the segment&#39;s URL in the dashboard.
3376
3452
  # @param [Hash] opts the optional parameters
3377
3453
  # @option opts [UpdateSegmentRequest] :update_segment_request
3378
3454
  # @return [Array<(UpdateSegmentSuccessResponse, Integer, Hash)>] UpdateSegmentSuccessResponse data, response status code and response headers
@@ -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.16.0'
92
+ opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-ruby, version=5.17.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] || {}