oursprivacy-ingest 2.0.1 → 2.2.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.
@@ -3,16 +3,16 @@
3
3
  module OursprivacyIngest
4
4
  module Resources
5
5
  class Track
6
- # Track events from your server. Include userId, externalId, email, or
6
+ # Track events from your server. Include visitorId, externalId, email, or
7
7
  # userProperties.phone_number to associate the event with an existing visitor.
8
- # Identity resolution runs in priority order: userId (direct, no lookup) →
8
+ # Identity resolution runs in priority order: visitorId (direct, no lookup) →
9
9
  # externalId → email → userProperties.phone_number. Each lookup runs only if
10
10
  # earlier identifiers did not resolve a visitor. Phone matching ignores common
11
11
  # formatting and an international + or 00 prefix, but does not infer a country
12
- # code. If you know both userId and externalId, send both. For top-level visitor
13
- # properties: null clears the existing value, while undefined, omitted fields, and
14
- # empty strings are ignored. For entries inside custom_properties: null,
15
- # undefined, and empty strings are all ignored (custom_properties use merge
12
+ # code. If you know both visitorId and externalId, send both. For top-level
13
+ # visitor properties: null clears the existing value, while undefined, omitted
14
+ # fields, and empty strings are ignored. For entries inside custom_properties:
15
+ # null, undefined, and empty strings are all ignored (custom_properties use merge
16
16
  # semantics). See https://docs.oursprivacy.com/docs/data-types for details and
17
17
  # common pitfalls.
18
18
  sig do
@@ -45,6 +45,7 @@ module OursprivacyIngest
45
45
  T.nilable(
46
46
  OursprivacyIngest::TrackEventParams::UserProperties::OrHash
47
47
  ),
48
+ visitor_id: T.nilable(String),
48
49
  request_options: OursprivacyIngest::RequestOptions::OrHash
49
50
  ).returns(OursprivacyIngest::Models::TrackEventResponse)
50
51
  end
@@ -65,7 +66,7 @@ module OursprivacyIngest
65
66
  # clients should send a string. Leading and trailing whitespace is removed before
66
67
  # validation.
67
68
  distinct_id: nil,
68
- # The email address of a user. When userId is absent and externalId does not
69
+ # The email address of a user. When visitorId is absent and externalId does not
69
70
  # resolve a visitor, we search your account for a visitor with this email. If no
70
71
  # match is found, we try userProperties.phone_number before creating a new
71
72
  # visitor. Leading and trailing whitespace is removed before validation.
@@ -77,11 +78,11 @@ module OursprivacyIngest
77
78
  # strings. After normalization, the serialized JSON must be shorter than 1,048,576
78
79
  # UTF-16 code units.
79
80
  event_properties: nil,
80
- # Your system's unique identifier for this user. When userId is absent, we search
81
- # your account for an existing visitor with this externalId. If no match is found,
82
- # we try email and then userProperties.phone_number before creating a new visitor.
83
- # If you also have the userId from cookies or local storage, send both — it
84
- # removes the lookup round-trip. Non-string input is converted to text before
81
+ # Your system's unique identifier for this user. When visitorId is absent, we
82
+ # search your account for an existing visitor with this externalId. If no match is
83
+ # found, we try email and then userProperties.phone_number before creating a new
84
+ # visitor. If you also have the visitorId from cookies or local storage, send both
85
+ # — it removes the lookup round-trip. Non-string input is converted to text before
85
86
  # validation; clients should send a string. Leading and trailing whitespace is
86
87
  # removed before validation.
87
88
  external_id: nil,
@@ -89,18 +90,27 @@ module OursprivacyIngest
89
90
  # identity resolution when the caller is a backend server rather than an end-user
90
91
  # browser.
91
92
  identity_context: nil,
92
- # The time at which the event occurred in milliseconds since UTC epoch. The time
93
- # must be in the past and within the last 7 days.
93
+ # The time at which the event occurred in milliseconds since UTC epoch. Times
94
+ # older than one year are recorded as exactly one year ago, and future times as
95
+ # now.
94
96
  time: nil,
95
97
  # The Ours Visitor ID stored in local storage and cookies on your web properties.
96
98
  # When present, this is used directly — no lookup by externalId, email, or phone
97
- # is performed. If you have both a userId and an externalId, send both so the
98
- # event is attached to the right visitor without any lookup overhead. Leading and
99
- # trailing whitespace is removed before validation.
99
+ # is performed. If you have both a visitorId and an externalId, send both so the
100
+ # event is attached to the right visitor without any lookup overhead. visitorId
101
+ # takes precedence over the deprecated userId alias. Leading and trailing
102
+ # whitespace is removed before validation.
100
103
  user_id: nil,
101
104
  # Properties to set on the visitor. (optional) You can also update these
102
105
  # properties via the identify endpoint.
103
106
  user_properties: nil,
107
+ # The Ours Visitor ID stored in local storage and cookies on your web properties.
108
+ # When present, this is used directly — no lookup by externalId, email, or phone
109
+ # is performed. If you have both a visitorId and an externalId, send both so the
110
+ # event is attached to the right visitor without any lookup overhead. visitorId
111
+ # takes precedence over the deprecated userId alias. Leading and trailing
112
+ # whitespace is removed before validation.
113
+ visitor_id: nil,
104
114
  request_options: {}
105
115
  )
106
116
  end
@@ -5,7 +5,7 @@ module OursprivacyIngest
5
5
  class Visitor
6
6
  # Set or update properties on an existing visitor, or create a new visitor if no
7
7
  # match is found. This fires a $identify event, making the call visible in the
8
- # event stream. Identity resolution runs in priority order: userId (direct, no
8
+ # event stream. Identity resolution runs in priority order: visitorId (direct, no
9
9
  # lookup) → externalId → email → userProperties.phone_number. Each lookup runs
10
10
  # only if earlier identifiers did not resolve a visitor. Phone matching ignores
11
11
  # common formatting and an international + or 00 prefix, but does not infer a
@@ -32,6 +32,7 @@ module OursprivacyIngest
32
32
  OursprivacyIngest::VisitorUpsertParams::IdentityContext::OrHash
33
33
  ),
34
34
  user_id: T.nilable(String),
35
+ visitor_id: T.nilable(String),
35
36
  request_options: OursprivacyIngest::RequestOptions::OrHash
36
37
  ).returns(OursprivacyIngest::Models::VisitorUpsertResponse)
37
38
  end
@@ -46,16 +47,16 @@ module OursprivacyIngest
46
47
  # These properties are used throughout the Ours app to pass known values onto
47
48
  # destinations
48
49
  default_properties: nil,
49
- # The email address of a user. When userId is absent and externalId does not
50
+ # The email address of a user. When visitorId is absent and externalId does not
50
51
  # resolve a visitor, we search your account for a visitor with this email. If no
51
52
  # match is found, we try userProperties.phone_number before creating a new
52
53
  # visitor. Leading and trailing whitespace is removed before validation.
53
54
  email: nil,
54
- # Your system's unique identifier for this user. When userId is absent, we search
55
- # your account for an existing visitor with this externalId. If no match is found,
56
- # we try email and then userProperties.phone_number before creating a new visitor.
57
- # If you also have the userId from cookies or local storage, send both — it
58
- # removes the lookup round-trip. Non-string input is converted to text before
55
+ # Your system's unique identifier for this user. When visitorId is absent, we
56
+ # search your account for an existing visitor with this externalId. If no match is
57
+ # found, we try email and then userProperties.phone_number before creating a new
58
+ # visitor. If you also have the visitorId from cookies or local storage, send both
59
+ # — it removes the lookup round-trip. Non-string input is converted to text before
59
60
  # validation; clients should send a string. Leading and trailing whitespace is
60
61
  # removed before validation.
61
62
  external_id: nil,
@@ -65,10 +66,18 @@ module OursprivacyIngest
65
66
  identity_context: nil,
66
67
  # The Ours Visitor ID stored in local storage and cookies on your web properties.
67
68
  # When present, this is used directly — no lookup by externalId, email, or phone
68
- # is performed. If you have both a userId and an externalId, send both so the
69
- # event is attached to the right visitor without any lookup overhead. Leading and
70
- # trailing whitespace is removed before validation.
69
+ # is performed. If you have both a visitorId and an externalId, send both so the
70
+ # event is attached to the right visitor without any lookup overhead. visitorId
71
+ # takes precedence over the deprecated userId alias. Leading and trailing
72
+ # whitespace is removed before validation.
71
73
  user_id: nil,
74
+ # The Ours Visitor ID stored in local storage and cookies on your web properties.
75
+ # When present, this is used directly — no lookup by externalId, email, or phone
76
+ # is performed. If you have both a visitorId and an externalId, send both so the
77
+ # event is attached to the right visitor without any lookup overhead. visitorId
78
+ # takes precedence over the deprecated userId alias. Leading and trailing
79
+ # whitespace is removed before validation.
80
+ visitor_id: nil,
72
81
  request_options: {}
73
82
  )
74
83
  end
@@ -45,6 +45,10 @@ module OursprivacyIngest
45
45
  -> top?
46
46
  } -> top?
47
47
 
48
+ SENSITIVE_NAMES: ::Array[String]
49
+
50
+ def self?.redact_sensitive: (top input) -> top
51
+
48
52
  RFC_3986_NOT_PCHARS: Regexp
49
53
 
50
54
  def self?.uri_origin: (URI::Generic uri) -> String
@@ -38,7 +38,8 @@ module OursprivacyIngest
38
38
  identity_context: OursprivacyIngest::BatchCreateParams::Event::IdentityContext?,
39
39
  time: Float?,
40
40
  user_id: String?,
41
- user_properties: OursprivacyIngest::BatchCreateParams::Event::UserProperties?
41
+ user_properties: OursprivacyIngest::BatchCreateParams::Event::UserProperties?,
42
+ visitor_id: String?
42
43
  }
43
44
 
44
45
  class Event < OursprivacyIngest::Internal::Type::BaseModel
@@ -62,6 +63,8 @@ module OursprivacyIngest
62
63
 
63
64
  attr_accessor user_properties: OursprivacyIngest::BatchCreateParams::Event::UserProperties?
64
65
 
66
+ attr_accessor visitor_id: String?
67
+
65
68
  def initialize: (
66
69
  distinct_id: String,
67
70
  event: String,
@@ -72,7 +75,8 @@ module OursprivacyIngest
72
75
  ?identity_context: OursprivacyIngest::BatchCreateParams::Event::IdentityContext?,
73
76
  ?time: Float?,
74
77
  ?user_id: String?,
75
- ?user_properties: OursprivacyIngest::BatchCreateParams::Event::UserProperties?
78
+ ?user_properties: OursprivacyIngest::BatchCreateParams::Event::UserProperties?,
79
+ ?visitor_id: String?
76
80
  ) -> void
77
81
 
78
82
  def to_hash: -> {
@@ -85,7 +89,8 @@ module OursprivacyIngest
85
89
  identity_context: OursprivacyIngest::BatchCreateParams::Event::IdentityContext?,
86
90
  time: Float?,
87
91
  user_id: String?,
88
- user_properties: OursprivacyIngest::BatchCreateParams::Event::UserProperties?
92
+ user_properties: OursprivacyIngest::BatchCreateParams::Event::UserProperties?,
93
+ visitor_id: String?
89
94
  }
90
95
 
91
96
  type default_properties =
@@ -95,6 +100,7 @@ module OursprivacyIngest
95
100
  ad_id: String?,
96
101
  admitad_uid: String?,
97
102
  adset_id: String?,
103
+ :affiliatly_v3 => String?,
98
104
  alart: String?,
99
105
  aleid: String?,
100
106
  axwrt: String?,
@@ -185,6 +191,8 @@ module OursprivacyIngest
185
191
 
186
192
  attr_accessor adset_id: String?
187
193
 
194
+ attr_accessor affiliatly_v3: String?
195
+
188
196
  attr_accessor alart: String?
189
197
 
190
198
  attr_accessor aleid: String?
@@ -345,6 +353,7 @@ module OursprivacyIngest
345
353
  ?ad_id: String?,
346
354
  ?admitad_uid: String?,
347
355
  ?adset_id: String?,
356
+ ?affiliatly_v3: String?,
348
357
  ?alart: String?,
349
358
  ?aleid: String?,
350
359
  ?axwrt: String?,
@@ -430,6 +439,7 @@ module OursprivacyIngest
430
439
  ad_id: String?,
431
440
  admitad_uid: String?,
432
441
  adset_id: String?,
442
+ :affiliatly_v3 => String?,
433
443
  alart: String?,
434
444
  aleid: String?,
435
445
  axwrt: String?,
@@ -692,6 +702,7 @@ module OursprivacyIngest
692
702
  ad_id: String?,
693
703
  admitad_uid: String?,
694
704
  adset_id: String?,
705
+ :affiliatly_v3 => String?,
695
706
  alart: String?,
696
707
  aleid: String?,
697
708
  axwrt: String?,
@@ -767,6 +778,8 @@ module OursprivacyIngest
767
778
 
768
779
  attr_accessor adset_id: String?
769
780
 
781
+ attr_accessor affiliatly_v3: String?
782
+
770
783
  attr_accessor alart: String?
771
784
 
772
785
  attr_accessor aleid: String?
@@ -900,6 +913,7 @@ module OursprivacyIngest
900
913
  ?ad_id: String?,
901
914
  ?admitad_uid: String?,
902
915
  ?adset_id: String?,
916
+ ?affiliatly_v3: String?,
903
917
  ?alart: String?,
904
918
  ?aleid: String?,
905
919
  ?axwrt: String?,
@@ -971,6 +985,7 @@ module OursprivacyIngest
971
985
  ad_id: String?,
972
986
  admitad_uid: String?,
973
987
  adset_id: String?,
988
+ :affiliatly_v3 => String?,
974
989
  alart: String?,
975
990
  aleid: String?,
976
991
  axwrt: String?,
@@ -12,7 +12,8 @@ module OursprivacyIngest
12
12
  identity_context: OursprivacyIngest::TrackEventParams::IdentityContext?,
13
13
  time: Float?,
14
14
  user_id: String?,
15
- user_properties: OursprivacyIngest::TrackEventParams::UserProperties?
15
+ user_properties: OursprivacyIngest::TrackEventParams::UserProperties?,
16
+ visitor_id: String?
16
17
  }
17
18
  & OursprivacyIngest::Internal::Type::request_parameters
18
19
 
@@ -42,6 +43,8 @@ module OursprivacyIngest
42
43
 
43
44
  attr_accessor user_properties: OursprivacyIngest::TrackEventParams::UserProperties?
44
45
 
46
+ attr_accessor visitor_id: String?
47
+
45
48
  def initialize: (
46
49
  token: String,
47
50
  event: String,
@@ -54,6 +57,7 @@ module OursprivacyIngest
54
57
  ?time: Float?,
55
58
  ?user_id: String?,
56
59
  ?user_properties: OursprivacyIngest::TrackEventParams::UserProperties?,
60
+ ?visitor_id: String?,
57
61
  ?request_options: OursprivacyIngest::request_opts
58
62
  ) -> void
59
63
 
@@ -69,6 +73,7 @@ module OursprivacyIngest
69
73
  time: Float?,
70
74
  user_id: String?,
71
75
  user_properties: OursprivacyIngest::TrackEventParams::UserProperties?,
76
+ visitor_id: String?,
72
77
  request_options: OursprivacyIngest::RequestOptions
