oursprivacy-ingest 1.17.0 → 1.19.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 982f6c0cde72164668cb677a4e4352180646096cbbeec238a0a47b2dcaed2d4f
4
- data.tar.gz: 16acc49bc63b4026719f9ea7fa8401146855a9676a4b4b8dedfc8261a6e36a21
3
+ metadata.gz: 9c5d65392b8fbf4e765f78ac8e7f4e1ed0006e99c3519c4e4b6fe60e041d5c92
4
+ data.tar.gz: 8c7da5bcf8ff87ba352e7d13b563945bafcff7b6263fc1abfc2e13996c6b2982
5
5
  SHA512:
6
- metadata.gz: d901242723604cc6c5ad1175b767909ef57916e192d68956eecd110cdda061a92d6479557fde84a7607ba1708cdbc99bb6ad3c57c4cbada050e6df004b345f2c
7
- data.tar.gz: c7d9df16cc14b257aaa97152db30bc93c4f894d1dc4a4e52646305b2e427c89486865185570b334b49eefdcfc2d5c576e6e5776e389733138e2390bad48025fa
6
+ metadata.gz: 8a97c7b21f0e6c935bfca56da5a3018cb7c75308819952a97c0e0809185d155f46385fec28ca097bd38db2f0104214d65714cbc72c4ce1432dcacb28fc6cfafe
7
+ data.tar.gz: 168f6ea5f416348947c5f909a315cd4328d11231cc929478fdeac1dfbdf2c80ee789e2437811ef05c19677e67090a7d0753dbd00545579c324e36c9c6665d247
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.19.0 (2026-09-14)
4
+
5
+ Full Changelog: [v1.18.0...v1.19.0](https://github.com/with-ours/ingest-sdk-ruby/compare/v1.18.0...v1.19.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** API update.
10
+ ## 1.18.0 (2026-09-11)
11
+
12
+ Full Changelog: [v1.17.0...v1.18.0](https://github.com/with-ours/ingest-sdk-ruby/compare/v1.17.0...v1.18.0)
13
+
14
+ ### Features
15
+
16
+ * **api:** API update.
3
17
  ## 1.17.0 (2026-08-21)
4
18
 
5
19
  Full Changelog: [v1.16.2...v1.17.0](https://github.com/with-ours/ingest-sdk-ruby/compare/v1.16.2...v1.17.0)
data/README.md CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  The Ours Privacy Ruby library provides convenient access to the Ours Privacy REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/with-ours/ingest-sdk-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.
4
4
 
5
- It is generated with [Stainless](https://www.stainless.com/).
6
-
7
5
  ## Documentation
8
6
 
9
7
  Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/oursprivacy-ingest).
@@ -17,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
17
15
  <!-- x-release-please-start-version -->
18
16
 
19
17
  ```ruby
20
- gem "oursprivacy-ingest", "~> 1.17.0"
18
+ gem "oursprivacy-ingest", "~> 1.19.0"
21
19
  ```
22
20
 
23
21
  <!-- x-release-please-end -->
@@ -4,20 +4,66 @@ module OursprivacyIngest
4
4
  module Models
5
5
  # @see OursprivacyIngest::Resources::Experiments#personalization
6
6
  class ExperimentPersonalizationResponse < OursprivacyIngest::Internal::Type::BaseModel
7
- # @!attribute personalizations
7
+ # @!attribute properties
8
+ # The visitor traits accumulated by your personalization property rules, keyed by
9
+ # property key. Values are always scalars — a string, number, or boolean, or null
10
+ # when the captured field was itself empty. Empty for a visitor who has not
11
+ # matched any rule yet. These same values are delivered to the visitor's browser
12
+ # and are readable by anyone who knows the visitor_id, so never accumulate
13
+ # secrets, credentials, PHI, or confidential data into a property.
8
14
  #
9
- # @return [Array<OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization>]
10
- required :personalizations,
11
- -> { OursprivacyIngest::Internal::Type::ArrayOf[OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization] }
15
+ # @return [Hash{Symbol=>String, Float, Boolean}]
16
+ required :properties,
17
+ -> { OursprivacyIngest::Internal::Type::HashOf[union: OursprivacyIngest::Models::ExperimentPersonalizationResponse::Property] }
12
18
 
13
19
  # @!attribute success
14
20
  #
15
21
  # @return [Boolean, OursprivacyIngest::Models::ExperimentPersonalizationResponse::Success]
16
22
  required :success, enum: -> { OursprivacyIngest::Models::ExperimentPersonalizationResponse::Success }
17
23
 
18
- # @!method initialize(personalizations:, success:)
19
- # @param personalizations [Array<OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization>]
24
+ # @!attribute personalizations
25
+ # @deprecated
26
+ #
27
+ # Deprecated legacy personalization assignments. Current API responses omit this
28
+ # field; use properties for accumulated personalization traits. Retained in the
29
+ # SDK for callers using older responses.
30
+ #
31
+ # @return [Array<OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization>, nil]
32
+ optional :personalizations,
33
+ -> { OursprivacyIngest::Internal::Type::ArrayOf[OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization] }
34
+
35
+ # @!method initialize(properties:, success:, personalizations: nil)
36
+ # Some parameter documentations has been truncated, see
37
+ # {OursprivacyIngest::Models::ExperimentPersonalizationResponse} for more details.
38
+ #
39
+ # @param properties [Hash{Symbol=>String, Float, Boolean}] The visitor traits accumulated by your personalization property rules, keyed by
40
+ #
20
41
  # @param success [Boolean, OursprivacyIngest::Models::ExperimentPersonalizationResponse::Success]
42
+ #
43
+ # @param personalizations [Array<OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization>] Deprecated legacy personalization assignments. Current API responses omit this f
44
+
45
+ module Property
46
+ extend OursprivacyIngest::Internal::Type::Union
47
+
48
+ variant String
49
+
50
+ variant Float
51
+
52
+ variant OursprivacyIngest::Internal::Type::Boolean
53
+
54
+ # @!method self.variants
55
+ # @return [Array(String, Float, Boolean)]
56
+ end
57
+
58
+ # @see OursprivacyIngest::Models::ExperimentPersonalizationResponse#success
59
+ module Success
60
+ extend OursprivacyIngest::Internal::Type::Enum
61
+
62
+ TRUE = true
63
+
64
+ # @!method self.values
65
+ # @return [Array<Boolean>]
66
+ end
21
67
 
22
68
  class Personalization < OursprivacyIngest::Internal::Type::BaseModel
23
69
  # @!attribute assigned_at
@@ -58,16 +104,6 @@ module OursprivacyIngest
58
104
  # @param experiment_name [String, nil]
59
105
  # @param variant_name [String, nil]
60
106
  end
61
-
62
- # @see OursprivacyIngest::Models::ExperimentPersonalizationResponse#success
63
- module Success
64
- extend OursprivacyIngest::Internal::Type::Enum
65
-
66
- TRUE = true
67
-
68
- # @!method self.values
69
- # @return [Array<Boolean>]
70
- end
71
107
  end
72
108
  end
73
109
  end
@@ -51,10 +51,10 @@ module OursprivacyIngest
51
51
  )
52
52
  end
53
53
 
54
- # Return the active personalization assignments for a visitor. Read-only and never
55
- # records an impression. Personalizations are populated by the event-driven rule
56
- # engine — until that ships, this endpoint returns an empty list for every
57
- # visitor, which is the correct fail-closed behavior (no false positives).
54
+ # Return the visitor traits accumulated by personalization property rules.
55
+ # Read-only and never records an impression. Use the properties to select
56
+ # personalized server-rendered copy or targeting; the browser experiment runtime
57
+ # receives the same bag at initialization.
58
58
  #
59
59
  # @overload personalization(token:, visitor_id:, request_options: {})
60
60
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OursprivacyIngest
4
- VERSION = "1.17.0"
4
+ VERSION = "1.19.0"
5
5
  end
@@ -11,14 +11,21 @@ module OursprivacyIngest
11
11
  )
12
12
  end
13
13
 
14
+ # The visitor traits accumulated by your personalization property rules, keyed by
15
+ # property key. Values are always scalars — a string, number, or boolean, or null
16
+ # when the captured field was itself empty. Empty for a visitor who has not
17
+ # matched any rule yet. These same values are delivered to the visitor's browser
18
+ # and are readable by anyone who knows the visitor_id, so never accumulate
19
+ # secrets, credentials, PHI, or confidential data into a property.
14
20
  sig do
15
21
  returns(
16
- T::Array[
17
- OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization
22
+ T::Hash[
23
+ Symbol,
24
+ OursprivacyIngest::Models::ExperimentPersonalizationResponse::Property::Variants
18
25
  ]
19
26
  )
20
27
  end
21
- attr_accessor :personalizations
28
+ attr_accessor :properties
22
29
 
23
30
  sig do
24
31
  returns(
@@ -27,34 +34,126 @@ module OursprivacyIngest
27
34
  end
28
35
  attr_accessor :success
29
36
 
37
+ # Deprecated legacy personalization assignments. Current API responses omit this
38
+ # field; use properties for accumulated personalization traits. Retained in the
39
+ # SDK for callers using older responses.
40
+ sig do
41
+ returns(
42
+ T.nilable(
43
+ T::Array[
44
+ OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization
45
+ ]
46
+ )
47
+ )
48
+ end
49
+ attr_reader :personalizations
50
+
30
51
  sig do
31
52
  params(
32
53
  personalizations:
33
54
  T::Array[
34
55
  OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization::OrHash
56
+ ]
57
+ ).void
58
+ end
59
+ attr_writer :personalizations
60
+
61
+ sig do
62
+ params(
63
+ properties:
64
+ T::Hash[
65
+ Symbol,
66
+ OursprivacyIngest::Models::ExperimentPersonalizationResponse::Property::Variants
35
67
  ],
36
68
  success:
37
- OursprivacyIngest::Models::ExperimentPersonalizationResponse::Success::OrBoolean
69
+ OursprivacyIngest::Models::ExperimentPersonalizationResponse::Success::OrBoolean,
70
+ personalizations:
71
+ T::Array[
72
+ OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization::OrHash
73
+ ]
38
74
  ).returns(T.attached_class)
39
75
  end
40
- def self.new(personalizations:, success:)
76
+ def self.new(
77
+ # The visitor traits accumulated by your personalization property rules, keyed by
78
+ # property key. Values are always scalars — a string, number, or boolean, or null
79
+ # when the captured field was itself empty. Empty for a visitor who has not
80
+ # matched any rule yet. These same values are delivered to the visitor's browser
81
+ # and are readable by anyone who knows the visitor_id, so never accumulate
82
+ # secrets, credentials, PHI, or confidential data into a property.
83
+ properties:,
84
+ success:,
85
+ # Deprecated legacy personalization assignments. Current API responses omit this
86
+ # field; use properties for accumulated personalization traits. Retained in the
87
+ # SDK for callers using older responses.
88
+ personalizations: nil
89
+ )
41
90
  end
42
91
 
43
92
  sig do
44
93
  override.returns(
45
94
  {
95
+ properties:
96
+ T::Hash[
97
+ Symbol,
98
+ OursprivacyIngest::Models::ExperimentPersonalizationResponse::Property::Variants
99
+ ],
100
+ success:
101
+ OursprivacyIngest::Models::ExperimentPersonalizationResponse::Success::TaggedBoolean,
46
102
  personalizations:
47
103
  T::Array[
48
104
  OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization
49
- ],
50
- success:
51
- OursprivacyIngest::Models::ExperimentPersonalizationResponse::Success::TaggedBoolean
105
+ ]
52
106
  }
53
107
  )
54
108
  end
55
109
  def to_hash
56
110
  end
57
111
 
112
+ module Property
113
+ extend OursprivacyIngest::Internal::Type::Union
114
+
115
+ Variants = T.type_alias { T.any(String, Float, T::Boolean) }
116
+
117
+ sig do
118
+ override.returns(
119
+ T::Array[
120
+ OursprivacyIngest::Models::ExperimentPersonalizationResponse::Property::Variants
121
+ ]
122
+ )
123
+ end
124
+ def self.variants
125
+ end
126
+ end
127
+
128
+ module Success
129
+ extend OursprivacyIngest::Internal::Type::Enum
130
+
131
+ TaggedBoolean =
132
+ T.type_alias do
133
+ T.all(
134
+ T::Boolean,
135
+ OursprivacyIngest::Models::ExperimentPersonalizationResponse::Success
136
+ )
137
+ end
138
+ OrBoolean = T.type_alias { T::Boolean }
139
+
140
+ TRUE =
141
+ T.let(
142
+ true,
143
+ OursprivacyIngest::Models::ExperimentPersonalizationResponse::Success::TaggedBoolean
144
+ )
145
+
146
+ sig do
147
+ override.returns(
148
+ T::Array[
149
+ OursprivacyIngest::Models::ExperimentPersonalizationResponse::Success::TaggedBoolean
150
+ ]
151
+ )
152
+ end
153
+ def self.values
154
+ end
155
+ end
156
+
58
157
  class Personalization < OursprivacyIngest::Internal::Type::BaseModel
59
158
  OrHash =
60
159
  T.type_alias do
@@ -117,35 +216,6 @@ module OursprivacyIngest
117
216
  def to_hash
118
217
  end
119
218
  end
120
-
121
- module Success
122
- extend OursprivacyIngest::Internal::Type::Enum
123
-
124
- TaggedBoolean =
125
- T.type_alias do
126
- T.all(
127
- T::Boolean,
128
- OursprivacyIngest::Models::ExperimentPersonalizationResponse::Success
129
- )
130
- end
131
- OrBoolean = T.type_alias { T::Boolean }
132
-
133
- TRUE =
134
- T.let(
135
- true,
136
- OursprivacyIngest::Models::ExperimentPersonalizationResponse::Success::TaggedBoolean
137
- )
138
-
139
- sig do
140
- override.returns(
141
- T::Array[
142
- OursprivacyIngest::Models::ExperimentPersonalizationResponse::Success::TaggedBoolean
143
- ]
144
- )
145
- end
146
- def self.values
147
- end
148
- end
149
219
  end
150
220
  end
151
221
  end
@@ -45,10 +45,10 @@ module OursprivacyIngest
45
45
  )
46
46
  end
47
47
 
48
- # Return the active personalization assignments for a visitor. Read-only and never
49
- # records an impression. Personalizations are populated by the event-driven rule
50
- # engine — until that ships, this endpoint returns an empty list for every
51
- # visitor, which is the correct fail-closed behavior (no false positives).
48
+ # Return the visitor traits accumulated by personalization property rules.
49
+ # Read-only and never records an impression. Use the properties to select
50
+ # personalized server-rendered copy or targeting; the browser experiment runtime
51
+ # receives the same bag at initialization.
52
52
  sig do
53
53
  params(
54
54
  token: String,
@@ -2,25 +2,52 @@ module OursprivacyIngest
2
2
  module Models
3
3
  type experiment_personalization_response =
4
4
  {
5
- personalizations: ::Array[OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization],
6
- success: OursprivacyIngest::Models::ExperimentPersonalizationResponse::success
5
+ properties: ::Hash[Symbol, OursprivacyIngest::Models::ExperimentPersonalizationResponse::property],
6
+ success: OursprivacyIngest::Models::ExperimentPersonalizationResponse::success,
7
+ personalizations: ::Array[OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization]
7
8
  }
8
9
 
9
10
  class ExperimentPersonalizationResponse < OursprivacyIngest::Internal::Type::BaseModel
10
- attr_accessor personalizations: ::Array[OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization]
11
+ attr_accessor properties: ::Hash[Symbol, OursprivacyIngest::Models::ExperimentPersonalizationResponse::property]
11
12
 
12
13
  attr_accessor success: OursprivacyIngest::Models::ExperimentPersonalizationResponse::success
13
14
 
15
+ attr_reader personalizations: ::Array[OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization]?
16
+
17
+ def personalizations=: (
18
+ ::Array[OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization]
19
+ ) -> ::Array[OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization]
20
+
14
21
  def initialize: (
15
- personalizations: ::Array[OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization],
16
- success: OursprivacyIngest::Models::ExperimentPersonalizationResponse::success
22
+ properties: ::Hash[Symbol, OursprivacyIngest::Models::ExperimentPersonalizationResponse::property],
23
+ success: OursprivacyIngest::Models::ExperimentPersonalizationResponse::success,
24
+ ?personalizations: ::Array[OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization]
17
25
  ) -> void
18
26
 
19
27
  def to_hash: -> {
20
- personalizations: ::Array[OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization],
21
- success: OursprivacyIngest::Models::ExperimentPersonalizationResponse::success
28
+ properties: ::Hash[Symbol, OursprivacyIngest::Models::ExperimentPersonalizationResponse::property],
29
+ success: OursprivacyIngest::Models::ExperimentPersonalizationResponse::success,
30
+ personalizations: ::Array[OursprivacyIngest::Models::ExperimentPersonalizationResponse::Personalization]
22
31
  }
23
32
 
33
+ type property = String | Float | bool
34
+
35
+ module Property
36
+ extend OursprivacyIngest::Internal::Type::Union
37
+
38
+ def self?.variants: -> ::Array[OursprivacyIngest::Models::ExperimentPersonalizationResponse::property]
39
+ end
40
+
41
+ type success = true
42
+
43
+ module Success
44
+ extend OursprivacyIngest::Internal::Type::Enum
45
+
46
+ TRUE: true
47
+
48
+ def self?.values: -> ::Array[OursprivacyIngest::Models::ExperimentPersonalizationResponse::success]
49
+ end
50
+
24
51
  type personalization =
25
52
  {
26
53
  assigned_at: Float,
@@ -62,16 +89,6 @@ module OursprivacyIngest
62
89
  variant_name: String?
63
90
  }
64
91
  end
65
-
66
- type success = true
67
-
68
- module Success
69
- extend OursprivacyIngest::Internal::Type::Enum
70
-
71
- TRUE: true
72
-
73
- def self?.values: -> ::Array[OursprivacyIngest::Models::ExperimentPersonalizationResponse::success]
74
- end
75
92
  end
76
93
  end
77
94
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oursprivacy-ingest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.0
4
+ version: 1.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ours Privacy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-25 00:00:00.000000000 Z
11
+ date: 2026-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi