oursprivacy-ingest 1.20.0 → 1.22.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 (27) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/oursprivacy_ingest/internal/type/array_of.rb +1 -1
  5. data/lib/oursprivacy_ingest/internal/type/hash_of.rb +1 -1
  6. data/lib/oursprivacy_ingest/internal/type/union.rb +8 -9
  7. data/lib/oursprivacy_ingest/models/batch_create_params.rb +1331 -171
  8. data/lib/oursprivacy_ingest/models/experiment_personalization_response.rb +3 -3
  9. data/lib/oursprivacy_ingest/models/track_event_params.rb +1319 -172
  10. data/lib/oursprivacy_ingest/models/visitor_upsert_params.rb +1029 -166
  11. data/lib/oursprivacy_ingest/resources/batch.rb +4 -1
  12. data/lib/oursprivacy_ingest/resources/track.rb +2 -2
  13. data/lib/oursprivacy_ingest/resources/visitor.rb +1 -1
  14. data/lib/oursprivacy_ingest/version.rb +1 -1
  15. data/rbi/oursprivacy_ingest/models/batch_create_params.rbi +2207 -157
  16. data/rbi/oursprivacy_ingest/models/experiment_personalization_response.rbi +10 -4
  17. data/rbi/oursprivacy_ingest/models/track_event_params.rbi +2210 -157
  18. data/rbi/oursprivacy_ingest/models/visitor_upsert_params.rbi +1676 -148
  19. data/rbi/oursprivacy_ingest/resources/batch.rbi +2 -1
  20. data/rbi/oursprivacy_ingest/resources/track.rbi +27 -8
  21. data/rbi/oursprivacy_ingest/resources/visitor.rbi +8 -4
  22. data/sig/oursprivacy_ingest/models/batch_create_params.rbs +561 -28
  23. data/sig/oursprivacy_ingest/models/experiment_personalization_response.rbs +5 -5
  24. data/sig/oursprivacy_ingest/models/track_event_params.rbs +548 -28
  25. data/sig/oursprivacy_ingest/models/visitor_upsert_params.rbs +397 -24
  26. data/sig/oursprivacy_ingest/resources/track.rbs +1 -1
  27. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 339521757ce7143715d8ba15b4bd6ca9e58b4af951d2093b0b069ee0f28aee31
4
- data.tar.gz: 56b08685191af7d24663f35cf4769d5bc1910ef7eabd98b88e6d7340d126d159
3
+ metadata.gz: 7488aaab80fa12389e9b33c1e0143923967b3c37366b06d5d669df5e22d39a29
4
+ data.tar.gz: fcd662a07eb608eec5ed43cdf7bdcff15cdcfe0933dbd03cfea929afb548f2e8
5
5
  SHA512:
6
- metadata.gz: d5d59c9d1ff7a93201ad6e1afb93ee9f12e008803887d4b7988077ce57c58a2f8c7ffea47839469e57c77f0a81bbafcc68150818da3c37687db6f8118d26b206
7
- data.tar.gz: e22017a3346aab0c6b497b93cc3e1da611d2f23134f9367cdbdeb235c30ae610d6b8626d3ad13bcf1f1ecf6fe46287af4962cae46baa3ddfab7190807b080e26
6
+ metadata.gz: 508a6f8579046c565dabe3db297b07ef743ff3354115d03a4574eb99036565a48d38081de48f3b51fa7fd729cd4f674650c6b646d05a8f5fb7e4da0b6b030ad2
7
+ data.tar.gz: fc51e9e14c9f326175f7573a7429e9d0c1ed41cf1fa66ecff9fe3161dfeb3197e897193bc6eec5a08deec64724b8fdcb2465f57acb23f273039c71f51dc18da9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.22.0 (2026-10-16)
4
+
5
+ Full Changelog: [v1.21.0...v1.22.0](https://github.com/with-ours/ingest-sdk-ruby/compare/v1.21.0...v1.22.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** API update.
10
+ ## 1.21.0 (2026-09-30)
11
+
12
+ Full Changelog: [v1.20.0...v1.21.0](https://github.com/with-ours/ingest-sdk-ruby/compare/v1.20.0...v1.21.0)
13
+
14
+ ### Features
15
+
16
+ * **api:** API update.
3
17
  ## 1.20.0 (2026-09-23)
4
18
 
5
19
  Full Changelog: [v1.19.0...v1.20.0](https://github.com/with-ours/ingest-sdk-ruby/compare/v1.19.0...v1.20.0)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "oursprivacy-ingest", "~> 1.20.0"
18
+ gem "oursprivacy-ingest", "~> 1.22.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -149,7 +149,7 @@ module OursprivacyIngest
149
149
  def initialize(type_info, spec = {})
150
150
  @item_type_fn = OursprivacyIngest::Internal::Type::Converter.type_info(type_info || spec)
151
151
  @meta = OursprivacyIngest::Internal::Type::Converter.meta_info(type_info, spec)
152
- @nilable = spec.fetch(:nil?, false)
152
+ @nilable = spec.fetch(:nil?) { type_info.is_a?(Hash) && type_info.fetch(:nil?, false) }
153
153
  end
154
154
 
155
155
  # @api private
@@ -169,7 +169,7 @@ module OursprivacyIngest
169
169
  def initialize(type_info, spec = {})
170
170
  @item_type_fn = OursprivacyIngest::Internal::Type::Converter.type_info(type_info || spec)
171
171
  @meta = OursprivacyIngest::Internal::Type::Converter.meta_info(type_info, spec)
172
- @nilable = spec.fetch(:nil?, false)
172
+ @nilable = spec.fetch(:nil?) { type_info.is_a?(Hash) && type_info.fetch(:nil?, false) }
173
173
  end
174
174
 
175
175
  # @api private
@@ -159,17 +159,18 @@ module OursprivacyIngest
159
159
  alternatives = []
160
160
  known_variants.each do |_, variant_fn|
161
161
  target = variant_fn.call
162
- exact = state[:exactness] = {yes: 0, no: 0, maybe: 0}
163
- state[:branched] += 1
162
+ exact = {yes: 0, no: 0, maybe: 0}
163
+ branch_state = state.merge(exactness: exact, error: nil, branched: state[:branched] + 1)
164
164
 
165
- coerced = OursprivacyIngest::Internal::Type::Converter.coerce(target, value, state: state)
165
+ coerced = OursprivacyIngest::Internal::Type::Converter.coerce(target, value, state: branch_state)
166
+ state[:branched] = branch_state[:branched]
166
167
  yes, no, maybe = exact.values
167
168
  if (no + maybe).zero? || (!strictness && yes.positive?)
168
169
  exact.each { exactness[_1] += _2 }
169
- state[:exactness] = exactness
170
+ state[:error] ||= branch_state[:error]
170
171
  return coerced
171
172
  elsif maybe.positive?
172
- alternatives << [[-yes, -maybe, no], exact, coerced]
173
+ alternatives << [[-yes, -maybe, no], exact, coerced, branch_state[:error]]
173
174
  end
174
175
  end
175
176
 
@@ -178,13 +179,11 @@ module OursprivacyIngest
178
179
  exactness[:no] += 1
179
180
  state[:error] = ArgumentError.new("no matching variant for #{value.inspect}")
180
181
  value
181
- in [[_, exact, coerced], *]
182
+ in [[_, exact, coerced, error], *]
182
183
  exact.each { exactness[_1] += _2 }
184
+ state[:error] ||= error
183
185
  coerced
184
186
  end
185
- .tap { state[:exactness] = exactness }
186
- ensure
187
- state[:strictness] = strictness
188
187
  end
189
188
 
190
189
  # @api private