73
78
  }
74
79
 
@@ -79,6 +84,7 @@ module OursprivacyIngest
79
84
  ad_id: String?,
80
85
  admitad_uid: String?,
81
86
  adset_id: String?,
87
+ :affiliatly_v3 => String?,
82
88
  alart: String?,
83
89
  aleid: String?,
84
90
  axwrt: String?,
@@ -169,6 +175,8 @@ module OursprivacyIngest
169
175
 
170
176
  attr_accessor adset_id: String?
171
177
 
178
+ attr_accessor affiliatly_v3: String?
179
+
172
180
  attr_accessor alart: String?
173
181
 
174
182
  attr_accessor aleid: String?
@@ -329,6 +337,7 @@ module OursprivacyIngest
329
337
  ?ad_id: String?,
330
338
  ?admitad_uid: String?,
331
339
  ?adset_id: String?,
340
+ ?affiliatly_v3: String?,
332
341
  ?alart: String?,
333
342
  ?aleid: String?,
334
343
  ?axwrt: String?,
@@ -414,6 +423,7 @@ module OursprivacyIngest
414
423
  ad_id: String?,
415
424
  admitad_uid: String?,
416
425
  adset_id: String?,
426
+ :affiliatly_v3 => String?,
417
427
  alart: String?,
418
428
  aleid: String?,
419
429
  axwrt: String?,
@@ -672,6 +682,7 @@ module OursprivacyIngest
672
682
  ad_id: String?,
673
683
  admitad_uid: String?,
674
684
  adset_id: String?,
685
+ :affiliatly_v3 => String?,
675
686
  alart: String?,
676
687
  aleid: String?,
677
688
  axwrt: String?,
@@ -747,6 +758,8 @@ module OursprivacyIngest
747
758
 
748
759
  attr_accessor adset_id: String?
749
760
 
761
+ attr_accessor affiliatly_v3: String?
762
+
750
763
  attr_accessor alart: String?
751
764
 
752
765
  attr_accessor aleid: String?
@@ -880,6 +893,7 @@ module OursprivacyIngest
880
893
  ?ad_id: String?,
881
894
  ?admitad_uid: String?,
882
895
  ?adset_id: String?,
896
+ ?affiliatly_v3: String?,
883
897
  ?alart: String?,
884
898
  ?aleid: String?,
885
899
  ?axwrt: String?,
@@ -951,6 +965,7 @@ module OursprivacyIngest
951
965
  ad_id: String?,
952
966
  admitad_uid: String?,
953
967
  adset_id: String?,
968
+ :affiliatly_v3 => String?,
954
969
  alart: String?,
955
970
  aleid: String?,
956
971
  axwrt: String?,
@@ -8,7 +8,8 @@ module OursprivacyIngest
8
8
  email: String?,
9
9
  external_id: String?,
10
10
  identity_context: OursprivacyIngest::VisitorUpsertParams::IdentityContext?,
11
- user_id: String?
11
+ user_id: String?,
12
+ visitor_id: String?
12
13
  }
13
14
  & OursprivacyIngest::Internal::Type::request_parameters
14
15
 
@@ -30,6 +31,8 @@ module OursprivacyIngest
30
31
 
31
32
  attr_accessor user_id: String?
32
33
 
34
+ attr_accessor visitor_id: String?
35
+
33
36
  def initialize: (
34
37
  token: String,
35
38
  user_properties: OursprivacyIngest::VisitorUpsertParams::UserProperties,
@@ -38,6 +41,7 @@ module OursprivacyIngest
38
41
  ?external_id: String?,
39
42
  ?identity_context: OursprivacyIngest::VisitorUpsertParams::IdentityContext?,
40
43
  ?user_id: String?,
44
+ ?visitor_id: String?,
41
45
  ?request_options: OursprivacyIngest::request_opts
42
46
  ) -> void
43
47
 
@@ -49,6 +53,7 @@ module OursprivacyIngest
49
53
  external_id: String?,
50
54
  identity_context: OursprivacyIngest::VisitorUpsertParams::IdentityContext?,
51
55
  user_id: String?,
56
+ visitor_id: String?,
52
57
  request_options: OursprivacyIngest::RequestOptions
53
58
  }
54
59
 
@@ -58,6 +63,7 @@ module OursprivacyIngest
58
63
  ad_id: String?,
59
64
  admitad_uid: String?,
60
65
  adset_id: String?,
66
+ :affiliatly_v3 => String?,
61
67
  alart: String?,
62
68
  aleid: String?,
63
69
  axwrt: String?,
@@ -133,6 +139,8 @@ module OursprivacyIngest
133
139
 
134
140
  attr_accessor adset_id: String?
135
141
 
142
+ attr_accessor affiliatly_v3: String?
143
+
136
144
  attr_accessor alart: String?
137
145
 
138
146
  attr_accessor aleid: String?
@@ -266,6 +274,7 @@ module OursprivacyIngest
266
274
  ?ad_id: String?,
267
275
  ?admitad_uid: String?,
268
276
  ?adset_id: String?,
277
+ ?affiliatly_v3: String?,
269
278
  ?alart: String?,
270
279
  ?aleid: String?,
271
280
  ?axwrt: String?,
@@ -337,6 +346,7 @@ module OursprivacyIngest
337
346
  ad_id: String?,
338
347
  admitad_uid: String?,
339
348
  adset_id: String?,
349
+ :affiliatly_v3 => String?,
340
350
  alart: String?,
341
351
  aleid: String?,
342
352
  axwrt: String?,
@@ -751,6 +761,7 @@ module OursprivacyIngest
751
761
  ad_id: String?,
752
762
  admitad_uid: String?,
753
763
  adset_id: String?,
764
+ :affiliatly_v3 => String?,
754
765
  alart: String?,
755
766
  aleid: String?,
756
767
  axwrt: String?,
@@ -841,6 +852,8 @@ module OursprivacyIngest
841
852
 
842
853
  attr_accessor adset_id: String?
843
854
 
855
+ attr_accessor affiliatly_v3: String?
856
+
844
857
  attr_accessor alart: String?
845
858
 
846
859
  attr_accessor aleid: String?
@@ -1001,6 +1014,7 @@ module OursprivacyIngest
1001
1014
  ?ad_id: String?,
1002
1015
  ?admitad_uid: String?,
1003
1016
  ?adset_id: String?,
1017
+ ?affiliatly_v3: String?,
1004
1018
  ?alart: String?,
1005
1019
  ?aleid: String?,
1006
1020
  ?axwrt: String?,
@@ -1086,6 +1100,7 @@ module OursprivacyIngest
1086
1100
  ad_id: String?,
1087
1101
  admitad_uid: String?,
1088
1102
  adset_id: String?,
1103
+ :affiliatly_v3 => String?,
1089
1104
  alart: String?,
1090
1105
  aleid: String?,
1091
1106
  axwrt: String?,
@@ -13,6 +13,7 @@ module OursprivacyIngest
13
13
  ?time: Float?,
14
14
  ?user_id: String?,
15
15
  ?user_properties: OursprivacyIngest::TrackEventParams::UserProperties?,
16
+ ?visitor_id: String?,
16
17
  ?request_options: OursprivacyIngest::request_opts
17
18
  ) -> OursprivacyIngest::Models::TrackEventResponse
18
19
 
@@ -9,6 +9,7 @@ module OursprivacyIngest
9
9
  ?external_id: String?,
10
10
  ?identity_context: OursprivacyIngest::VisitorUpsertParams::IdentityContext?,
11
11
  ?user_id: String?,
12
+ ?visitor_id: String?,
12
13
  ?request_options: OursprivacyIngest::request_opts
13
14
  ) -> OursprivacyIngest::Models::VisitorUpsertResponse
14
15
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oursprivacy-ingest
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ours Privacy