safetykit 0.6.0 → 0.8.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 +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/safety_kit/client.rb +7 -0
- data/lib/safety_kit/internal/type/union.rb +11 -0
- data/lib/safety_kit/models/beta/event_create_params.rb +1519 -170
- data/lib/safety_kit/models/beta/event_create_response.rb +72 -30
- data/lib/safety_kit/resources/beta/events.rb +2 -2
- data/lib/safety_kit/resources/client_sessions.rb +2 -1
- data/lib/safety_kit/version.rb +1 -1
- data/rbi/safety_kit/client.rbi +5 -0
- data/rbi/safety_kit/models/beta/event_create_params.rbi +3142 -267
- data/rbi/safety_kit/models/beta/event_create_response.rbi +151 -52
- data/rbi/safety_kit/resources/beta/events.rbi +16 -8
- data/sig/safety_kit/client.rbs +2 -0
- data/sig/safety_kit/models/beta/event_create_params.rbs +1302 -198
- data/sig/safety_kit/models/beta/event_create_response.rbs +62 -20
- data/sig/safety_kit/resources/beta/events.rbs +1 -1
- metadata +1 -1
|
@@ -15,16 +15,24 @@ module SafetyKit
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
# Backend event to send to SafetyKit. Send events from
|
|
19
|
-
# has happened in your product. Do not send these
|
|
20
|
-
# or mobile client.
|
|
18
|
+
# Backend event or ordered batch of events to send to SafetyKit. Send events from
|
|
19
|
+
# your server after an action has happened in your product. Do not send these
|
|
20
|
+
# events directly from a browser or mobile client.
|
|
21
21
|
sig do
|
|
22
22
|
returns(
|
|
23
23
|
T.any(
|
|
24
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
25
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
26
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
27
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
24
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest,
|
|
25
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest,
|
|
26
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest,
|
|
27
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest,
|
|
28
|
+
T::Array[
|
|
29
|
+
T.any(
|
|
30
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact,
|
|
31
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded,
|
|
32
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount,
|
|
33
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount
|
|
34
|
+
)
|
|
35
|
+
]
|
|
28
36
|
)
|
|
29
37
|
)
|
|
30
38
|
end
|
|
@@ -34,18 +42,26 @@ module SafetyKit
|
|
|
34
42
|
params(
|
|
35
43
|
body:
|
|
36
44
|
T.any(
|
|
37
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
38
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
39
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
40
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
45
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::OrHash,
|
|
46
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::OrHash,
|
|
47
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::OrHash,
|
|
48
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::OrHash,
|
|
49
|
+
T::Array[
|
|
50
|
+
T.any(
|
|
51
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::OrHash,
|
|
52
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::OrHash,
|
|
53
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::OrHash,
|
|
54
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::OrHash
|
|
55
|
+
)
|
|
56
|
+
]
|
|
41
57
|
),
|
|
42
58
|
request_options: SafetyKit::RequestOptions::OrHash
|
|
43
59
|
).returns(T.attached_class)
|
|
44
60
|
end
|
|
45
61
|
def self.new(
|
|
46
|
-
# Backend event to send to SafetyKit. Send events from
|
|
47
|
-
# has happened in your product. Do not send these
|
|
48
|
-
# or mobile client.
|
|
62
|
+
# Backend event or ordered batch of events to send to SafetyKit. Send events from
|
|
63
|
+
# your server after an action has happened in your product. Do not send these
|
|
64
|
+
# events directly from a browser or mobile client.
|
|
49
65
|
body:,
|
|
50
66
|
request_options: {}
|
|
51
67
|
)
|
|
@@ -56,10 +72,18 @@ module SafetyKit
|
|
|
56
72
|
{
|
|
57
73
|
body:
|
|
58
74
|
T.any(
|
|
59
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
60
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
61
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
62
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
75
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest,
|
|
76
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest,
|
|
77
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest,
|
|
78
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest,
|
|
79
|
+
T::Array[
|
|
80
|
+
T.any(
|
|
81
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact,
|
|
82
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded,
|
|
83
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount,
|
|
84
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount
|
|
85
|
+
)
|
|
86
|
+
]
|
|
63
87
|
),
|
|
64
88
|
request_options: SafetyKit::RequestOptions
|
|
65
89
|
}
|
|
@@ -68,27 +92,30 @@ module SafetyKit
|
|
|
68
92
|
def to_hash
|
|
69
93
|
end
|
|
70
94
|
|
|
71
|
-
# Backend event to send to SafetyKit. Send events from
|
|
72
|
-
# has happened in your product. Do not send these
|
|
73
|
-
# or mobile client.
|
|
95
|
+
# Backend event or ordered batch of events to send to SafetyKit. Send events from
|
|
96
|
+
# your server after an action has happened in your product. Do not send these
|
|
97
|
+
# events directly from a browser or mobile client.
|
|
74
98
|
module Body
|
|
75
99
|
extend SafetyKit::Internal::Type::Union
|
|
76
100
|
|
|
77
101
|
Variants =
|
|
78
102
|
T.type_alias do
|
|
79
103
|
T.any(
|
|
80
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
81
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
82
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
83
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
104
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest,
|
|
105
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest,
|
|
106
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest,
|
|
107
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest,
|
|
108
|
+
T::Array[
|
|
109
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::Variants
|
|
110
|
+
]
|
|
84
111
|
)
|
|
85
112
|
end
|
|
86
113
|
|
|
87
|
-
class
|
|
114
|
+
class UserContactEventRequest < SafetyKit::Internal::Type::BaseModel
|
|
88
115
|
OrHash =
|
|
89
116
|
T.type_alias do
|
|
90
117
|
T.any(
|
|
91
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
118
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest,
|
|
92
119
|
SafetyKit::Internal::AnyHash
|
|
93
120
|
)
|
|
94
121
|
end
|
|
@@ -107,7 +134,11 @@ module SafetyKit
|
|
|
107
134
|
sig { returns(Time) }
|
|
108
135
|
attr_accessor :timestamp
|
|
109
136
|
|
|
110
|
-
sig
|
|
137
|
+
sig do
|
|
138
|
+
returns(
|
|
139
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Type::OrSymbol
|
|
140
|
+
)
|
|
141
|
+
end
|
|
111
142
|
attr_accessor :type
|
|
112
143
|
|
|
113
144
|
# Your stable canonical identifier for the user or account.
|
|
@@ -122,8 +153,8 @@ module SafetyKit
|
|
|
122
153
|
T.nilable(
|
|
123
154
|
T::Array[
|
|
124
155
|
T.any(
|
|
125
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
126
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
156
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventTextContent,
|
|
157
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent
|
|
127
158
|
)
|
|
128
159
|
]
|
|
129
160
|
)
|
|
@@ -136,8 +167,8 @@ module SafetyKit
|
|
|
136
167
|
content:
|
|
137
168
|
T::Array[
|
|
138
169
|
T.any(
|
|
139
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
140
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
170
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventTextContent::OrHash,
|
|
171
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::OrHash
|
|
141
172
|
)
|
|
142
173
|
]
|
|
143
174
|
).void
|
|
@@ -151,7 +182,7 @@ module SafetyKit
|
|
|
151
182
|
T.nilable(
|
|
152
183
|
T::Hash[
|
|
153
184
|
Symbol,
|
|
154
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
185
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Metadata::Variants
|
|
155
186
|
]
|
|
156
187
|
)
|
|
157
188
|
)
|
|
@@ -163,7 +194,7 @@ module SafetyKit
|
|
|
163
194
|
metadata:
|
|
164
195
|
T::Hash[
|
|
165
196
|
Symbol,
|
|
166
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
197
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Metadata::Variants
|
|
167
198
|
]
|
|
168
199
|
).void
|
|
169
200
|
end
|
|
@@ -176,7 +207,7 @@ module SafetyKit
|
|
|
176
207
|
returns(
|
|
177
208
|
T.nilable(
|
|
178
209
|
T::Array[
|
|
179
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
210
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::ResourcesUsed
|
|
180
211
|
]
|
|
181
212
|
)
|
|
182
213
|
)
|
|
@@ -187,37 +218,37 @@ module SafetyKit
|
|
|
187
218
|
params(
|
|
188
219
|
resources_used:
|
|
189
220
|
T::Array[
|
|
190
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
221
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::ResourcesUsed::OrHash
|
|
191
222
|
]
|
|
192
223
|
).void
|
|
193
224
|
end
|
|
194
225
|
attr_writer :resources_used
|
|
195
226
|
|
|
196
227
|
# A user contacts, transacts with, or otherwise interacts with another user.
|
|
197
|
-
# SafetyKit records both users' perspectives with a shared event_id.
|
|
198
228
|
sig do
|
|
199
229
|
params(
|
|
200
230
|
counterparty_user_id: String,
|
|
201
231
|
event_name: String,
|
|
202
232
|
timestamp: Time,
|
|
233
|
+
type:
|
|
234
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Type::OrSymbol,
|
|
203
235
|
user_id: String,
|
|
204
236
|
content:
|
|
205
237
|
T::Array[
|
|
206
238
|
T.any(
|
|
207
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
208
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
239
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventTextContent::OrHash,
|
|
240
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::OrHash
|
|
209
241
|
)
|
|
210
242
|
],
|
|
211
243
|
metadata:
|
|
212
244
|
T::Hash[
|
|
213
245
|
Symbol,
|
|
214
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
246
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Metadata::Variants
|
|
215
247
|
],
|
|
216
248
|
resources_used:
|
|
217
249
|
T::Array[
|
|
218
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
219
|
-
]
|
|
220
|
-
type: Symbol
|
|
250
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::ResourcesUsed::OrHash
|
|
251
|
+
]
|
|
221
252
|
).returns(T.attached_class)
|
|
222
253
|
end
|
|
223
254
|
def self.new(
|
|
@@ -229,6 +260,7 @@ module SafetyKit
|
|
|
229
260
|
event_name:,
|
|
230
261
|
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
231
262
|
timestamp:,
|
|
263
|
+
type:,
|
|
232
264
|
# Your stable canonical identifier for the user or account.
|
|
233
265
|
user_id:,
|
|
234
266
|
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
@@ -241,8 +273,7 @@ module SafetyKit
|
|
|
241
273
|
# Reusable resources observed during the event. Use this for emails, phone
|
|
242
274
|
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
243
275
|
# identifiers.
|
|
244
|
-
resources_used: nil
|
|
245
|
-
type: :user_contact
|
|
276
|
+
resources_used: nil
|
|
246
277
|
)
|
|
247
278
|
end
|
|
248
279
|
|
|
@@ -252,23 +283,24 @@ module SafetyKit
|
|
|
252
283
|
counterparty_user_id: String,
|
|
253
284
|
event_name: String,
|
|
254
285
|
timestamp: Time,
|
|
255
|
-
type:
|
|
286
|
+
type:
|
|
287
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Type::OrSymbol,
|
|
256
288
|
user_id: String,
|
|
257
289
|
content:
|
|
258
290
|
T::Array[
|
|
259
291
|
T.any(
|
|
260
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
261
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
292
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventTextContent,
|
|
293
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent
|
|
262
294
|
)
|
|
263
295
|
],
|
|
264
296
|
metadata:
|
|
265
297
|
T::Hash[
|
|
266
298
|
Symbol,
|
|
267
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
299
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Metadata::Variants
|
|
268
300
|
],
|
|
269
301
|
resources_used:
|
|
270
302
|
T::Array[
|
|
271
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
303
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::ResourcesUsed
|
|
272
304
|
]
|
|
273
305
|
}
|
|
274
306
|
)
|
|
@@ -276,6 +308,35 @@ module SafetyKit
|
|
|
276
308
|
def to_hash
|
|
277
309
|
end
|
|
278
310
|
|
|
311
|
+
module Type
|
|
312
|
+
extend SafetyKit::Internal::Type::Enum
|
|
313
|
+
|
|
314
|
+
TaggedSymbol =
|
|
315
|
+
T.type_alias do
|
|
316
|
+
T.all(
|
|
317
|
+
Symbol,
|
|
318
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Type
|
|
319
|
+
)
|
|
320
|
+
end
|
|
321
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
322
|
+
|
|
323
|
+
USER_CONTACT =
|
|
324
|
+
T.let(
|
|
325
|
+
:user_contact,
|
|
326
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Type::TaggedSymbol
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
sig do
|
|
330
|
+
override.returns(
|
|
331
|
+
T::Array[
|
|
332
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Type::TaggedSymbol
|
|
333
|
+
]
|
|
334
|
+
)
|
|
335
|
+
end
|
|
336
|
+
def self.values
|
|
337
|
+
end
|
|
338
|
+
end
|
|
339
|
+
|
|
279
340
|
# User-authored text content associated with an event.
|
|
280
341
|
module Content
|
|
281
342
|
extend SafetyKit::Internal::Type::Union
|
|
@@ -283,8 +344,8 @@ module SafetyKit
|
|
|
283
344
|
Variants =
|
|
284
345
|
T.type_alias do
|
|
285
346
|
T.any(
|
|
286
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
287
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
347
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventTextContent,
|
|
348
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent
|
|
288
349
|
)
|
|
289
350
|
end
|
|
290
351
|
|
|
@@ -292,7 +353,7 @@ module SafetyKit
|
|
|
292
353
|
OrHash =
|
|
293
354
|
T.type_alias do
|
|
294
355
|
T.any(
|
|
295
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
356
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventTextContent,
|
|
296
357
|
SafetyKit::Internal::AnyHash
|
|
297
358
|
)
|
|
298
359
|
end
|
|
@@ -304,7 +365,7 @@ module SafetyKit
|
|
|
304
365
|
# Text content part.
|
|
305
366
|
sig do
|
|
306
367
|
returns(
|
|
307
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
368
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventTextContent::Type::OrSymbol
|
|
308
369
|
)
|
|
309
370
|
end
|
|
310
371
|
attr_accessor :type
|
|
@@ -321,7 +382,7 @@ module SafetyKit
|
|
|
321
382
|
params(
|
|
322
383
|
text: String,
|
|
323
384
|
type:
|
|
324
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
385
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventTextContent::Type::OrSymbol,
|
|
325
386
|
key: String
|
|
326
387
|
).returns(T.attached_class)
|
|
327
388
|
end
|
|
@@ -340,7 +401,7 @@ module SafetyKit
|
|
|
340
401
|
{
|
|
341
402
|
text: String,
|
|
342
403
|
type:
|
|
343
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
404
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventTextContent::Type::OrSymbol,
|
|
344
405
|
key: String
|
|
345
406
|
}
|
|
346
407
|
)
|
|
@@ -356,7 +417,7 @@ module SafetyKit
|
|
|
356
417
|
T.type_alias do
|
|
357
418
|
T.all(
|
|
358
419
|
Symbol,
|
|
359
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
420
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventTextContent::Type
|
|
360
421
|
)
|
|
361
422
|
end
|
|
362
423
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -364,13 +425,13 @@ module SafetyKit
|
|
|
364
425
|
TEXT =
|
|
365
426
|
T.let(
|
|
366
427
|
:text,
|
|
367
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
428
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventTextContent::Type::TaggedSymbol
|
|
368
429
|
)
|
|
369
430
|
|
|
370
431
|
sig do
|
|
371
432
|
override.returns(
|
|
372
433
|
T::Array[
|
|
373
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
434
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventTextContent::Type::TaggedSymbol
|
|
374
435
|
]
|
|
375
436
|
)
|
|
376
437
|
end
|
|
@@ -383,7 +444,7 @@ module SafetyKit
|
|
|
383
444
|
OrHash =
|
|
384
445
|
T.type_alias do
|
|
385
446
|
T.any(
|
|
386
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
447
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent,
|
|
387
448
|
SafetyKit::Internal::AnyHash
|
|
388
449
|
)
|
|
389
450
|
end
|
|
@@ -391,7 +452,7 @@ module SafetyKit
|
|
|
391
452
|
# Image source information.
|
|
392
453
|
sig do
|
|
393
454
|
returns(
|
|
394
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
455
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::Source
|
|
395
456
|
)
|
|
396
457
|
end
|
|
397
458
|
attr_reader :source
|
|
@@ -399,7 +460,7 @@ module SafetyKit
|
|
|
399
460
|
sig do
|
|
400
461
|
params(
|
|
401
462
|
source:
|
|
402
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
463
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::Source::OrHash
|
|
403
464
|
).void
|
|
404
465
|
end
|
|
405
466
|
attr_writer :source
|
|
@@ -407,7 +468,7 @@ module SafetyKit
|
|
|
407
468
|
# Image content part.
|
|
408
469
|
sig do
|
|
409
470
|
returns(
|
|
410
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
471
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::Type::OrSymbol
|
|
411
472
|
)
|
|
412
473
|
end
|
|
413
474
|
attr_accessor :type
|
|
@@ -423,9 +484,9 @@ module SafetyKit
|
|
|
423
484
|
sig do
|
|
424
485
|
params(
|
|
425
486
|
source:
|
|
426
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
487
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::Source::OrHash,
|
|
427
488
|
type:
|
|
428
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
489
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::Type::OrSymbol,
|
|
429
490
|
key: String
|
|
430
491
|
).returns(T.attached_class)
|
|
431
492
|
end
|
|
@@ -443,9 +504,9 @@ module SafetyKit
|
|
|
443
504
|
override.returns(
|
|
444
505
|
{
|
|
445
506
|
source:
|
|
446
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
507
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::Source,
|
|
447
508
|
type:
|
|
448
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
509
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::Type::OrSymbol,
|
|
449
510
|
key: String
|
|
450
511
|
}
|
|
451
512
|
)
|
|
@@ -457,7 +518,7 @@ module SafetyKit
|
|
|
457
518
|
OrHash =
|
|
458
519
|
T.type_alias do
|
|
459
520
|
T.any(
|
|
460
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
521
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::Source,
|
|
461
522
|
SafetyKit::Internal::AnyHash
|
|
462
523
|
)
|
|
463
524
|
end
|
|
@@ -465,7 +526,7 @@ module SafetyKit
|
|
|
465
526
|
# URL image source.
|
|
466
527
|
sig do
|
|
467
528
|
returns(
|
|
468
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
529
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::Source::Type::OrSymbol
|
|
469
530
|
)
|
|
470
531
|
end
|
|
471
532
|
attr_accessor :type
|
|
@@ -478,7 +539,7 @@ module SafetyKit
|
|
|
478
539
|
sig do
|
|
479
540
|
params(
|
|
480
541
|
type:
|
|
481
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
542
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::Source::Type::OrSymbol,
|
|
482
543
|
url: String
|
|
483
544
|
).returns(T.attached_class)
|
|
484
545
|
end
|
|
@@ -494,7 +555,7 @@ module SafetyKit
|
|
|
494
555
|
override.returns(
|
|
495
556
|
{
|
|
496
557
|
type:
|
|
497
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
558
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::Source::Type::OrSymbol,
|
|
498
559
|
url: String
|
|
499
560
|
}
|
|
500
561
|
)
|
|
@@ -510,7 +571,7 @@ module SafetyKit
|
|
|
510
571
|
T.type_alias do
|
|
511
572
|
T.all(
|
|
512
573
|
Symbol,
|
|
513
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
574
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::Source::Type
|
|
514
575
|
)
|
|
515
576
|
end
|
|
516
577
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -518,13 +579,13 @@ module SafetyKit
|
|
|
518
579
|
URL =
|
|
519
580
|
T.let(
|
|
520
581
|
:url,
|
|
521
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
582
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
522
583
|
)
|
|
523
584
|
|
|
524
585
|
sig do
|
|
525
586
|
override.returns(
|
|
526
587
|
T::Array[
|
|
527
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
588
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
528
589
|
]
|
|
529
590
|
)
|
|
530
591
|
end
|
|
@@ -541,7 +602,7 @@ module SafetyKit
|
|
|
541
602
|
T.type_alias do
|
|
542
603
|
T.all(
|
|
543
604
|
Symbol,
|
|
544
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
605
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::Type
|
|
545
606
|
)
|
|
546
607
|
end
|
|
547
608
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -549,13 +610,13 @@ module SafetyKit
|
|
|
549
610
|
IMAGE =
|
|
550
611
|
T.let(
|
|
551
612
|
:image,
|
|
552
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
613
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::Type::TaggedSymbol
|
|
553
614
|
)
|
|
554
615
|
|
|
555
616
|
sig do
|
|
556
617
|
override.returns(
|
|
557
618
|
T::Array[
|
|
558
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
619
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::EventImageContent::Type::TaggedSymbol
|
|
559
620
|
]
|
|
560
621
|
)
|
|
561
622
|
end
|
|
@@ -567,7 +628,7 @@ module SafetyKit
|
|
|
567
628
|
sig do
|
|
568
629
|
override.returns(
|
|
569
630
|
T::Array[
|
|
570
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
631
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Content::Variants
|
|
571
632
|
]
|
|
572
633
|
)
|
|
573
634
|
end
|
|
@@ -585,7 +646,7 @@ module SafetyKit
|
|
|
585
646
|
Float,
|
|
586
647
|
T::Boolean,
|
|
587
648
|
T::Array[
|
|
588
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
649
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Metadata::UnionMember3::Variants
|
|
589
650
|
]
|
|
590
651
|
)
|
|
591
652
|
end
|
|
@@ -598,7 +659,7 @@ module SafetyKit
|
|
|
598
659
|
sig do
|
|
599
660
|
override.returns(
|
|
600
661
|
T::Array[
|
|
601
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
662
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Metadata::UnionMember3::Variants
|
|
602
663
|
]
|
|
603
664
|
)
|
|
604
665
|
end
|
|
@@ -609,7 +670,7 @@ module SafetyKit
|
|
|
609
670
|
sig do
|
|
610
671
|
override.returns(
|
|
611
672
|
T::Array[
|
|
612
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
673
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Metadata::Variants
|
|
613
674
|
]
|
|
614
675
|
)
|
|
615
676
|
end
|
|
@@ -620,7 +681,7 @@ module SafetyKit
|
|
|
620
681
|
T.let(
|
|
621
682
|
SafetyKit::Internal::Type::ArrayOf[
|
|
622
683
|
union:
|
|
623
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
684
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::Metadata::UnionMember3
|
|
624
685
|
],
|
|
625
686
|
SafetyKit::Internal::Type::Converter
|
|
626
687
|
)
|
|
@@ -630,7 +691,7 @@ module SafetyKit
|
|
|
630
691
|
OrHash =
|
|
631
692
|
T.type_alias do
|
|
632
693
|
T.any(
|
|
633
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
694
|
+
SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::ResourcesUsed,
|
|
634
695
|
SafetyKit::Internal::AnyHash
|
|
635
696
|
)
|
|
636
697
|
end
|
|
@@ -641,7 +702,7 @@ module SafetyKit
|
|
|
641
702
|
attr_accessor :type
|
|
642
703
|
|
|
643
704
|
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
644
|
-
# value, not the raw value.
|
|
705
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
645
706
|
sig { returns(String) }
|
|
646
707
|
attr_accessor :value
|
|
647
708
|
|
|
@@ -655,7 +716,7 @@ module SafetyKit
|
|
|
655
716
|
# youtube, linkedin, or another stable snake_case identifier.
|
|
656
717
|
type:,
|
|
657
718
|
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
658
|
-
# value, not the raw value.
|
|
719
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
659
720
|
value:
|
|
660
721
|
)
|
|
661
722
|
end
|
|
@@ -666,11 +727,11 @@ module SafetyKit
|
|
|
666
727
|
end
|
|
667
728
|
end
|
|
668
729
|
|
|
669
|
-
class
|
|
730
|
+
class ContentUploadedEventRequest < SafetyKit::Internal::Type::BaseModel
|
|
670
731
|
OrHash =
|
|
671
732
|
T.type_alias do
|
|
672
733
|
T.any(
|
|
673
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
734
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest,
|
|
674
735
|
SafetyKit::Internal::AnyHash
|
|
675
736
|
)
|
|
676
737
|
end
|
|
@@ -682,8 +743,8 @@ module SafetyKit
|
|
|
682
743
|
returns(
|
|
683
744
|
T::Array[
|
|
684
745
|
T.any(
|
|
685
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
686
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
746
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventTextContent,
|
|
747
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent
|
|
687
748
|
)
|
|
688
749
|
]
|
|
689
750
|
)
|
|
@@ -699,7 +760,11 @@ module SafetyKit
|
|
|
699
760
|
sig { returns(Time) }
|
|
700
761
|
attr_accessor :timestamp
|
|
701
762
|
|
|
702
|
-
sig
|
|
763
|
+
sig do
|
|
764
|
+
returns(
|
|
765
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Type::OrSymbol
|
|
766
|
+
)
|
|
767
|
+
end
|
|
703
768
|
attr_accessor :type
|
|
704
769
|
|
|
705
770
|
# Your stable canonical identifier for the user or account.
|
|
@@ -713,7 +778,7 @@ module SafetyKit
|
|
|
713
778
|
T.nilable(
|
|
714
779
|
T::Hash[
|
|
715
780
|
Symbol,
|
|
716
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
781
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Metadata::Variants
|
|
717
782
|
]
|
|
718
783
|
)
|
|
719
784
|
)
|
|
@@ -725,7 +790,7 @@ module SafetyKit
|
|
|
725
790
|
metadata:
|
|
726
791
|
T::Hash[
|
|
727
792
|
Symbol,
|
|
728
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
793
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Metadata::Variants
|
|
729
794
|
]
|
|
730
795
|
).void
|
|
731
796
|
end
|
|
@@ -738,7 +803,7 @@ module SafetyKit
|
|
|
738
803
|
returns(
|
|
739
804
|
T.nilable(
|
|
740
805
|
T::Array[
|
|
741
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
806
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::ResourcesUsed
|
|
742
807
|
]
|
|
743
808
|
)
|
|
744
809
|
)
|
|
@@ -749,7 +814,7 @@ module SafetyKit
|
|
|
749
814
|
params(
|
|
750
815
|
resources_used:
|
|
751
816
|
T::Array[
|
|
752
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
817
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::ResourcesUsed::OrHash
|
|
753
818
|
]
|
|
754
819
|
).void
|
|
755
820
|
end
|
|
@@ -761,23 +826,24 @@ module SafetyKit
|
|
|
761
826
|
content:
|
|
762
827
|
T::Array[
|
|
763
828
|
T.any(
|
|
764
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
765
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
829
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventTextContent::OrHash,
|
|
830
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::OrHash
|
|
766
831
|
)
|
|
767
832
|
],
|
|
768
833
|
event_name: String,
|
|
769
834
|
timestamp: Time,
|
|
835
|
+
type:
|
|
836
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Type::OrSymbol,
|
|
770
837
|
user_id: String,
|
|
771
838
|
metadata:
|
|
772
839
|
T::Hash[
|
|
773
840
|
Symbol,
|
|
774
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
841
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Metadata::Variants
|
|
775
842
|
],
|
|
776
843
|
resources_used:
|
|
777
844
|
T::Array[
|
|
778
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
779
|
-
]
|
|
780
|
-
type: Symbol
|
|
845
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::ResourcesUsed::OrHash
|
|
846
|
+
]
|
|
781
847
|
).returns(T.attached_class)
|
|
782
848
|
end
|
|
783
849
|
def self.new(
|
|
@@ -790,6 +856,7 @@ module SafetyKit
|
|
|
790
856
|
event_name:,
|
|
791
857
|
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
792
858
|
timestamp:,
|
|
859
|
+
type:,
|
|
793
860
|
# Your stable canonical identifier for the user or account.
|
|
794
861
|
user_id:,
|
|
795
862
|
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
@@ -798,8 +865,7 @@ module SafetyKit
|
|
|
798
865
|
# Reusable resources observed during the event. Use this for emails, phone
|
|
799
866
|
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
800
867
|
# identifiers.
|
|
801
|
-
resources_used: nil
|
|
802
|
-
type: :content_uploaded
|
|
868
|
+
resources_used: nil
|
|
803
869
|
)
|
|
804
870
|
end
|
|
805
871
|
|
|
@@ -809,22 +875,23 @@ module SafetyKit
|
|
|
809
875
|
content:
|
|
810
876
|
T::Array[
|
|
811
877
|
T.any(
|
|
812
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
813
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
878
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventTextContent,
|
|
879
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent
|
|
814
880
|
)
|
|
815
881
|
],
|
|
816
882
|
event_name: String,
|
|
817
883
|
timestamp: Time,
|
|
818
|
-
type:
|
|
884
|
+
type:
|
|
885
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Type::OrSymbol,
|
|
819
886
|
user_id: String,
|
|
820
887
|
metadata:
|
|
821
888
|
T::Hash[
|
|
822
889
|
Symbol,
|
|
823
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
890
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Metadata::Variants
|
|
824
891
|
],
|
|
825
892
|
resources_used:
|
|
826
893
|
T::Array[
|
|
827
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
894
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::ResourcesUsed
|
|
828
895
|
]
|
|
829
896
|
}
|
|
830
897
|
)
|
|
@@ -839,8 +906,8 @@ module SafetyKit
|
|
|
839
906
|
Variants =
|
|
840
907
|
T.type_alias do
|
|
841
908
|
T.any(
|
|
842
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
843
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
909
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventTextContent,
|
|
910
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent
|
|
844
911
|
)
|
|
845
912
|
end
|
|
846
913
|
|
|
@@ -848,7 +915,7 @@ module SafetyKit
|
|
|
848
915
|
OrHash =
|
|
849
916
|
T.type_alias do
|
|
850
917
|
T.any(
|
|
851
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
918
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventTextContent,
|
|
852
919
|
SafetyKit::Internal::AnyHash
|
|
853
920
|
)
|
|
854
921
|
end
|
|
@@ -860,7 +927,7 @@ module SafetyKit
|
|
|
860
927
|
# Text content part.
|
|
861
928
|
sig do
|
|
862
929
|
returns(
|
|
863
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
930
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventTextContent::Type::OrSymbol
|
|
864
931
|
)
|
|
865
932
|
end
|
|
866
933
|
attr_accessor :type
|
|
@@ -877,7 +944,7 @@ module SafetyKit
|
|
|
877
944
|
params(
|
|
878
945
|
text: String,
|
|
879
946
|
type:
|
|
880
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
947
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventTextContent::Type::OrSymbol,
|
|
881
948
|
key: String
|
|
882
949
|
).returns(T.attached_class)
|
|
883
950
|
end
|
|
@@ -896,7 +963,7 @@ module SafetyKit
|
|
|
896
963
|
{
|
|
897
964
|
text: String,
|
|
898
965
|
type:
|
|
899
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
966
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventTextContent::Type::OrSymbol,
|
|
900
967
|
key: String
|
|
901
968
|
}
|
|
902
969
|
)
|
|
@@ -912,7 +979,7 @@ module SafetyKit
|
|
|
912
979
|
T.type_alias do
|
|
913
980
|
T.all(
|
|
914
981
|
Symbol,
|
|
915
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
982
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventTextContent::Type
|
|
916
983
|
)
|
|
917
984
|
end
|
|
918
985
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -920,13 +987,13 @@ module SafetyKit
|
|
|
920
987
|
TEXT =
|
|
921
988
|
T.let(
|
|
922
989
|
:text,
|
|
923
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
990
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventTextContent::Type::TaggedSymbol
|
|
924
991
|
)
|
|
925
992
|
|
|
926
993
|
sig do
|
|
927
994
|
override.returns(
|
|
928
995
|
T::Array[
|
|
929
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
996
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventTextContent::Type::TaggedSymbol
|
|
930
997
|
]
|
|
931
998
|
)
|
|
932
999
|
end
|
|
@@ -939,7 +1006,7 @@ module SafetyKit
|
|
|
939
1006
|
OrHash =
|
|
940
1007
|
T.type_alias do
|
|
941
1008
|
T.any(
|
|
942
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1009
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent,
|
|
943
1010
|
SafetyKit::Internal::AnyHash
|
|
944
1011
|
)
|
|
945
1012
|
end
|
|
@@ -947,7 +1014,7 @@ module SafetyKit
|
|
|
947
1014
|
# Image source information.
|
|
948
1015
|
sig do
|
|
949
1016
|
returns(
|
|
950
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1017
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::Source
|
|
951
1018
|
)
|
|
952
1019
|
end
|
|
953
1020
|
attr_reader :source
|
|
@@ -955,7 +1022,7 @@ module SafetyKit
|
|
|
955
1022
|
sig do
|
|
956
1023
|
params(
|
|
957
1024
|
source:
|
|
958
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1025
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::Source::OrHash
|
|
959
1026
|
).void
|
|
960
1027
|
end
|
|
961
1028
|
attr_writer :source
|
|
@@ -963,7 +1030,7 @@ module SafetyKit
|
|
|
963
1030
|
# Image content part.
|
|
964
1031
|
sig do
|
|
965
1032
|
returns(
|
|
966
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1033
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::Type::OrSymbol
|
|
967
1034
|
)
|
|
968
1035
|
end
|
|
969
1036
|
attr_accessor :type
|
|
@@ -979,9 +1046,9 @@ module SafetyKit
|
|
|
979
1046
|
sig do
|
|
980
1047
|
params(
|
|
981
1048
|
source:
|
|
982
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1049
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::Source::OrHash,
|
|
983
1050
|
type:
|
|
984
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1051
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::Type::OrSymbol,
|
|
985
1052
|
key: String
|
|
986
1053
|
).returns(T.attached_class)
|
|
987
1054
|
end
|
|
@@ -999,9 +1066,9 @@ module SafetyKit
|
|
|
999
1066
|
override.returns(
|
|
1000
1067
|
{
|
|
1001
1068
|
source:
|
|
1002
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1069
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::Source,
|
|
1003
1070
|
type:
|
|
1004
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1071
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::Type::OrSymbol,
|
|
1005
1072
|
key: String
|
|
1006
1073
|
}
|
|
1007
1074
|
)
|
|
@@ -1013,7 +1080,7 @@ module SafetyKit
|
|
|
1013
1080
|
OrHash =
|
|
1014
1081
|
T.type_alias do
|
|
1015
1082
|
T.any(
|
|
1016
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1083
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::Source,
|
|
1017
1084
|
SafetyKit::Internal::AnyHash
|
|
1018
1085
|
)
|
|
1019
1086
|
end
|
|
@@ -1021,7 +1088,7 @@ module SafetyKit
|
|
|
1021
1088
|
# URL image source.
|
|
1022
1089
|
sig do
|
|
1023
1090
|
returns(
|
|
1024
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1091
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::Source::Type::OrSymbol
|
|
1025
1092
|
)
|
|
1026
1093
|
end
|
|
1027
1094
|
attr_accessor :type
|
|
@@ -1034,7 +1101,7 @@ module SafetyKit
|
|
|
1034
1101
|
sig do
|
|
1035
1102
|
params(
|
|
1036
1103
|
type:
|
|
1037
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1104
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::Source::Type::OrSymbol,
|
|
1038
1105
|
url: String
|
|
1039
1106
|
).returns(T.attached_class)
|
|
1040
1107
|
end
|
|
@@ -1050,7 +1117,7 @@ module SafetyKit
|
|
|
1050
1117
|
override.returns(
|
|
1051
1118
|
{
|
|
1052
1119
|
type:
|
|
1053
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1120
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::Source::Type::OrSymbol,
|
|
1054
1121
|
url: String
|
|
1055
1122
|
}
|
|
1056
1123
|
)
|
|
@@ -1066,7 +1133,7 @@ module SafetyKit
|
|
|
1066
1133
|
T.type_alias do
|
|
1067
1134
|
T.all(
|
|
1068
1135
|
Symbol,
|
|
1069
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1136
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::Source::Type
|
|
1070
1137
|
)
|
|
1071
1138
|
end
|
|
1072
1139
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -1074,13 +1141,13 @@ module SafetyKit
|
|
|
1074
1141
|
URL =
|
|
1075
1142
|
T.let(
|
|
1076
1143
|
:url,
|
|
1077
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1144
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
1078
1145
|
)
|
|
1079
1146
|
|
|
1080
1147
|
sig do
|
|
1081
1148
|
override.returns(
|
|
1082
1149
|
T::Array[
|
|
1083
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1150
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
1084
1151
|
]
|
|
1085
1152
|
)
|
|
1086
1153
|
end
|
|
@@ -1097,7 +1164,7 @@ module SafetyKit
|
|
|
1097
1164
|
T.type_alias do
|
|
1098
1165
|
T.all(
|
|
1099
1166
|
Symbol,
|
|
1100
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1167
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::Type
|
|
1101
1168
|
)
|
|
1102
1169
|
end
|
|
1103
1170
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -1105,13 +1172,13 @@ module SafetyKit
|
|
|
1105
1172
|
IMAGE =
|
|
1106
1173
|
T.let(
|
|
1107
1174
|
:image,
|
|
1108
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1175
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::Type::TaggedSymbol
|
|
1109
1176
|
)
|
|
1110
1177
|
|
|
1111
1178
|
sig do
|
|
1112
1179
|
override.returns(
|
|
1113
1180
|
T::Array[
|
|
1114
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1181
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::EventImageContent::Type::TaggedSymbol
|
|
1115
1182
|
]
|
|
1116
1183
|
)
|
|
1117
1184
|
end
|
|
@@ -1123,7 +1190,7 @@ module SafetyKit
|
|
|
1123
1190
|
sig do
|
|
1124
1191
|
override.returns(
|
|
1125
1192
|
T::Array[
|
|
1126
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1193
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Content::Variants
|
|
1127
1194
|
]
|
|
1128
1195
|
)
|
|
1129
1196
|
end
|
|
@@ -1131,6 +1198,35 @@ module SafetyKit
|
|
|
1131
1198
|
end
|
|
1132
1199
|
end
|
|
1133
1200
|
|
|
1201
|
+
module Type
|
|
1202
|
+
extend SafetyKit::Internal::Type::Enum
|
|
1203
|
+
|
|
1204
|
+
TaggedSymbol =
|
|
1205
|
+
T.type_alias do
|
|
1206
|
+
T.all(
|
|
1207
|
+
Symbol,
|
|
1208
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Type
|
|
1209
|
+
)
|
|
1210
|
+
end
|
|
1211
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1212
|
+
|
|
1213
|
+
CONTENT_UPLOADED =
|
|
1214
|
+
T.let(
|
|
1215
|
+
:content_uploaded,
|
|
1216
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Type::TaggedSymbol
|
|
1217
|
+
)
|
|
1218
|
+
|
|
1219
|
+
sig do
|
|
1220
|
+
override.returns(
|
|
1221
|
+
T::Array[
|
|
1222
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Type::TaggedSymbol
|
|
1223
|
+
]
|
|
1224
|
+
)
|
|
1225
|
+
end
|
|
1226
|
+
def self.values
|
|
1227
|
+
end
|
|
1228
|
+
end
|
|
1229
|
+
|
|
1134
1230
|
module Metadata
|
|
1135
1231
|
extend SafetyKit::Internal::Type::Union
|
|
1136
1232
|
|
|
@@ -1141,7 +1237,7 @@ module SafetyKit
|
|
|
1141
1237
|
Float,
|
|
1142
1238
|
T::Boolean,
|
|
1143
1239
|
T::Array[
|
|
1144
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1240
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Metadata::UnionMember3::Variants
|
|
1145
1241
|
]
|
|
1146
1242
|
)
|
|
1147
1243
|
end
|
|
@@ -1154,7 +1250,7 @@ module SafetyKit
|
|
|
1154
1250
|
sig do
|
|
1155
1251
|
override.returns(
|
|
1156
1252
|
T::Array[
|
|
1157
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1253
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Metadata::UnionMember3::Variants
|
|
1158
1254
|
]
|
|
1159
1255
|
)
|
|
1160
1256
|
end
|
|
@@ -1165,7 +1261,7 @@ module SafetyKit
|
|
|
1165
1261
|
sig do
|
|
1166
1262
|
override.returns(
|
|
1167
1263
|
T::Array[
|
|
1168
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1264
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Metadata::Variants
|
|
1169
1265
|
]
|
|
1170
1266
|
)
|
|
1171
1267
|
end
|
|
@@ -1176,7 +1272,7 @@ module SafetyKit
|
|
|
1176
1272
|
T.let(
|
|
1177
1273
|
SafetyKit::Internal::Type::ArrayOf[
|
|
1178
1274
|
union:
|
|
1179
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1275
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::Metadata::UnionMember3
|
|
1180
1276
|
],
|
|
1181
1277
|
SafetyKit::Internal::Type::Converter
|
|
1182
1278
|
)
|
|
@@ -1186,7 +1282,7 @@ module SafetyKit
|
|
|
1186
1282
|
OrHash =
|
|
1187
1283
|
T.type_alias do
|
|
1188
1284
|
T.any(
|
|
1189
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1285
|
+
SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::ResourcesUsed,
|
|
1190
1286
|
SafetyKit::Internal::AnyHash
|
|
1191
1287
|
)
|
|
1192
1288
|
end
|
|
@@ -1197,7 +1293,7 @@ module SafetyKit
|
|
|
1197
1293
|
attr_accessor :type
|
|
1198
1294
|
|
|
1199
1295
|
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
1200
|
-
# value, not the raw value.
|
|
1296
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
1201
1297
|
sig { returns(String) }
|
|
1202
1298
|
attr_accessor :value
|
|
1203
1299
|
|
|
@@ -1211,7 +1307,7 @@ module SafetyKit
|
|
|
1211
1307
|
# youtube, linkedin, or another stable snake_case identifier.
|
|
1212
1308
|
type:,
|
|
1213
1309
|
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
1214
|
-
# value, not the raw value.
|
|
1310
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
1215
1311
|
value:
|
|
1216
1312
|
)
|
|
1217
1313
|
end
|
|
@@ -1222,11 +1318,11 @@ module SafetyKit
|
|
|
1222
1318
|
end
|
|
1223
1319
|
end
|
|
1224
1320
|
|
|
1225
|
-
class
|
|
1321
|
+
class CreateAccountEventRequest < SafetyKit::Internal::Type::BaseModel
|
|
1226
1322
|
OrHash =
|
|
1227
1323
|
T.type_alias do
|
|
1228
1324
|
T.any(
|
|
1229
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1325
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest,
|
|
1230
1326
|
SafetyKit::Internal::AnyHash
|
|
1231
1327
|
)
|
|
1232
1328
|
end
|
|
@@ -1240,7 +1336,11 @@ module SafetyKit
|
|
|
1240
1336
|
sig { returns(Time) }
|
|
1241
1337
|
attr_accessor :timestamp
|
|
1242
1338
|
|
|
1243
|
-
sig
|
|
1339
|
+
sig do
|
|
1340
|
+
returns(
|
|
1341
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Type::OrSymbol
|
|
1342
|
+
)
|
|
1343
|
+
end
|
|
1244
1344
|
attr_accessor :type
|
|
1245
1345
|
|
|
1246
1346
|
# Your stable canonical identifier for the user or account.
|
|
@@ -1255,8 +1355,8 @@ module SafetyKit
|
|
|
1255
1355
|
T.nilable(
|
|
1256
1356
|
T::Array[
|
|
1257
1357
|
T.any(
|
|
1258
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1259
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1358
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent,
|
|
1359
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent
|
|
1260
1360
|
)
|
|
1261
1361
|
]
|
|
1262
1362
|
)
|
|
@@ -1269,8 +1369,8 @@ module SafetyKit
|
|
|
1269
1369
|
content:
|
|
1270
1370
|
T::Array[
|
|
1271
1371
|
T.any(
|
|
1272
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1273
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1372
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent::OrHash,
|
|
1373
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::OrHash
|
|
1274
1374
|
)
|
|
1275
1375
|
]
|
|
1276
1376
|
).void
|
|
@@ -1284,7 +1384,7 @@ module SafetyKit
|
|
|
1284
1384
|
T.nilable(
|
|
1285
1385
|
T::Hash[
|
|
1286
1386
|
Symbol,
|
|
1287
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1387
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Metadata::Variants
|
|
1288
1388
|
]
|
|
1289
1389
|
)
|
|
1290
1390
|
)
|
|
@@ -1296,12 +1396,31 @@ module SafetyKit
|
|
|
1296
1396
|
metadata:
|
|
1297
1397
|
T::Hash[
|
|
1298
1398
|
Symbol,
|
|
1299
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1399
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Metadata::Variants
|
|
1300
1400
|
]
|
|
1301
1401
|
).void
|
|
1302
1402
|
end
|
|
1303
1403
|
attr_writer :metadata
|
|
1304
1404
|
|
|
1405
|
+
# Stable, typed account-level facts SafetyKit can use in rules and aggregate
|
|
1406
|
+
# analysis.
|
|
1407
|
+
sig do
|
|
1408
|
+
returns(
|
|
1409
|
+
T.nilable(
|
|
1410
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Properties
|
|
1411
|
+
)
|
|
1412
|
+
)
|
|
1413
|
+
end
|
|
1414
|
+
attr_reader :properties
|
|
1415
|
+
|
|
1416
|
+
sig do
|
|
1417
|
+
params(
|
|
1418
|
+
properties:
|
|
1419
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Properties::OrHash
|
|
1420
|
+
).void
|
|
1421
|
+
end
|
|
1422
|
+
attr_writer :properties
|
|
1423
|
+
|
|
1305
1424
|
# Reusable resources observed during the event. Use this for emails, phone
|
|
1306
1425
|
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
1307
1426
|
# identifiers.
|
|
@@ -1309,7 +1428,7 @@ module SafetyKit
|
|
|
1309
1428
|
returns(
|
|
1310
1429
|
T.nilable(
|
|
1311
1430
|
T::Array[
|
|
1312
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1431
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::ResourcesUsed
|
|
1313
1432
|
]
|
|
1314
1433
|
)
|
|
1315
1434
|
)
|
|
@@ -1320,7 +1439,7 @@ module SafetyKit
|
|
|
1320
1439
|
params(
|
|
1321
1440
|
resources_used:
|
|
1322
1441
|
T::Array[
|
|
1323
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1442
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::ResourcesUsed::OrHash
|
|
1324
1443
|
]
|
|
1325
1444
|
).void
|
|
1326
1445
|
end
|
|
@@ -1331,24 +1450,27 @@ module SafetyKit
|
|
|
1331
1450
|
params(
|
|
1332
1451
|
event_name: String,
|
|
1333
1452
|
timestamp: Time,
|
|
1453
|
+
type:
|
|
1454
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Type::OrSymbol,
|
|
1334
1455
|
user_id: String,
|
|
1335
1456
|
content:
|
|
1336
1457
|
T::Array[
|
|
1337
1458
|
T.any(
|
|
1338
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1339
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1459
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent::OrHash,
|
|
1460
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::OrHash
|
|
1340
1461
|
)
|
|
1341
1462
|
],
|
|
1342
1463
|
metadata:
|
|
1343
1464
|
T::Hash[
|
|
1344
1465
|
Symbol,
|
|
1345
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1466
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Metadata::Variants
|
|
1346
1467
|
],
|
|
1468
|
+
properties:
|
|
1469
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Properties::OrHash,
|
|
1347
1470
|
resources_used:
|
|
1348
1471
|
T::Array[
|
|
1349
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1350
|
-
]
|
|
1351
|
-
type: Symbol
|
|
1472
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::ResourcesUsed::OrHash
|
|
1473
|
+
]
|
|
1352
1474
|
).returns(T.attached_class)
|
|
1353
1475
|
end
|
|
1354
1476
|
def self.new(
|
|
@@ -1357,6 +1479,7 @@ module SafetyKit
|
|
|
1357
1479
|
event_name:,
|
|
1358
1480
|
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
1359
1481
|
timestamp:,
|
|
1482
|
+
type:,
|
|
1360
1483
|
# Your stable canonical identifier for the user or account.
|
|
1361
1484
|
user_id:,
|
|
1362
1485
|
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
@@ -1366,11 +1489,13 @@ module SafetyKit
|
|
|
1366
1489
|
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
1367
1490
|
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
1368
1491
|
metadata: nil,
|
|
1492
|
+
# Stable, typed account-level facts SafetyKit can use in rules and aggregate
|
|
1493
|
+
# analysis.
|
|
1494
|
+
properties: nil,
|
|
1369
1495
|
# Reusable resources observed during the event. Use this for emails, phone
|
|
1370
1496
|
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
1371
1497
|
# identifiers.
|
|
1372
|
-
resources_used: nil
|
|
1373
|
-
type: :create_account
|
|
1498
|
+
resources_used: nil
|
|
1374
1499
|
)
|
|
1375
1500
|
end
|
|
1376
1501
|
|
|
@@ -1379,23 +1504,26 @@ module SafetyKit
|
|
|
1379
1504
|
{
|
|
1380
1505
|
event_name: String,
|
|
1381
1506
|
timestamp: Time,
|
|
1382
|
-
type:
|
|
1507
|
+
type:
|
|
1508
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Type::OrSymbol,
|
|
1383
1509
|
user_id: String,
|
|
1384
1510
|
content:
|
|
1385
1511
|
T::Array[
|
|
1386
1512
|
T.any(
|
|
1387
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1388
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1513
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent,
|
|
1514
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent
|
|
1389
1515
|
)
|
|
1390
1516
|
],
|
|
1391
1517
|
metadata:
|
|
1392
1518
|
T::Hash[
|
|
1393
1519
|
Symbol,
|
|
1394
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1520
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Metadata::Variants
|
|
1395
1521
|
],
|
|
1522
|
+
properties:
|
|
1523
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Properties,
|
|
1396
1524
|
resources_used:
|
|
1397
1525
|
T::Array[
|
|
1398
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1526
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::ResourcesUsed
|
|
1399
1527
|
]
|
|
1400
1528
|
}
|
|
1401
1529
|
)
|
|
@@ -1403,6 +1531,35 @@ module SafetyKit
|
|
|
1403
1531
|
def to_hash
|
|
1404
1532
|
end
|
|
1405
1533
|
|
|
1534
|
+
module Type
|
|
1535
|
+
extend SafetyKit::Internal::Type::Enum
|
|
1536
|
+
|
|
1537
|
+
TaggedSymbol =
|
|
1538
|
+
T.type_alias do
|
|
1539
|
+
T.all(
|
|
1540
|
+
Symbol,
|
|
1541
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Type
|
|
1542
|
+
)
|
|
1543
|
+
end
|
|
1544
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1545
|
+
|
|
1546
|
+
CREATE_ACCOUNT =
|
|
1547
|
+
T.let(
|
|
1548
|
+
:create_account,
|
|
1549
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Type::TaggedSymbol
|
|
1550
|
+
)
|
|
1551
|
+
|
|
1552
|
+
sig do
|
|
1553
|
+
override.returns(
|
|
1554
|
+
T::Array[
|
|
1555
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Type::TaggedSymbol
|
|
1556
|
+
]
|
|
1557
|
+
)
|
|
1558
|
+
end
|
|
1559
|
+
def self.values
|
|
1560
|
+
end
|
|
1561
|
+
end
|
|
1562
|
+
|
|
1406
1563
|
# User-authored text content associated with an event.
|
|
1407
1564
|
module Content
|
|
1408
1565
|
extend SafetyKit::Internal::Type::Union
|
|
@@ -1410,8 +1567,8 @@ module SafetyKit
|
|
|
1410
1567
|
Variants =
|
|
1411
1568
|
T.type_alias do
|
|
1412
1569
|
T.any(
|
|
1413
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1414
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1570
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent,
|
|
1571
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent
|
|
1415
1572
|
)
|
|
1416
1573
|
end
|
|
1417
1574
|
|
|
@@ -1419,7 +1576,7 @@ module SafetyKit
|
|
|
1419
1576
|
OrHash =
|
|
1420
1577
|
T.type_alias do
|
|
1421
1578
|
T.any(
|
|
1422
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1579
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent,
|
|
1423
1580
|
SafetyKit::Internal::AnyHash
|
|
1424
1581
|
)
|
|
1425
1582
|
end
|
|
@@ -1431,7 +1588,7 @@ module SafetyKit
|
|
|
1431
1588
|
# Text content part.
|
|
1432
1589
|
sig do
|
|
1433
1590
|
returns(
|
|
1434
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1591
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent::Type::OrSymbol
|
|
1435
1592
|
)
|
|
1436
1593
|
end
|
|
1437
1594
|
attr_accessor :type
|
|
@@ -1448,7 +1605,7 @@ module SafetyKit
|
|
|
1448
1605
|
params(
|
|
1449
1606
|
text: String,
|
|
1450
1607
|
type:
|
|
1451
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1608
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent::Type::OrSymbol,
|
|
1452
1609
|
key: String
|
|
1453
1610
|
).returns(T.attached_class)
|
|
1454
1611
|
end
|
|
@@ -1467,7 +1624,7 @@ module SafetyKit
|
|
|
1467
1624
|
{
|
|
1468
1625
|
text: String,
|
|
1469
1626
|
type:
|
|
1470
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1627
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent::Type::OrSymbol,
|
|
1471
1628
|
key: String
|
|
1472
1629
|
}
|
|
1473
1630
|
)
|
|
@@ -1483,7 +1640,7 @@ module SafetyKit
|
|
|
1483
1640
|
T.type_alias do
|
|
1484
1641
|
T.all(
|
|
1485
1642
|
Symbol,
|
|
1486
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1643
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent::Type
|
|
1487
1644
|
)
|
|
1488
1645
|
end
|
|
1489
1646
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -1491,13 +1648,13 @@ module SafetyKit
|
|
|
1491
1648
|
TEXT =
|
|
1492
1649
|
T.let(
|
|
1493
1650
|
:text,
|
|
1494
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1651
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent::Type::TaggedSymbol
|
|
1495
1652
|
)
|
|
1496
1653
|
|
|
1497
1654
|
sig do
|
|
1498
1655
|
override.returns(
|
|
1499
1656
|
T::Array[
|
|
1500
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1657
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent::Type::TaggedSymbol
|
|
1501
1658
|
]
|
|
1502
1659
|
)
|
|
1503
1660
|
end
|
|
@@ -1510,7 +1667,7 @@ module SafetyKit
|
|
|
1510
1667
|
OrHash =
|
|
1511
1668
|
T.type_alias do
|
|
1512
1669
|
T.any(
|
|
1513
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1670
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent,
|
|
1514
1671
|
SafetyKit::Internal::AnyHash
|
|
1515
1672
|
)
|
|
1516
1673
|
end
|
|
@@ -1518,7 +1675,7 @@ module SafetyKit
|
|
|
1518
1675
|
# Image source information.
|
|
1519
1676
|
sig do
|
|
1520
1677
|
returns(
|
|
1521
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1678
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source
|
|
1522
1679
|
)
|
|
1523
1680
|
end
|
|
1524
1681
|
attr_reader :source
|
|
@@ -1526,7 +1683,7 @@ module SafetyKit
|
|
|
1526
1683
|
sig do
|
|
1527
1684
|
params(
|
|
1528
1685
|
source:
|
|
1529
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1686
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source::OrHash
|
|
1530
1687
|
).void
|
|
1531
1688
|
end
|
|
1532
1689
|
attr_writer :source
|
|
@@ -1534,7 +1691,7 @@ module SafetyKit
|
|
|
1534
1691
|
# Image content part.
|
|
1535
1692
|
sig do
|
|
1536
1693
|
returns(
|
|
1537
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1694
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Type::OrSymbol
|
|
1538
1695
|
)
|
|
1539
1696
|
end
|
|
1540
1697
|
attr_accessor :type
|
|
@@ -1550,9 +1707,9 @@ module SafetyKit
|
|
|
1550
1707
|
sig do
|
|
1551
1708
|
params(
|
|
1552
1709
|
source:
|
|
1553
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1710
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source::OrHash,
|
|
1554
1711
|
type:
|
|
1555
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1712
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Type::OrSymbol,
|
|
1556
1713
|
key: String
|
|
1557
1714
|
).returns(T.attached_class)
|
|
1558
1715
|
end
|
|
@@ -1570,9 +1727,9 @@ module SafetyKit
|
|
|
1570
1727
|
override.returns(
|
|
1571
1728
|
{
|
|
1572
1729
|
source:
|
|
1573
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1730
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source,
|
|
1574
1731
|
type:
|
|
1575
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1732
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Type::OrSymbol,
|
|
1576
1733
|
key: String
|
|
1577
1734
|
}
|
|
1578
1735
|
)
|
|
@@ -1584,7 +1741,7 @@ module SafetyKit
|
|
|
1584
1741
|
OrHash =
|
|
1585
1742
|
T.type_alias do
|
|
1586
1743
|
T.any(
|
|
1587
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1744
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source,
|
|
1588
1745
|
SafetyKit::Internal::AnyHash
|
|
1589
1746
|
)
|
|
1590
1747
|
end
|
|
@@ -1592,7 +1749,7 @@ module SafetyKit
|
|
|
1592
1749
|
# URL image source.
|
|
1593
1750
|
sig do
|
|
1594
1751
|
returns(
|
|
1595
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1752
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source::Type::OrSymbol
|
|
1596
1753
|
)
|
|
1597
1754
|
end
|
|
1598
1755
|
attr_accessor :type
|
|
@@ -1605,7 +1762,7 @@ module SafetyKit
|
|
|
1605
1762
|
sig do
|
|
1606
1763
|
params(
|
|
1607
1764
|
type:
|
|
1608
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1765
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source::Type::OrSymbol,
|
|
1609
1766
|
url: String
|
|
1610
1767
|
).returns(T.attached_class)
|
|
1611
1768
|
end
|
|
@@ -1621,7 +1778,7 @@ module SafetyKit
|
|
|
1621
1778
|
override.returns(
|
|
1622
1779
|
{
|
|
1623
1780
|
type:
|
|
1624
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1781
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source::Type::OrSymbol,
|
|
1625
1782
|
url: String
|
|
1626
1783
|
}
|
|
1627
1784
|
)
|
|
@@ -1637,7 +1794,7 @@ module SafetyKit
|
|
|
1637
1794
|
T.type_alias do
|
|
1638
1795
|
T.all(
|
|
1639
1796
|
Symbol,
|
|
1640
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1797
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source::Type
|
|
1641
1798
|
)
|
|
1642
1799
|
end
|
|
1643
1800
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -1645,13 +1802,13 @@ module SafetyKit
|
|
|
1645
1802
|
URL =
|
|
1646
1803
|
T.let(
|
|
1647
1804
|
:url,
|
|
1648
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1805
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
1649
1806
|
)
|
|
1650
1807
|
|
|
1651
1808
|
sig do
|
|
1652
1809
|
override.returns(
|
|
1653
1810
|
T::Array[
|
|
1654
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1811
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
1655
1812
|
]
|
|
1656
1813
|
)
|
|
1657
1814
|
end
|
|
@@ -1668,7 +1825,7 @@ module SafetyKit
|
|
|
1668
1825
|
T.type_alias do
|
|
1669
1826
|
T.all(
|
|
1670
1827
|
Symbol,
|
|
1671
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1828
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Type
|
|
1672
1829
|
)
|
|
1673
1830
|
end
|
|
1674
1831
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -1676,13 +1833,13 @@ module SafetyKit
|
|
|
1676
1833
|
IMAGE =
|
|
1677
1834
|
T.let(
|
|
1678
1835
|
:image,
|
|
1679
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1836
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Type::TaggedSymbol
|
|
1680
1837
|
)
|
|
1681
1838
|
|
|
1682
1839
|
sig do
|
|
1683
1840
|
override.returns(
|
|
1684
1841
|
T::Array[
|
|
1685
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1842
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Type::TaggedSymbol
|
|
1686
1843
|
]
|
|
1687
1844
|
)
|
|
1688
1845
|
end
|
|
@@ -1694,7 +1851,7 @@ module SafetyKit
|
|
|
1694
1851
|
sig do
|
|
1695
1852
|
override.returns(
|
|
1696
1853
|
T::Array[
|
|
1697
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1854
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::Variants
|
|
1698
1855
|
]
|
|
1699
1856
|
)
|
|
1700
1857
|
end
|
|
@@ -1712,7 +1869,7 @@ module SafetyKit
|
|
|
1712
1869
|
Float,
|
|
1713
1870
|
T::Boolean,
|
|
1714
1871
|
T::Array[
|
|
1715
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1872
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Metadata::UnionMember3::Variants
|
|
1716
1873
|
]
|
|
1717
1874
|
)
|
|
1718
1875
|
end
|
|
@@ -1725,7 +1882,7 @@ module SafetyKit
|
|
|
1725
1882
|
sig do
|
|
1726
1883
|
override.returns(
|
|
1727
1884
|
T::Array[
|
|
1728
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1885
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Metadata::UnionMember3::Variants
|
|
1729
1886
|
]
|
|
1730
1887
|
)
|
|
1731
1888
|
end
|
|
@@ -1736,7 +1893,7 @@ module SafetyKit
|
|
|
1736
1893
|
sig do
|
|
1737
1894
|
override.returns(
|
|
1738
1895
|
T::Array[
|
|
1739
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1896
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Metadata::Variants
|
|
1740
1897
|
]
|
|
1741
1898
|
)
|
|
1742
1899
|
end
|
|
@@ -1747,17 +1904,90 @@ module SafetyKit
|
|
|
1747
1904
|
T.let(
|
|
1748
1905
|
SafetyKit::Internal::Type::ArrayOf[
|
|
1749
1906
|
union:
|
|
1750
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1907
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Metadata::UnionMember3
|
|
1751
1908
|
],
|
|
1752
1909
|
SafetyKit::Internal::Type::Converter
|
|
1753
1910
|
)
|
|
1754
1911
|
end
|
|
1755
1912
|
|
|
1913
|
+
class Properties < SafetyKit::Internal::Type::BaseModel
|
|
1914
|
+
OrHash =
|
|
1915
|
+
T.type_alias do
|
|
1916
|
+
T.any(
|
|
1917
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Properties,
|
|
1918
|
+
SafetyKit::Internal::AnyHash
|
|
1919
|
+
)
|
|
1920
|
+
end
|
|
1921
|
+
|
|
1922
|
+
# Current account lifecycle or moderation state.
|
|
1923
|
+
sig { returns(T.nilable(String)) }
|
|
1924
|
+
attr_reader :account_state
|
|
1925
|
+
|
|
1926
|
+
sig { params(account_state: String).void }
|
|
1927
|
+
attr_writer :account_state
|
|
1928
|
+
|
|
1929
|
+
# Stable account categories in your product.
|
|
1930
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
1931
|
+
attr_reader :account_types
|
|
1932
|
+
|
|
1933
|
+
sig { params(account_types: T::Array[String]).void }
|
|
1934
|
+
attr_writer :account_types
|
|
1935
|
+
|
|
1936
|
+
# Country associated with the account.
|
|
1937
|
+
sig { returns(T.nilable(String)) }
|
|
1938
|
+
attr_reader :country
|
|
1939
|
+
|
|
1940
|
+
sig { params(country: String).void }
|
|
1941
|
+
attr_writer :country
|
|
1942
|
+
|
|
1943
|
+
# Whether the account's email address has been verified.
|
|
1944
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1945
|
+
attr_reader :email_verified
|
|
1946
|
+
|
|
1947
|
+
sig { params(email_verified: T::Boolean).void }
|
|
1948
|
+
attr_writer :email_verified
|
|
1949
|
+
|
|
1950
|
+
# Stable, typed account-level facts SafetyKit can use in rules and aggregate
|
|
1951
|
+
# analysis.
|
|
1952
|
+
sig do
|
|
1953
|
+
params(
|
|
1954
|
+
account_state: String,
|
|
1955
|
+
account_types: T::Array[String],
|
|
1956
|
+
country: String,
|
|
1957
|
+
email_verified: T::Boolean
|
|
1958
|
+
).returns(T.attached_class)
|
|
1959
|
+
end
|
|
1960
|
+
def self.new(
|
|
1961
|
+
# Current account lifecycle or moderation state.
|
|
1962
|
+
account_state: nil,
|
|
1963
|
+
# Stable account categories in your product.
|
|
1964
|
+
account_types: nil,
|
|
1965
|
+
# Country associated with the account.
|
|
1966
|
+
country: nil,
|
|
1967
|
+
# Whether the account's email address has been verified.
|
|
1968
|
+
email_verified: nil
|
|
1969
|
+
)
|
|
1970
|
+
end
|
|
1971
|
+
|
|
1972
|
+
sig do
|
|
1973
|
+
override.returns(
|
|
1974
|
+
{
|
|
1975
|
+
account_state: String,
|
|
1976
|
+
account_types: T::Array[String],
|
|
1977
|
+
country: String,
|
|
1978
|
+
email_verified: T::Boolean
|
|
1979
|
+
}
|
|
1980
|
+
)
|
|
1981
|
+
end
|
|
1982
|
+
def to_hash
|
|
1983
|
+
end
|
|
1984
|
+
end
|
|
1985
|
+
|
|
1756
1986
|
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
1757
1987
|
OrHash =
|
|
1758
1988
|
T.type_alias do
|
|
1759
1989
|
T.any(
|
|
1760
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1990
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::ResourcesUsed,
|
|
1761
1991
|
SafetyKit::Internal::AnyHash
|
|
1762
1992
|
)
|
|
1763
1993
|
end
|
|
@@ -1768,7 +1998,7 @@ module SafetyKit
|
|
|
1768
1998
|
attr_accessor :type
|
|
1769
1999
|
|
|
1770
2000
|
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
1771
|
-
# value, not the raw value.
|
|
2001
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
1772
2002
|
sig { returns(String) }
|
|
1773
2003
|
attr_accessor :value
|
|
1774
2004
|
|
|
@@ -1782,7 +2012,7 @@ module SafetyKit
|
|
|
1782
2012
|
# youtube, linkedin, or another stable snake_case identifier.
|
|
1783
2013
|
type:,
|
|
1784
2014
|
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
1785
|
-
# value, not the raw value.
|
|
2015
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
1786
2016
|
value:
|
|
1787
2017
|
)
|
|
1788
2018
|
end
|
|
@@ -1793,11 +2023,11 @@ module SafetyKit
|
|
|
1793
2023
|
end
|
|
1794
2024
|
end
|
|
1795
2025
|
|
|
1796
|
-
class
|
|
2026
|
+
class UpdateAccountEventRequest < SafetyKit::Internal::Type::BaseModel
|
|
1797
2027
|
OrHash =
|
|
1798
2028
|
T.type_alias do
|
|
1799
2029
|
T.any(
|
|
1800
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2030
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest,
|
|
1801
2031
|
SafetyKit::Internal::AnyHash
|
|
1802
2032
|
)
|
|
1803
2033
|
end
|
|
@@ -1811,7 +2041,11 @@ module SafetyKit
|
|
|
1811
2041
|
sig { returns(Time) }
|
|
1812
2042
|
attr_accessor :timestamp
|
|
1813
2043
|
|
|
1814
|
-
sig
|
|
2044
|
+
sig do
|
|
2045
|
+
returns(
|
|
2046
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Type::OrSymbol
|
|
2047
|
+
)
|
|
2048
|
+
end
|
|
1815
2049
|
attr_accessor :type
|
|
1816
2050
|
|
|
1817
2051
|
# Your stable canonical identifier for the user or account.
|
|
@@ -1826,8 +2060,8 @@ module SafetyKit
|
|
|
1826
2060
|
T.nilable(
|
|
1827
2061
|
T::Array[
|
|
1828
2062
|
T.any(
|
|
1829
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1830
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2063
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent,
|
|
2064
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent
|
|
1831
2065
|
)
|
|
1832
2066
|
]
|
|
1833
2067
|
)
|
|
@@ -1840,8 +2074,8 @@ module SafetyKit
|
|
|
1840
2074
|
content:
|
|
1841
2075
|
T::Array[
|
|
1842
2076
|
T.any(
|
|
1843
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1844
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2077
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent::OrHash,
|
|
2078
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::OrHash
|
|
1845
2079
|
)
|
|
1846
2080
|
]
|
|
1847
2081
|
).void
|
|
@@ -1855,7 +2089,7 @@ module SafetyKit
|
|
|
1855
2089
|
T.nilable(
|
|
1856
2090
|
T::Hash[
|
|
1857
2091
|
Symbol,
|
|
1858
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2092
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Metadata::Variants
|
|
1859
2093
|
]
|
|
1860
2094
|
)
|
|
1861
2095
|
)
|
|
@@ -1867,12 +2101,31 @@ module SafetyKit
|
|
|
1867
2101
|
metadata:
|
|
1868
2102
|
T::Hash[
|
|
1869
2103
|
Symbol,
|
|
1870
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2104
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Metadata::Variants
|
|
1871
2105
|
]
|
|
1872
2106
|
).void
|
|
1873
2107
|
end
|
|
1874
2108
|
attr_writer :metadata
|
|
1875
2109
|
|
|
2110
|
+
# Stable, typed account-level facts SafetyKit can use in rules and aggregate
|
|
2111
|
+
# analysis.
|
|
2112
|
+
sig do
|
|
2113
|
+
returns(
|
|
2114
|
+
T.nilable(
|
|
2115
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Properties
|
|
2116
|
+
)
|
|
2117
|
+
)
|
|
2118
|
+
end
|
|
2119
|
+
attr_reader :properties
|
|
2120
|
+
|
|
2121
|
+
sig do
|
|
2122
|
+
params(
|
|
2123
|
+
properties:
|
|
2124
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Properties::OrHash
|
|
2125
|
+
).void
|
|
2126
|
+
end
|
|
2127
|
+
attr_writer :properties
|
|
2128
|
+
|
|
1876
2129
|
# Reusable resources observed during the event. Use this for emails, phone
|
|
1877
2130
|
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
1878
2131
|
# identifiers.
|
|
@@ -1880,7 +2133,7 @@ module SafetyKit
|
|
|
1880
2133
|
returns(
|
|
1881
2134
|
T.nilable(
|
|
1882
2135
|
T::Array[
|
|
1883
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2136
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::ResourcesUsed
|
|
1884
2137
|
]
|
|
1885
2138
|
)
|
|
1886
2139
|
)
|
|
@@ -1891,7 +2144,7 @@ module SafetyKit
|
|
|
1891
2144
|
params(
|
|
1892
2145
|
resources_used:
|
|
1893
2146
|
T::Array[
|
|
1894
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2147
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::ResourcesUsed::OrHash
|
|
1895
2148
|
]
|
|
1896
2149
|
).void
|
|
1897
2150
|
end
|
|
@@ -1903,24 +2156,27 @@ module SafetyKit
|
|
|
1903
2156
|
params(
|
|
1904
2157
|
event_name: String,
|
|
1905
2158
|
timestamp: Time,
|
|
2159
|
+
type:
|
|
2160
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Type::OrSymbol,
|
|
1906
2161
|
user_id: String,
|
|
1907
2162
|
content:
|
|
1908
2163
|
T::Array[
|
|
1909
2164
|
T.any(
|
|
1910
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1911
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2165
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent::OrHash,
|
|
2166
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::OrHash
|
|
1912
2167
|
)
|
|
1913
2168
|
],
|
|
1914
2169
|
metadata:
|
|
1915
2170
|
T::Hash[
|
|
1916
2171
|
Symbol,
|
|
1917
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2172
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Metadata::Variants
|
|
1918
2173
|
],
|
|
2174
|
+
properties:
|
|
2175
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Properties::OrHash,
|
|
1919
2176
|
resources_used:
|
|
1920
2177
|
T::Array[
|
|
1921
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1922
|
-
]
|
|
1923
|
-
type: Symbol
|
|
2178
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::ResourcesUsed::OrHash
|
|
2179
|
+
]
|
|
1924
2180
|
).returns(T.attached_class)
|
|
1925
2181
|
end
|
|
1926
2182
|
def self.new(
|
|
@@ -1929,6 +2185,7 @@ module SafetyKit
|
|
|
1929
2185
|
event_name:,
|
|
1930
2186
|
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
1931
2187
|
timestamp:,
|
|
2188
|
+
type:,
|
|
1932
2189
|
# Your stable canonical identifier for the user or account.
|
|
1933
2190
|
user_id:,
|
|
1934
2191
|
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
@@ -1938,11 +2195,13 @@ module SafetyKit
|
|
|
1938
2195
|
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
1939
2196
|
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
1940
2197
|
metadata: nil,
|
|
2198
|
+
# Stable, typed account-level facts SafetyKit can use in rules and aggregate
|
|
2199
|
+
# analysis.
|
|
2200
|
+
properties: nil,
|
|
1941
2201
|
# Reusable resources observed during the event. Use this for emails, phone
|
|
1942
2202
|
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
1943
2203
|
# identifiers.
|
|
1944
|
-
resources_used: nil
|
|
1945
|
-
type: :update_account
|
|
2204
|
+
resources_used: nil
|
|
1946
2205
|
)
|
|
1947
2206
|
end
|
|
1948
2207
|
|
|
@@ -1951,23 +2210,26 @@ module SafetyKit
|
|
|
1951
2210
|
{
|
|
1952
2211
|
event_name: String,
|
|
1953
2212
|
timestamp: Time,
|
|
1954
|
-
type:
|
|
2213
|
+
type:
|
|
2214
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Type::OrSymbol,
|
|
1955
2215
|
user_id: String,
|
|
1956
2216
|
content:
|
|
1957
2217
|
T::Array[
|
|
1958
2218
|
T.any(
|
|
1959
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1960
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2219
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent,
|
|
2220
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent
|
|
1961
2221
|
)
|
|
1962
2222
|
],
|
|
1963
2223
|
metadata:
|
|
1964
2224
|
T::Hash[
|
|
1965
2225
|
Symbol,
|
|
1966
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2226
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Metadata::Variants
|
|
1967
2227
|
],
|
|
2228
|
+
properties:
|
|
2229
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Properties,
|
|
1968
2230
|
resources_used:
|
|
1969
2231
|
T::Array[
|
|
1970
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2232
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::ResourcesUsed
|
|
1971
2233
|
]
|
|
1972
2234
|
}
|
|
1973
2235
|
)
|
|
@@ -1975,6 +2237,35 @@ module SafetyKit
|
|
|
1975
2237
|
def to_hash
|
|
1976
2238
|
end
|
|
1977
2239
|
|
|
2240
|
+
module Type
|
|
2241
|
+
extend SafetyKit::Internal::Type::Enum
|
|
2242
|
+
|
|
2243
|
+
TaggedSymbol =
|
|
2244
|
+
T.type_alias do
|
|
2245
|
+
T.all(
|
|
2246
|
+
Symbol,
|
|
2247
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Type
|
|
2248
|
+
)
|
|
2249
|
+
end
|
|
2250
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2251
|
+
|
|
2252
|
+
UPDATE_ACCOUNT =
|
|
2253
|
+
T.let(
|
|
2254
|
+
:update_account,
|
|
2255
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Type::TaggedSymbol
|
|
2256
|
+
)
|
|
2257
|
+
|
|
2258
|
+
sig do
|
|
2259
|
+
override.returns(
|
|
2260
|
+
T::Array[
|
|
2261
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Type::TaggedSymbol
|
|
2262
|
+
]
|
|
2263
|
+
)
|
|
2264
|
+
end
|
|
2265
|
+
def self.values
|
|
2266
|
+
end
|
|
2267
|
+
end
|
|
2268
|
+
|
|
1978
2269
|
# User-authored text content associated with an event.
|
|
1979
2270
|
module Content
|
|
1980
2271
|
extend SafetyKit::Internal::Type::Union
|
|
@@ -1982,8 +2273,8 @@ module SafetyKit
|
|
|
1982
2273
|
Variants =
|
|
1983
2274
|
T.type_alias do
|
|
1984
2275
|
T.any(
|
|
1985
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1986
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2276
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent,
|
|
2277
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent
|
|
1987
2278
|
)
|
|
1988
2279
|
end
|
|
1989
2280
|
|
|
@@ -1991,7 +2282,7 @@ module SafetyKit
|
|
|
1991
2282
|
OrHash =
|
|
1992
2283
|
T.type_alias do
|
|
1993
2284
|
T.any(
|
|
1994
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2285
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent,
|
|
1995
2286
|
SafetyKit::Internal::AnyHash
|
|
1996
2287
|
)
|
|
1997
2288
|
end
|
|
@@ -2003,7 +2294,7 @@ module SafetyKit
|
|
|
2003
2294
|
# Text content part.
|
|
2004
2295
|
sig do
|
|
2005
2296
|
returns(
|
|
2006
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2297
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent::Type::OrSymbol
|
|
2007
2298
|
)
|
|
2008
2299
|
end
|
|
2009
2300
|
attr_accessor :type
|
|
@@ -2020,7 +2311,7 @@ module SafetyKit
|
|
|
2020
2311
|
params(
|
|
2021
2312
|
text: String,
|
|
2022
2313
|
type:
|
|
2023
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2314
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent::Type::OrSymbol,
|
|
2024
2315
|
key: String
|
|
2025
2316
|
).returns(T.attached_class)
|
|
2026
2317
|
end
|
|
@@ -2039,7 +2330,7 @@ module SafetyKit
|
|
|
2039
2330
|
{
|
|
2040
2331
|
text: String,
|
|
2041
2332
|
type:
|
|
2042
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2333
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent::Type::OrSymbol,
|
|
2043
2334
|
key: String
|
|
2044
2335
|
}
|
|
2045
2336
|
)
|
|
@@ -2055,7 +2346,7 @@ module SafetyKit
|
|
|
2055
2346
|
T.type_alias do
|
|
2056
2347
|
T.all(
|
|
2057
2348
|
Symbol,
|
|
2058
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2349
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent::Type
|
|
2059
2350
|
)
|
|
2060
2351
|
end
|
|
2061
2352
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -2063,13 +2354,13 @@ module SafetyKit
|
|
|
2063
2354
|
TEXT =
|
|
2064
2355
|
T.let(
|
|
2065
2356
|
:text,
|
|
2066
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2357
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent::Type::TaggedSymbol
|
|
2067
2358
|
)
|
|
2068
2359
|
|
|
2069
2360
|
sig do
|
|
2070
2361
|
override.returns(
|
|
2071
2362
|
T::Array[
|
|
2072
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2363
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent::Type::TaggedSymbol
|
|
2073
2364
|
]
|
|
2074
2365
|
)
|
|
2075
2366
|
end
|
|
@@ -2082,7 +2373,7 @@ module SafetyKit
|
|
|
2082
2373
|
OrHash =
|
|
2083
2374
|
T.type_alias do
|
|
2084
2375
|
T.any(
|
|
2085
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2376
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent,
|
|
2086
2377
|
SafetyKit::Internal::AnyHash
|
|
2087
2378
|
)
|
|
2088
2379
|
end
|
|
@@ -2090,7 +2381,7 @@ module SafetyKit
|
|
|
2090
2381
|
# Image source information.
|
|
2091
2382
|
sig do
|
|
2092
2383
|
returns(
|
|
2093
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2384
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source
|
|
2094
2385
|
)
|
|
2095
2386
|
end
|
|
2096
2387
|
attr_reader :source
|
|
@@ -2098,7 +2389,7 @@ module SafetyKit
|
|
|
2098
2389
|
sig do
|
|
2099
2390
|
params(
|
|
2100
2391
|
source:
|
|
2101
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2392
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source::OrHash
|
|
2102
2393
|
).void
|
|
2103
2394
|
end
|
|
2104
2395
|
attr_writer :source
|
|
@@ -2106,7 +2397,7 @@ module SafetyKit
|
|
|
2106
2397
|
# Image content part.
|
|
2107
2398
|
sig do
|
|
2108
2399
|
returns(
|
|
2109
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2400
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Type::OrSymbol
|
|
2110
2401
|
)
|
|
2111
2402
|
end
|
|
2112
2403
|
attr_accessor :type
|
|
@@ -2122,9 +2413,9 @@ module SafetyKit
|
|
|
2122
2413
|
sig do
|
|
2123
2414
|
params(
|
|
2124
2415
|
source:
|
|
2125
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2416
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source::OrHash,
|
|
2126
2417
|
type:
|
|
2127
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2418
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Type::OrSymbol,
|
|
2128
2419
|
key: String
|
|
2129
2420
|
).returns(T.attached_class)
|
|
2130
2421
|
end
|
|
@@ -2142,9 +2433,9 @@ module SafetyKit
|
|
|
2142
2433
|
override.returns(
|
|
2143
2434
|
{
|
|
2144
2435
|
source:
|
|
2145
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2436
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source,
|
|
2146
2437
|
type:
|
|
2147
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2438
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Type::OrSymbol,
|
|
2148
2439
|
key: String
|
|
2149
2440
|
}
|
|
2150
2441
|
)
|
|
@@ -2156,7 +2447,7 @@ module SafetyKit
|
|
|
2156
2447
|
OrHash =
|
|
2157
2448
|
T.type_alias do
|
|
2158
2449
|
T.any(
|
|
2159
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2450
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source,
|
|
2160
2451
|
SafetyKit::Internal::AnyHash
|
|
2161
2452
|
)
|
|
2162
2453
|
end
|
|
@@ -2164,7 +2455,7 @@ module SafetyKit
|
|
|
2164
2455
|
# URL image source.
|
|
2165
2456
|
sig do
|
|
2166
2457
|
returns(
|
|
2167
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2458
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source::Type::OrSymbol
|
|
2168
2459
|
)
|
|
2169
2460
|
end
|
|
2170
2461
|
attr_accessor :type
|
|
@@ -2177,7 +2468,7 @@ module SafetyKit
|
|
|
2177
2468
|
sig do
|
|
2178
2469
|
params(
|
|
2179
2470
|
type:
|
|
2180
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2471
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source::Type::OrSymbol,
|
|
2181
2472
|
url: String
|
|
2182
2473
|
).returns(T.attached_class)
|
|
2183
2474
|
end
|
|
@@ -2193,7 +2484,7 @@ module SafetyKit
|
|
|
2193
2484
|
override.returns(
|
|
2194
2485
|
{
|
|
2195
2486
|
type:
|
|
2196
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2487
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source::Type::OrSymbol,
|
|
2197
2488
|
url: String
|
|
2198
2489
|
}
|
|
2199
2490
|
)
|
|
@@ -2209,7 +2500,7 @@ module SafetyKit
|
|
|
2209
2500
|
T.type_alias do
|
|
2210
2501
|
T.all(
|
|
2211
2502
|
Symbol,
|
|
2212
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2503
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source::Type
|
|
2213
2504
|
)
|
|
2214
2505
|
end
|
|
2215
2506
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -2217,13 +2508,13 @@ module SafetyKit
|
|
|
2217
2508
|
URL =
|
|
2218
2509
|
T.let(
|
|
2219
2510
|
:url,
|
|
2220
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2511
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
2221
2512
|
)
|
|
2222
2513
|
|
|
2223
2514
|
sig do
|
|
2224
2515
|
override.returns(
|
|
2225
2516
|
T::Array[
|
|
2226
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2517
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
2227
2518
|
]
|
|
2228
2519
|
)
|
|
2229
2520
|
end
|
|
@@ -2240,7 +2531,7 @@ module SafetyKit
|
|
|
2240
2531
|
T.type_alias do
|
|
2241
2532
|
T.all(
|
|
2242
2533
|
Symbol,
|
|
2243
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2534
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Type
|
|
2244
2535
|
)
|
|
2245
2536
|
end
|
|
2246
2537
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -2248,13 +2539,13 @@ module SafetyKit
|
|
|
2248
2539
|
IMAGE =
|
|
2249
2540
|
T.let(
|
|
2250
2541
|
:image,
|
|
2251
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2542
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Type::TaggedSymbol
|
|
2252
2543
|
)
|
|
2253
2544
|
|
|
2254
2545
|
sig do
|
|
2255
2546
|
override.returns(
|
|
2256
2547
|
T::Array[
|
|
2257
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2548
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Type::TaggedSymbol
|
|
2258
2549
|
]
|
|
2259
2550
|
)
|
|
2260
2551
|
end
|
|
@@ -2266,7 +2557,7 @@ module SafetyKit
|
|
|
2266
2557
|
sig do
|
|
2267
2558
|
override.returns(
|
|
2268
2559
|
T::Array[
|
|
2269
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2560
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::Variants
|
|
2270
2561
|
]
|
|
2271
2562
|
)
|
|
2272
2563
|
end
|
|
@@ -2284,7 +2575,7 @@ module SafetyKit
|
|
|
2284
2575
|
Float,
|
|
2285
2576
|
T::Boolean,
|
|
2286
2577
|
T::Array[
|
|
2287
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2578
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Metadata::UnionMember3::Variants
|
|
2288
2579
|
]
|
|
2289
2580
|
)
|
|
2290
2581
|
end
|
|
@@ -2297,7 +2588,7 @@ module SafetyKit
|
|
|
2297
2588
|
sig do
|
|
2298
2589
|
override.returns(
|
|
2299
2590
|
T::Array[
|
|
2300
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2591
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Metadata::UnionMember3::Variants
|
|
2301
2592
|
]
|
|
2302
2593
|
)
|
|
2303
2594
|
end
|
|
@@ -2308,7 +2599,7 @@ module SafetyKit
|
|
|
2308
2599
|
sig do
|
|
2309
2600
|
override.returns(
|
|
2310
2601
|
T::Array[
|
|
2311
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2602
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Metadata::Variants
|
|
2312
2603
|
]
|
|
2313
2604
|
)
|
|
2314
2605
|
end
|
|
@@ -2319,17 +2610,90 @@ module SafetyKit
|
|
|
2319
2610
|
T.let(
|
|
2320
2611
|
SafetyKit::Internal::Type::ArrayOf[
|
|
2321
2612
|
union:
|
|
2322
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2613
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Metadata::UnionMember3
|
|
2323
2614
|
],
|
|
2324
2615
|
SafetyKit::Internal::Type::Converter
|
|
2325
2616
|
)
|
|
2326
2617
|
end
|
|
2327
2618
|
|
|
2619
|
+
class Properties < SafetyKit::Internal::Type::BaseModel
|
|
2620
|
+
OrHash =
|
|
2621
|
+
T.type_alias do
|
|
2622
|
+
T.any(
|
|
2623
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Properties,
|
|
2624
|
+
SafetyKit::Internal::AnyHash
|
|
2625
|
+
)
|
|
2626
|
+
end
|
|
2627
|
+
|
|
2628
|
+
# Current account lifecycle or moderation state.
|
|
2629
|
+
sig { returns(T.nilable(String)) }
|
|
2630
|
+
attr_reader :account_state
|
|
2631
|
+
|
|
2632
|
+
sig { params(account_state: String).void }
|
|
2633
|
+
attr_writer :account_state
|
|
2634
|
+
|
|
2635
|
+
# Stable account categories in your product.
|
|
2636
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
2637
|
+
attr_reader :account_types
|
|
2638
|
+
|
|
2639
|
+
sig { params(account_types: T::Array[String]).void }
|
|
2640
|
+
attr_writer :account_types
|
|
2641
|
+
|
|
2642
|
+
# Country associated with the account.
|
|
2643
|
+
sig { returns(T.nilable(String)) }
|
|
2644
|
+
attr_reader :country
|
|
2645
|
+
|
|
2646
|
+
sig { params(country: String).void }
|
|
2647
|
+
attr_writer :country
|
|
2648
|
+
|
|
2649
|
+
# Whether the account's email address has been verified.
|
|
2650
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
2651
|
+
attr_reader :email_verified
|
|
2652
|
+
|
|
2653
|
+
sig { params(email_verified: T::Boolean).void }
|
|
2654
|
+
attr_writer :email_verified
|
|
2655
|
+
|
|
2656
|
+
# Stable, typed account-level facts SafetyKit can use in rules and aggregate
|
|
2657
|
+
# analysis.
|
|
2658
|
+
sig do
|
|
2659
|
+
params(
|
|
2660
|
+
account_state: String,
|
|
2661
|
+
account_types: T::Array[String],
|
|
2662
|
+
country: String,
|
|
2663
|
+
email_verified: T::Boolean
|
|
2664
|
+
).returns(T.attached_class)
|
|
2665
|
+
end
|
|
2666
|
+
def self.new(
|
|
2667
|
+
# Current account lifecycle or moderation state.
|
|
2668
|
+
account_state: nil,
|
|
2669
|
+
# Stable account categories in your product.
|
|
2670
|
+
account_types: nil,
|
|
2671
|
+
# Country associated with the account.
|
|
2672
|
+
country: nil,
|
|
2673
|
+
# Whether the account's email address has been verified.
|
|
2674
|
+
email_verified: nil
|
|
2675
|
+
)
|
|
2676
|
+
end
|
|
2677
|
+
|
|
2678
|
+
sig do
|
|
2679
|
+
override.returns(
|
|
2680
|
+
{
|
|
2681
|
+
account_state: String,
|
|
2682
|
+
account_types: T::Array[String],
|
|
2683
|
+
country: String,
|
|
2684
|
+
email_verified: T::Boolean
|
|
2685
|
+
}
|
|
2686
|
+
)
|
|
2687
|
+
end
|
|
2688
|
+
def to_hash
|
|
2689
|
+
end
|
|
2690
|
+
end
|
|
2691
|
+
|
|
2328
2692
|
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
2329
2693
|
OrHash =
|
|
2330
2694
|
T.type_alias do
|
|
2331
2695
|
T.any(
|
|
2332
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2696
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::ResourcesUsed,
|
|
2333
2697
|
SafetyKit::Internal::AnyHash
|
|
2334
2698
|
)
|
|
2335
2699
|
end
|
|
@@ -2340,7 +2704,7 @@ module SafetyKit
|
|
|
2340
2704
|
attr_accessor :type
|
|
2341
2705
|
|
|
2342
2706
|
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
2343
|
-
# value, not the raw value.
|
|
2707
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
2344
2708
|
sig { returns(String) }
|
|
2345
2709
|
attr_accessor :value
|
|
2346
2710
|
|
|
@@ -2354,7 +2718,7 @@ module SafetyKit
|
|
|
2354
2718
|
# youtube, linkedin, or another stable snake_case identifier.
|
|
2355
2719
|
type:,
|
|
2356
2720
|
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
2357
|
-
# value, not the raw value.
|
|
2721
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
2358
2722
|
value:
|
|
2359
2723
|
)
|
|
2360
2724
|
end
|
|
@@ -2365,13 +2729,2524 @@ module SafetyKit
|
|
|
2365
2729
|
end
|
|
2366
2730
|
end
|
|
2367
2731
|
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2732
|
+
# A user contacts, transacts with, or otherwise interacts with another user.
|
|
2733
|
+
module UnionMember4
|
|
2734
|
+
extend SafetyKit::Internal::Type::Union
|
|
2735
|
+
|
|
2736
|
+
Variants =
|
|
2737
|
+
T.type_alias do
|
|
2738
|
+
T.any(
|
|
2739
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact,
|
|
2740
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded,
|
|
2741
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount,
|
|
2742
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount
|
|
2743
|
+
)
|
|
2744
|
+
end
|
|
2745
|
+
|
|
2746
|
+
class UserContact < SafetyKit::Internal::Type::BaseModel
|
|
2747
|
+
OrHash =
|
|
2748
|
+
T.type_alias do
|
|
2749
|
+
T.any(
|
|
2750
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact,
|
|
2751
|
+
SafetyKit::Internal::AnyHash
|
|
2752
|
+
)
|
|
2753
|
+
end
|
|
2754
|
+
|
|
2755
|
+
# Your stable canonical identifier for the other user in a user-to-user
|
|
2756
|
+
# interaction.
|
|
2757
|
+
sig { returns(String) }
|
|
2758
|
+
attr_accessor :counterparty_user_id
|
|
2759
|
+
|
|
2760
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
2761
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
2762
|
+
sig { returns(String) }
|
|
2763
|
+
attr_accessor :event_name
|
|
2764
|
+
|
|
2765
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
2766
|
+
sig { returns(Time) }
|
|
2767
|
+
attr_accessor :timestamp
|
|
2768
|
+
|
|
2769
|
+
sig { returns(Symbol) }
|
|
2770
|
+
attr_accessor :type
|
|
2771
|
+
|
|
2772
|
+
# Your stable canonical identifier for the user or account.
|
|
2773
|
+
sig { returns(String) }
|
|
2774
|
+
attr_accessor :user_id
|
|
2775
|
+
|
|
2776
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
2777
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
2778
|
+
# analyze.
|
|
2779
|
+
sig do
|
|
2780
|
+
returns(
|
|
2781
|
+
T.nilable(
|
|
2782
|
+
T::Array[
|
|
2783
|
+
T.any(
|
|
2784
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent,
|
|
2785
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent
|
|
2786
|
+
)
|
|
2787
|
+
]
|
|
2788
|
+
)
|
|
2789
|
+
)
|
|
2790
|
+
end
|
|
2791
|
+
attr_reader :content
|
|
2792
|
+
|
|
2793
|
+
sig do
|
|
2794
|
+
params(
|
|
2795
|
+
content:
|
|
2796
|
+
T::Array[
|
|
2797
|
+
T.any(
|
|
2798
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent::OrHash,
|
|
2799
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::OrHash
|
|
2800
|
+
)
|
|
2801
|
+
]
|
|
2802
|
+
).void
|
|
2803
|
+
end
|
|
2804
|
+
attr_writer :content
|
|
2805
|
+
|
|
2806
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
2807
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
2808
|
+
sig do
|
|
2809
|
+
returns(
|
|
2810
|
+
T.nilable(
|
|
2811
|
+
T::Hash[
|
|
2812
|
+
Symbol,
|
|
2813
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Metadata::Variants
|
|
2814
|
+
]
|
|
2815
|
+
)
|
|
2816
|
+
)
|
|
2817
|
+
end
|
|
2818
|
+
attr_reader :metadata
|
|
2819
|
+
|
|
2820
|
+
sig do
|
|
2821
|
+
params(
|
|
2822
|
+
metadata:
|
|
2823
|
+
T::Hash[
|
|
2824
|
+
Symbol,
|
|
2825
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Metadata::Variants
|
|
2826
|
+
]
|
|
2827
|
+
).void
|
|
2828
|
+
end
|
|
2829
|
+
attr_writer :metadata
|
|
2830
|
+
|
|
2831
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
2832
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
2833
|
+
# identifiers.
|
|
2834
|
+
sig do
|
|
2835
|
+
returns(
|
|
2836
|
+
T.nilable(
|
|
2837
|
+
T::Array[
|
|
2838
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::ResourcesUsed
|
|
2839
|
+
]
|
|
2840
|
+
)
|
|
2841
|
+
)
|
|
2842
|
+
end
|
|
2843
|
+
attr_reader :resources_used
|
|
2844
|
+
|
|
2845
|
+
sig do
|
|
2846
|
+
params(
|
|
2847
|
+
resources_used:
|
|
2848
|
+
T::Array[
|
|
2849
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::ResourcesUsed::OrHash
|
|
2850
|
+
]
|
|
2851
|
+
).void
|
|
2852
|
+
end
|
|
2853
|
+
attr_writer :resources_used
|
|
2854
|
+
|
|
2855
|
+
# A user contacts, transacts with, or otherwise interacts with another user.
|
|
2856
|
+
sig do
|
|
2857
|
+
params(
|
|
2858
|
+
counterparty_user_id: String,
|
|
2859
|
+
event_name: String,
|
|
2860
|
+
timestamp: Time,
|
|
2861
|
+
user_id: String,
|
|
2862
|
+
content:
|
|
2863
|
+
T::Array[
|
|
2864
|
+
T.any(
|
|
2865
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent::OrHash,
|
|
2866
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::OrHash
|
|
2867
|
+
)
|
|
2868
|
+
],
|
|
2869
|
+
metadata:
|
|
2870
|
+
T::Hash[
|
|
2871
|
+
Symbol,
|
|
2872
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Metadata::Variants
|
|
2873
|
+
],
|
|
2874
|
+
resources_used:
|
|
2875
|
+
T::Array[
|
|
2876
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::ResourcesUsed::OrHash
|
|
2877
|
+
],
|
|
2878
|
+
type: Symbol
|
|
2879
|
+
).returns(T.attached_class)
|
|
2880
|
+
end
|
|
2881
|
+
def self.new(
|
|
2882
|
+
# Your stable canonical identifier for the other user in a user-to-user
|
|
2883
|
+
# interaction.
|
|
2884
|
+
counterparty_user_id:,
|
|
2885
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
2886
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
2887
|
+
event_name:,
|
|
2888
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
2889
|
+
timestamp:,
|
|
2890
|
+
# Your stable canonical identifier for the user or account.
|
|
2891
|
+
user_id:,
|
|
2892
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
2893
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
2894
|
+
# analyze.
|
|
2895
|
+
content: nil,
|
|
2896
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
2897
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
2898
|
+
metadata: nil,
|
|
2899
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
2900
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
2901
|
+
# identifiers.
|
|
2902
|
+
resources_used: nil,
|
|
2903
|
+
type: :user_contact
|
|
2904
|
+
)
|
|
2905
|
+
end
|
|
2906
|
+
|
|
2907
|
+
sig do
|
|
2908
|
+
override.returns(
|
|
2909
|
+
{
|
|
2910
|
+
counterparty_user_id: String,
|
|
2911
|
+
event_name: String,
|
|
2912
|
+
timestamp: Time,
|
|
2913
|
+
type: Symbol,
|
|
2914
|
+
user_id: String,
|
|
2915
|
+
content:
|
|
2916
|
+
T::Array[
|
|
2917
|
+
T.any(
|
|
2918
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent,
|
|
2919
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent
|
|
2920
|
+
)
|
|
2921
|
+
],
|
|
2922
|
+
metadata:
|
|
2923
|
+
T::Hash[
|
|
2924
|
+
Symbol,
|
|
2925
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Metadata::Variants
|
|
2926
|
+
],
|
|
2927
|
+
resources_used:
|
|
2928
|
+
T::Array[
|
|
2929
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::ResourcesUsed
|
|
2930
|
+
]
|
|
2931
|
+
}
|
|
2932
|
+
)
|
|
2933
|
+
end
|
|
2934
|
+
def to_hash
|
|
2935
|
+
end
|
|
2936
|
+
|
|
2937
|
+
# User-authored text content associated with an event.
|
|
2938
|
+
module Content
|
|
2939
|
+
extend SafetyKit::Internal::Type::Union
|
|
2940
|
+
|
|
2941
|
+
Variants =
|
|
2942
|
+
T.type_alias do
|
|
2943
|
+
T.any(
|
|
2944
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent,
|
|
2945
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent
|
|
2946
|
+
)
|
|
2947
|
+
end
|
|
2948
|
+
|
|
2949
|
+
class EventTextContent < SafetyKit::Internal::Type::BaseModel
|
|
2950
|
+
OrHash =
|
|
2951
|
+
T.type_alias do
|
|
2952
|
+
T.any(
|
|
2953
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent,
|
|
2954
|
+
SafetyKit::Internal::AnyHash
|
|
2955
|
+
)
|
|
2956
|
+
end
|
|
2957
|
+
|
|
2958
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
2959
|
+
sig { returns(String) }
|
|
2960
|
+
attr_accessor :text
|
|
2961
|
+
|
|
2962
|
+
# Text content part.
|
|
2963
|
+
sig do
|
|
2964
|
+
returns(
|
|
2965
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent::Type::OrSymbol
|
|
2966
|
+
)
|
|
2967
|
+
end
|
|
2968
|
+
attr_accessor :type
|
|
2969
|
+
|
|
2970
|
+
# Stable field key for this content part.
|
|
2971
|
+
sig { returns(T.nilable(String)) }
|
|
2972
|
+
attr_reader :key
|
|
2973
|
+
|
|
2974
|
+
sig { params(key: String).void }
|
|
2975
|
+
attr_writer :key
|
|
2976
|
+
|
|
2977
|
+
# User-authored text content associated with an event.
|
|
2978
|
+
sig do
|
|
2979
|
+
params(
|
|
2980
|
+
text: String,
|
|
2981
|
+
type:
|
|
2982
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent::Type::OrSymbol,
|
|
2983
|
+
key: String
|
|
2984
|
+
).returns(T.attached_class)
|
|
2985
|
+
end
|
|
2986
|
+
def self.new(
|
|
2987
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
2988
|
+
text:,
|
|
2989
|
+
# Text content part.
|
|
2990
|
+
type:,
|
|
2991
|
+
# Stable field key for this content part.
|
|
2992
|
+
key: nil
|
|
2993
|
+
)
|
|
2994
|
+
end
|
|
2995
|
+
|
|
2996
|
+
sig do
|
|
2997
|
+
override.returns(
|
|
2998
|
+
{
|
|
2999
|
+
text: String,
|
|
3000
|
+
type:
|
|
3001
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent::Type::OrSymbol,
|
|
3002
|
+
key: String
|
|
3003
|
+
}
|
|
3004
|
+
)
|
|
3005
|
+
end
|
|
3006
|
+
def to_hash
|
|
3007
|
+
end
|
|
3008
|
+
|
|
3009
|
+
# Text content part.
|
|
3010
|
+
module Type
|
|
3011
|
+
extend SafetyKit::Internal::Type::Enum
|
|
3012
|
+
|
|
3013
|
+
TaggedSymbol =
|
|
3014
|
+
T.type_alias do
|
|
3015
|
+
T.all(
|
|
3016
|
+
Symbol,
|
|
3017
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent::Type
|
|
3018
|
+
)
|
|
3019
|
+
end
|
|
3020
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
3021
|
+
|
|
3022
|
+
TEXT =
|
|
3023
|
+
T.let(
|
|
3024
|
+
:text,
|
|
3025
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent::Type::TaggedSymbol
|
|
3026
|
+
)
|
|
3027
|
+
|
|
3028
|
+
sig do
|
|
3029
|
+
override.returns(
|
|
3030
|
+
T::Array[
|
|
3031
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent::Type::TaggedSymbol
|
|
3032
|
+
]
|
|
3033
|
+
)
|
|
3034
|
+
end
|
|
3035
|
+
def self.values
|
|
3036
|
+
end
|
|
3037
|
+
end
|
|
3038
|
+
end
|
|
3039
|
+
|
|
3040
|
+
class EventImageContent < SafetyKit::Internal::Type::BaseModel
|
|
3041
|
+
OrHash =
|
|
3042
|
+
T.type_alias do
|
|
3043
|
+
T.any(
|
|
3044
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent,
|
|
3045
|
+
SafetyKit::Internal::AnyHash
|
|
3046
|
+
)
|
|
3047
|
+
end
|
|
3048
|
+
|
|
3049
|
+
# Image source information.
|
|
3050
|
+
sig do
|
|
3051
|
+
returns(
|
|
3052
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source
|
|
3053
|
+
)
|
|
3054
|
+
end
|
|
3055
|
+
attr_reader :source
|
|
3056
|
+
|
|
3057
|
+
sig do
|
|
3058
|
+
params(
|
|
3059
|
+
source:
|
|
3060
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source::OrHash
|
|
3061
|
+
).void
|
|
3062
|
+
end
|
|
3063
|
+
attr_writer :source
|
|
3064
|
+
|
|
3065
|
+
# Image content part.
|
|
3066
|
+
sig do
|
|
3067
|
+
returns(
|
|
3068
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Type::OrSymbol
|
|
3069
|
+
)
|
|
3070
|
+
end
|
|
3071
|
+
attr_accessor :type
|
|
3072
|
+
|
|
3073
|
+
# Stable field key for this content part.
|
|
3074
|
+
sig { returns(T.nilable(String)) }
|
|
3075
|
+
attr_reader :key
|
|
3076
|
+
|
|
3077
|
+
sig { params(key: String).void }
|
|
3078
|
+
attr_writer :key
|
|
3079
|
+
|
|
3080
|
+
# User-uploaded image content associated with an event.
|
|
3081
|
+
sig do
|
|
3082
|
+
params(
|
|
3083
|
+
source:
|
|
3084
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source::OrHash,
|
|
3085
|
+
type:
|
|
3086
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Type::OrSymbol,
|
|
3087
|
+
key: String
|
|
3088
|
+
).returns(T.attached_class)
|
|
3089
|
+
end
|
|
3090
|
+
def self.new(
|
|
3091
|
+
# Image source information.
|
|
3092
|
+
source:,
|
|
3093
|
+
# Image content part.
|
|
3094
|
+
type:,
|
|
3095
|
+
# Stable field key for this content part.
|
|
3096
|
+
key: nil
|
|
3097
|
+
)
|
|
3098
|
+
end
|
|
3099
|
+
|
|
3100
|
+
sig do
|
|
3101
|
+
override.returns(
|
|
3102
|
+
{
|
|
3103
|
+
source:
|
|
3104
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source,
|
|
3105
|
+
type:
|
|
3106
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Type::OrSymbol,
|
|
3107
|
+
key: String
|
|
3108
|
+
}
|
|
3109
|
+
)
|
|
3110
|
+
end
|
|
3111
|
+
def to_hash
|
|
3112
|
+
end
|
|
3113
|
+
|
|
3114
|
+
class Source < SafetyKit::Internal::Type::BaseModel
|
|
3115
|
+
OrHash =
|
|
3116
|
+
T.type_alias do
|
|
3117
|
+
T.any(
|
|
3118
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source,
|
|
3119
|
+
SafetyKit::Internal::AnyHash
|
|
3120
|
+
)
|
|
3121
|
+
end
|
|
3122
|
+
|
|
3123
|
+
# URL image source.
|
|
3124
|
+
sig do
|
|
3125
|
+
returns(
|
|
3126
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source::Type::OrSymbol
|
|
3127
|
+
)
|
|
3128
|
+
end
|
|
3129
|
+
attr_accessor :type
|
|
3130
|
+
|
|
3131
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
3132
|
+
sig { returns(String) }
|
|
3133
|
+
attr_accessor :url
|
|
3134
|
+
|
|
3135
|
+
# Image source information.
|
|
3136
|
+
sig do
|
|
3137
|
+
params(
|
|
3138
|
+
type:
|
|
3139
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source::Type::OrSymbol,
|
|
3140
|
+
url: String
|
|
3141
|
+
).returns(T.attached_class)
|
|
3142
|
+
end
|
|
3143
|
+
def self.new(
|
|
3144
|
+
# URL image source.
|
|
3145
|
+
type:,
|
|
3146
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
3147
|
+
url:
|
|
3148
|
+
)
|
|
3149
|
+
end
|
|
3150
|
+
|
|
3151
|
+
sig do
|
|
3152
|
+
override.returns(
|
|
3153
|
+
{
|
|
3154
|
+
type:
|
|
3155
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source::Type::OrSymbol,
|
|
3156
|
+
url: String
|
|
3157
|
+
}
|
|
3158
|
+
)
|
|
3159
|
+
end
|
|
3160
|
+
def to_hash
|
|
3161
|
+
end
|
|
3162
|
+
|
|
3163
|
+
# URL image source.
|
|
3164
|
+
module Type
|
|
3165
|
+
extend SafetyKit::Internal::Type::Enum
|
|
3166
|
+
|
|
3167
|
+
TaggedSymbol =
|
|
3168
|
+
T.type_alias do
|
|
3169
|
+
T.all(
|
|
3170
|
+
Symbol,
|
|
3171
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source::Type
|
|
3172
|
+
)
|
|
3173
|
+
end
|
|
3174
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
3175
|
+
|
|
3176
|
+
URL =
|
|
3177
|
+
T.let(
|
|
3178
|
+
:url,
|
|
3179
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
3180
|
+
)
|
|
3181
|
+
|
|
3182
|
+
sig do
|
|
3183
|
+
override.returns(
|
|
3184
|
+
T::Array[
|
|
3185
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
3186
|
+
]
|
|
3187
|
+
)
|
|
3188
|
+
end
|
|
3189
|
+
def self.values
|
|
3190
|
+
end
|
|
3191
|
+
end
|
|
3192
|
+
end
|
|
3193
|
+
|
|
3194
|
+
# Image content part.
|
|
3195
|
+
module Type
|
|
3196
|
+
extend SafetyKit::Internal::Type::Enum
|
|
3197
|
+
|
|
3198
|
+
TaggedSymbol =
|
|
3199
|
+
T.type_alias do
|
|
3200
|
+
T.all(
|
|
3201
|
+
Symbol,
|
|
3202
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Type
|
|
3203
|
+
)
|
|
3204
|
+
end
|
|
3205
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
3206
|
+
|
|
3207
|
+
IMAGE =
|
|
3208
|
+
T.let(
|
|
3209
|
+
:image,
|
|
3210
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Type::TaggedSymbol
|
|
3211
|
+
)
|
|
3212
|
+
|
|
3213
|
+
sig do
|
|
3214
|
+
override.returns(
|
|
3215
|
+
T::Array[
|
|
3216
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Type::TaggedSymbol
|
|
3217
|
+
]
|
|
3218
|
+
)
|
|
3219
|
+
end
|
|
3220
|
+
def self.values
|
|
3221
|
+
end
|
|
3222
|
+
end
|
|
3223
|
+
end
|
|
3224
|
+
|
|
3225
|
+
sig do
|
|
3226
|
+
override.returns(
|
|
3227
|
+
T::Array[
|
|
3228
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::Variants
|
|
3229
|
+
]
|
|
3230
|
+
)
|
|
3231
|
+
end
|
|
3232
|
+
def self.variants
|
|
3233
|
+
end
|
|
3234
|
+
end
|
|
3235
|
+
|
|
3236
|
+
module Metadata
|
|
3237
|
+
extend SafetyKit::Internal::Type::Union
|
|
3238
|
+
|
|
3239
|
+
Variants =
|
|
3240
|
+
T.type_alias do
|
|
3241
|
+
T.any(
|
|
3242
|
+
String,
|
|
3243
|
+
Float,
|
|
3244
|
+
T::Boolean,
|
|
3245
|
+
T::Array[
|
|
3246
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Metadata::UnionMember3::Variants
|
|
3247
|
+
]
|
|
3248
|
+
)
|
|
3249
|
+
end
|
|
3250
|
+
|
|
3251
|
+
module UnionMember3
|
|
3252
|
+
extend SafetyKit::Internal::Type::Union
|
|
3253
|
+
|
|
3254
|
+
Variants = T.type_alias { T.any(String, Float, T::Boolean) }
|
|
3255
|
+
|
|
3256
|
+
sig do
|
|
3257
|
+
override.returns(
|
|
3258
|
+
T::Array[
|
|
3259
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Metadata::UnionMember3::Variants
|
|
3260
|
+
]
|
|
3261
|
+
)
|
|
3262
|
+
end
|
|
3263
|
+
def self.variants
|
|
3264
|
+
end
|
|
3265
|
+
end
|
|
3266
|
+
|
|
3267
|
+
sig do
|
|
3268
|
+
override.returns(
|
|
3269
|
+
T::Array[
|
|
3270
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Metadata::Variants
|
|
3271
|
+
]
|
|
3272
|
+
)
|
|
3273
|
+
end
|
|
3274
|
+
def self.variants
|
|
3275
|
+
end
|
|
3276
|
+
|
|
3277
|
+
UnionMember3Array =
|
|
3278
|
+
T.let(
|
|
3279
|
+
SafetyKit::Internal::Type::ArrayOf[
|
|
3280
|
+
union:
|
|
3281
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Metadata::UnionMember3
|
|
3282
|
+
],
|
|
3283
|
+
SafetyKit::Internal::Type::Converter
|
|
3284
|
+
)
|
|
3285
|
+
end
|
|
3286
|
+
|
|
3287
|
+
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
3288
|
+
OrHash =
|
|
3289
|
+
T.type_alias do
|
|
3290
|
+
T.any(
|
|
3291
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::ResourcesUsed,
|
|
3292
|
+
SafetyKit::Internal::AnyHash
|
|
3293
|
+
)
|
|
3294
|
+
end
|
|
3295
|
+
|
|
3296
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
3297
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
3298
|
+
sig { returns(String) }
|
|
3299
|
+
attr_accessor :type
|
|
3300
|
+
|
|
3301
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
3302
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
3303
|
+
sig { returns(String) }
|
|
3304
|
+
attr_accessor :value
|
|
3305
|
+
|
|
3306
|
+
# Real-world or account resource used during the event, such as an email, phone
|
|
3307
|
+
# number, address, URL, social handle, or payment identifier.
|
|
3308
|
+
sig do
|
|
3309
|
+
params(type: String, value: String).returns(T.attached_class)
|
|
3310
|
+
end
|
|
3311
|
+
def self.new(
|
|
3312
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
3313
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
3314
|
+
type:,
|
|
3315
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
3316
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
3317
|
+
value:
|
|
3318
|
+
)
|
|
3319
|
+
end
|
|
3320
|
+
|
|
3321
|
+
sig { override.returns({ type: String, value: String }) }
|
|
3322
|
+
def to_hash
|
|
3323
|
+
end
|
|
3324
|
+
end
|
|
3325
|
+
end
|
|
3326
|
+
|
|
3327
|
+
class ContentUploaded < SafetyKit::Internal::Type::BaseModel
|
|
3328
|
+
OrHash =
|
|
3329
|
+
T.type_alias do
|
|
3330
|
+
T.any(
|
|
3331
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded,
|
|
3332
|
+
SafetyKit::Internal::AnyHash
|
|
3333
|
+
)
|
|
3334
|
+
end
|
|
3335
|
+
|
|
3336
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
3337
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
3338
|
+
# analyze.
|
|
3339
|
+
sig do
|
|
3340
|
+
returns(
|
|
3341
|
+
T::Array[
|
|
3342
|
+
T.any(
|
|
3343
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent,
|
|
3344
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent
|
|
3345
|
+
)
|
|
3346
|
+
]
|
|
3347
|
+
)
|
|
3348
|
+
end
|
|
3349
|
+
attr_accessor :content
|
|
3350
|
+
|
|
3351
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
3352
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
3353
|
+
sig { returns(String) }
|
|
3354
|
+
attr_accessor :event_name
|
|
3355
|
+
|
|
3356
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
3357
|
+
sig { returns(Time) }
|
|
3358
|
+
attr_accessor :timestamp
|
|
3359
|
+
|
|
3360
|
+
sig { returns(Symbol) }
|
|
3361
|
+
attr_accessor :type
|
|
3362
|
+
|
|
3363
|
+
# Your stable canonical identifier for the user or account.
|
|
3364
|
+
sig { returns(String) }
|
|
3365
|
+
attr_accessor :user_id
|
|
3366
|
+
|
|
3367
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
3368
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
3369
|
+
sig do
|
|
3370
|
+
returns(
|
|
3371
|
+
T.nilable(
|
|
3372
|
+
T::Hash[
|
|
3373
|
+
Symbol,
|
|
3374
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Metadata::Variants
|
|
3375
|
+
]
|
|
3376
|
+
)
|
|
3377
|
+
)
|
|
3378
|
+
end
|
|
3379
|
+
attr_reader :metadata
|
|
3380
|
+
|
|
3381
|
+
sig do
|
|
3382
|
+
params(
|
|
3383
|
+
metadata:
|
|
3384
|
+
T::Hash[
|
|
3385
|
+
Symbol,
|
|
3386
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Metadata::Variants
|
|
3387
|
+
]
|
|
3388
|
+
).void
|
|
3389
|
+
end
|
|
3390
|
+
attr_writer :metadata
|
|
3391
|
+
|
|
3392
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
3393
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
3394
|
+
# identifiers.
|
|
3395
|
+
sig do
|
|
3396
|
+
returns(
|
|
3397
|
+
T.nilable(
|
|
3398
|
+
T::Array[
|
|
3399
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::ResourcesUsed
|
|
3400
|
+
]
|
|
3401
|
+
)
|
|
3402
|
+
)
|
|
3403
|
+
end
|
|
3404
|
+
attr_reader :resources_used
|
|
3405
|
+
|
|
3406
|
+
sig do
|
|
3407
|
+
params(
|
|
3408
|
+
resources_used:
|
|
3409
|
+
T::Array[
|
|
3410
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::ResourcesUsed::OrHash
|
|
3411
|
+
]
|
|
3412
|
+
).void
|
|
3413
|
+
end
|
|
3414
|
+
attr_writer :resources_used
|
|
3415
|
+
|
|
3416
|
+
# A user posts, uploads, publishes, edits, or replaces content.
|
|
3417
|
+
sig do
|
|
3418
|
+
params(
|
|
3419
|
+
content:
|
|
3420
|
+
T::Array[
|
|
3421
|
+
T.any(
|
|
3422
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent::OrHash,
|
|
3423
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::OrHash
|
|
3424
|
+
)
|
|
3425
|
+
],
|
|
3426
|
+
event_name: String,
|
|
3427
|
+
timestamp: Time,
|
|
3428
|
+
user_id: String,
|
|
3429
|
+
metadata:
|
|
3430
|
+
T::Hash[
|
|
3431
|
+
Symbol,
|
|
3432
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Metadata::Variants
|
|
3433
|
+
],
|
|
3434
|
+
resources_used:
|
|
3435
|
+
T::Array[
|
|
3436
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::ResourcesUsed::OrHash
|
|
3437
|
+
],
|
|
3438
|
+
type: Symbol
|
|
3439
|
+
).returns(T.attached_class)
|
|
3440
|
+
end
|
|
3441
|
+
def self.new(
|
|
3442
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
3443
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
3444
|
+
# analyze.
|
|
3445
|
+
content:,
|
|
3446
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
3447
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
3448
|
+
event_name:,
|
|
3449
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
3450
|
+
timestamp:,
|
|
3451
|
+
# Your stable canonical identifier for the user or account.
|
|
3452
|
+
user_id:,
|
|
3453
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
3454
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
3455
|
+
metadata: nil,
|
|
3456
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
3457
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
3458
|
+
# identifiers.
|
|
3459
|
+
resources_used: nil,
|
|
3460
|
+
type: :content_uploaded
|
|
3461
|
+
)
|
|
3462
|
+
end
|
|
3463
|
+
|
|
3464
|
+
sig do
|
|
3465
|
+
override.returns(
|
|
3466
|
+
{
|
|
3467
|
+
content:
|
|
3468
|
+
T::Array[
|
|
3469
|
+
T.any(
|
|
3470
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent,
|
|
3471
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent
|
|
3472
|
+
)
|
|
3473
|
+
],
|
|
3474
|
+
event_name: String,
|
|
3475
|
+
timestamp: Time,
|
|
3476
|
+
type: Symbol,
|
|
3477
|
+
user_id: String,
|
|
3478
|
+
metadata:
|
|
3479
|
+
T::Hash[
|
|
3480
|
+
Symbol,
|
|
3481
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Metadata::Variants
|
|
3482
|
+
],
|
|
3483
|
+
resources_used:
|
|
3484
|
+
T::Array[
|
|
3485
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::ResourcesUsed
|
|
3486
|
+
]
|
|
3487
|
+
}
|
|
3488
|
+
)
|
|
3489
|
+
end
|
|
3490
|
+
def to_hash
|
|
3491
|
+
end
|
|
3492
|
+
|
|
3493
|
+
# User-authored text content associated with an event.
|
|
3494
|
+
module Content
|
|
3495
|
+
extend SafetyKit::Internal::Type::Union
|
|
3496
|
+
|
|
3497
|
+
Variants =
|
|
3498
|
+
T.type_alias do
|
|
3499
|
+
T.any(
|
|
3500
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent,
|
|
3501
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent
|
|
3502
|
+
)
|
|
3503
|
+
end
|
|
3504
|
+
|
|
3505
|
+
class EventTextContent < SafetyKit::Internal::Type::BaseModel
|
|
3506
|
+
OrHash =
|
|
3507
|
+
T.type_alias do
|
|
3508
|
+
T.any(
|
|
3509
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent,
|
|
3510
|
+
SafetyKit::Internal::AnyHash
|
|
3511
|
+
)
|
|
3512
|
+
end
|
|
3513
|
+
|
|
3514
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
3515
|
+
sig { returns(String) }
|
|
3516
|
+
attr_accessor :text
|
|
3517
|
+
|
|
3518
|
+
# Text content part.
|
|
3519
|
+
sig do
|
|
3520
|
+
returns(
|
|
3521
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent::Type::OrSymbol
|
|
3522
|
+
)
|
|
3523
|
+
end
|
|
3524
|
+
attr_accessor :type
|
|
3525
|
+
|
|
3526
|
+
# Stable field key for this content part.
|
|
3527
|
+
sig { returns(T.nilable(String)) }
|
|
3528
|
+
attr_reader :key
|
|
3529
|
+
|
|
3530
|
+
sig { params(key: String).void }
|
|
3531
|
+
attr_writer :key
|
|
3532
|
+
|
|
3533
|
+
# User-authored text content associated with an event.
|
|
3534
|
+
sig do
|
|
3535
|
+
params(
|
|
3536
|
+
text: String,
|
|
3537
|
+
type:
|
|
3538
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent::Type::OrSymbol,
|
|
3539
|
+
key: String
|
|
3540
|
+
).returns(T.attached_class)
|
|
3541
|
+
end
|
|
3542
|
+
def self.new(
|
|
3543
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
3544
|
+
text:,
|
|
3545
|
+
# Text content part.
|
|
3546
|
+
type:,
|
|
3547
|
+
# Stable field key for this content part.
|
|
3548
|
+
key: nil
|
|
3549
|
+
)
|
|
3550
|
+
end
|
|
3551
|
+
|
|
3552
|
+
sig do
|
|
3553
|
+
override.returns(
|
|
3554
|
+
{
|
|
3555
|
+
text: String,
|
|
3556
|
+
type:
|
|
3557
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent::Type::OrSymbol,
|
|
3558
|
+
key: String
|
|
3559
|
+
}
|
|
3560
|
+
)
|
|
3561
|
+
end
|
|
3562
|
+
def to_hash
|
|
3563
|
+
end
|
|
3564
|
+
|
|
3565
|
+
# Text content part.
|
|
3566
|
+
module Type
|
|
3567
|
+
extend SafetyKit::Internal::Type::Enum
|
|
3568
|
+
|
|
3569
|
+
TaggedSymbol =
|
|
3570
|
+
T.type_alias do
|
|
3571
|
+
T.all(
|
|
3572
|
+
Symbol,
|
|
3573
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent::Type
|
|
3574
|
+
)
|
|
3575
|
+
end
|
|
3576
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
3577
|
+
|
|
3578
|
+
TEXT =
|
|
3579
|
+
T.let(
|
|
3580
|
+
:text,
|
|
3581
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent::Type::TaggedSymbol
|
|
3582
|
+
)
|
|
3583
|
+
|
|
3584
|
+
sig do
|
|
3585
|
+
override.returns(
|
|
3586
|
+
T::Array[
|
|
3587
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent::Type::TaggedSymbol
|
|
3588
|
+
]
|
|
3589
|
+
)
|
|
3590
|
+
end
|
|
3591
|
+
def self.values
|
|
3592
|
+
end
|
|
3593
|
+
end
|
|
3594
|
+
end
|
|
3595
|
+
|
|
3596
|
+
class EventImageContent < SafetyKit::Internal::Type::BaseModel
|
|
3597
|
+
OrHash =
|
|
3598
|
+
T.type_alias do
|
|
3599
|
+
T.any(
|
|
3600
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent,
|
|
3601
|
+
SafetyKit::Internal::AnyHash
|
|
3602
|
+
)
|
|
3603
|
+
end
|
|
3604
|
+
|
|
3605
|
+
# Image source information.
|
|
3606
|
+
sig do
|
|
3607
|
+
returns(
|
|
3608
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source
|
|
3609
|
+
)
|
|
3610
|
+
end
|
|
3611
|
+
attr_reader :source
|
|
3612
|
+
|
|
3613
|
+
sig do
|
|
3614
|
+
params(
|
|
3615
|
+
source:
|
|
3616
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source::OrHash
|
|
3617
|
+
).void
|
|
3618
|
+
end
|
|
3619
|
+
attr_writer :source
|
|
3620
|
+
|
|
3621
|
+
# Image content part.
|
|
3622
|
+
sig do
|
|
3623
|
+
returns(
|
|
3624
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Type::OrSymbol
|
|
3625
|
+
)
|
|
3626
|
+
end
|
|
3627
|
+
attr_accessor :type
|
|
3628
|
+
|
|
3629
|
+
# Stable field key for this content part.
|
|
3630
|
+
sig { returns(T.nilable(String)) }
|
|
3631
|
+
attr_reader :key
|
|
3632
|
+
|
|
3633
|
+
sig { params(key: String).void }
|
|
3634
|
+
attr_writer :key
|
|
3635
|
+
|
|
3636
|
+
# User-uploaded image content associated with an event.
|
|
3637
|
+
sig do
|
|
3638
|
+
params(
|
|
3639
|
+
source:
|
|
3640
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source::OrHash,
|
|
3641
|
+
type:
|
|
3642
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Type::OrSymbol,
|
|
3643
|
+
key: String
|
|
3644
|
+
).returns(T.attached_class)
|
|
3645
|
+
end
|
|
3646
|
+
def self.new(
|
|
3647
|
+
# Image source information.
|
|
3648
|
+
source:,
|
|
3649
|
+
# Image content part.
|
|
3650
|
+
type:,
|
|
3651
|
+
# Stable field key for this content part.
|
|
3652
|
+
key: nil
|
|
3653
|
+
)
|
|
3654
|
+
end
|
|
3655
|
+
|
|
3656
|
+
sig do
|
|
3657
|
+
override.returns(
|
|
3658
|
+
{
|
|
3659
|
+
source:
|
|
3660
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source,
|
|
3661
|
+
type:
|
|
3662
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Type::OrSymbol,
|
|
3663
|
+
key: String
|
|
3664
|
+
}
|
|
3665
|
+
)
|
|
3666
|
+
end
|
|
3667
|
+
def to_hash
|
|
3668
|
+
end
|
|
3669
|
+
|
|
3670
|
+
class Source < SafetyKit::Internal::Type::BaseModel
|
|
3671
|
+
OrHash =
|
|
3672
|
+
T.type_alias do
|
|
3673
|
+
T.any(
|
|
3674
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source,
|
|
3675
|
+
SafetyKit::Internal::AnyHash
|
|
3676
|
+
)
|
|
3677
|
+
end
|
|
3678
|
+
|
|
3679
|
+
# URL image source.
|
|
3680
|
+
sig do
|
|
3681
|
+
returns(
|
|
3682
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source::Type::OrSymbol
|
|
3683
|
+
)
|
|
3684
|
+
end
|
|
3685
|
+
attr_accessor :type
|
|
3686
|
+
|
|
3687
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
3688
|
+
sig { returns(String) }
|
|
3689
|
+
attr_accessor :url
|
|
3690
|
+
|
|
3691
|
+
# Image source information.
|
|
3692
|
+
sig do
|
|
3693
|
+
params(
|
|
3694
|
+
type:
|
|
3695
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source::Type::OrSymbol,
|
|
3696
|
+
url: String
|
|
3697
|
+
).returns(T.attached_class)
|
|
3698
|
+
end
|
|
3699
|
+
def self.new(
|
|
3700
|
+
# URL image source.
|
|
3701
|
+
type:,
|
|
3702
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
3703
|
+
url:
|
|
3704
|
+
)
|
|
3705
|
+
end
|
|
3706
|
+
|
|
3707
|
+
sig do
|
|
3708
|
+
override.returns(
|
|
3709
|
+
{
|
|
3710
|
+
type:
|
|
3711
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source::Type::OrSymbol,
|
|
3712
|
+
url: String
|
|
3713
|
+
}
|
|
3714
|
+
)
|
|
3715
|
+
end
|
|
3716
|
+
def to_hash
|
|
3717
|
+
end
|
|
3718
|
+
|
|
3719
|
+
# URL image source.
|
|
3720
|
+
module Type
|
|
3721
|
+
extend SafetyKit::Internal::Type::Enum
|
|
3722
|
+
|
|
3723
|
+
TaggedSymbol =
|
|
3724
|
+
T.type_alias do
|
|
3725
|
+
T.all(
|
|
3726
|
+
Symbol,
|
|
3727
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source::Type
|
|
3728
|
+
)
|
|
3729
|
+
end
|
|
3730
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
3731
|
+
|
|
3732
|
+
URL =
|
|
3733
|
+
T.let(
|
|
3734
|
+
:url,
|
|
3735
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
3736
|
+
)
|
|
3737
|
+
|
|
3738
|
+
sig do
|
|
3739
|
+
override.returns(
|
|
3740
|
+
T::Array[
|
|
3741
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
3742
|
+
]
|
|
3743
|
+
)
|
|
3744
|
+
end
|
|
3745
|
+
def self.values
|
|
3746
|
+
end
|
|
3747
|
+
end
|
|
3748
|
+
end
|
|
3749
|
+
|
|
3750
|
+
# Image content part.
|
|
3751
|
+
module Type
|
|
3752
|
+
extend SafetyKit::Internal::Type::Enum
|
|
3753
|
+
|
|
3754
|
+
TaggedSymbol =
|
|
3755
|
+
T.type_alias do
|
|
3756
|
+
T.all(
|
|
3757
|
+
Symbol,
|
|
3758
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Type
|
|
3759
|
+
)
|
|
3760
|
+
end
|
|
3761
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
3762
|
+
|
|
3763
|
+
IMAGE =
|
|
3764
|
+
T.let(
|
|
3765
|
+
:image,
|
|
3766
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Type::TaggedSymbol
|
|
3767
|
+
)
|
|
3768
|
+
|
|
3769
|
+
sig do
|
|
3770
|
+
override.returns(
|
|
3771
|
+
T::Array[
|
|
3772
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Type::TaggedSymbol
|
|
3773
|
+
]
|
|
3774
|
+
)
|
|
3775
|
+
end
|
|
3776
|
+
def self.values
|
|
3777
|
+
end
|
|
3778
|
+
end
|
|
3779
|
+
end
|
|
3780
|
+
|
|
3781
|
+
sig do
|
|
3782
|
+
override.returns(
|
|
3783
|
+
T::Array[
|
|
3784
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::Variants
|
|
3785
|
+
]
|
|
3786
|
+
)
|
|
3787
|
+
end
|
|
3788
|
+
def self.variants
|
|
3789
|
+
end
|
|
3790
|
+
end
|
|
3791
|
+
|
|
3792
|
+
module Metadata
|
|
3793
|
+
extend SafetyKit::Internal::Type::Union
|
|
3794
|
+
|
|
3795
|
+
Variants =
|
|
3796
|
+
T.type_alias do
|
|
3797
|
+
T.any(
|
|
3798
|
+
String,
|
|
3799
|
+
Float,
|
|
3800
|
+
T::Boolean,
|
|
3801
|
+
T::Array[
|
|
3802
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Metadata::UnionMember3::Variants
|
|
3803
|
+
]
|
|
3804
|
+
)
|
|
3805
|
+
end
|
|
3806
|
+
|
|
3807
|
+
module UnionMember3
|
|
3808
|
+
extend SafetyKit::Internal::Type::Union
|
|
3809
|
+
|
|
3810
|
+
Variants = T.type_alias { T.any(String, Float, T::Boolean) }
|
|
3811
|
+
|
|
3812
|
+
sig do
|
|
3813
|
+
override.returns(
|
|
3814
|
+
T::Array[
|
|
3815
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Metadata::UnionMember3::Variants
|
|
3816
|
+
]
|
|
3817
|
+
)
|
|
3818
|
+
end
|
|
3819
|
+
def self.variants
|
|
3820
|
+
end
|
|
3821
|
+
end
|
|
3822
|
+
|
|
3823
|
+
sig do
|
|
3824
|
+
override.returns(
|
|
3825
|
+
T::Array[
|
|
3826
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Metadata::Variants
|
|
3827
|
+
]
|
|
3828
|
+
)
|
|
3829
|
+
end
|
|
3830
|
+
def self.variants
|
|
3831
|
+
end
|
|
3832
|
+
|
|
3833
|
+
UnionMember3Array =
|
|
3834
|
+
T.let(
|
|
3835
|
+
SafetyKit::Internal::Type::ArrayOf[
|
|
3836
|
+
union:
|
|
3837
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Metadata::UnionMember3
|
|
3838
|
+
],
|
|
3839
|
+
SafetyKit::Internal::Type::Converter
|
|
3840
|
+
)
|
|
3841
|
+
end
|
|
3842
|
+
|
|
3843
|
+
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
3844
|
+
OrHash =
|
|
3845
|
+
T.type_alias do
|
|
3846
|
+
T.any(
|
|
3847
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::ResourcesUsed,
|
|
3848
|
+
SafetyKit::Internal::AnyHash
|
|
3849
|
+
)
|
|
3850
|
+
end
|
|
3851
|
+
|
|
3852
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
3853
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
3854
|
+
sig { returns(String) }
|
|
3855
|
+
attr_accessor :type
|
|
3856
|
+
|
|
3857
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
3858
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
3859
|
+
sig { returns(String) }
|
|
3860
|
+
attr_accessor :value
|
|
3861
|
+
|
|
3862
|
+
# Real-world or account resource used during the event, such as an email, phone
|
|
3863
|
+
# number, address, URL, social handle, or payment identifier.
|
|
3864
|
+
sig do
|
|
3865
|
+
params(type: String, value: String).returns(T.attached_class)
|
|
3866
|
+
end
|
|
3867
|
+
def self.new(
|
|
3868
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
3869
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
3870
|
+
type:,
|
|
3871
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
3872
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
3873
|
+
value:
|
|
3874
|
+
)
|
|
3875
|
+
end
|
|
3876
|
+
|
|
3877
|
+
sig { override.returns({ type: String, value: String }) }
|
|
3878
|
+
def to_hash
|
|
3879
|
+
end
|
|
3880
|
+
end
|
|
3881
|
+
end
|
|
3882
|
+
|
|
3883
|
+
class CreateAccount < SafetyKit::Internal::Type::BaseModel
|
|
3884
|
+
OrHash =
|
|
3885
|
+
T.type_alias do
|
|
3886
|
+
T.any(
|
|
3887
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount,
|
|
3888
|
+
SafetyKit::Internal::AnyHash
|
|
3889
|
+
)
|
|
3890
|
+
end
|
|
3891
|
+
|
|
3892
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
3893
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
3894
|
+
sig { returns(String) }
|
|
3895
|
+
attr_accessor :event_name
|
|
3896
|
+
|
|
3897
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
3898
|
+
sig { returns(Time) }
|
|
3899
|
+
attr_accessor :timestamp
|
|
3900
|
+
|
|
3901
|
+
sig { returns(Symbol) }
|
|
3902
|
+
attr_accessor :type
|
|
3903
|
+
|
|
3904
|
+
# Your stable canonical identifier for the user or account.
|
|
3905
|
+
sig { returns(String) }
|
|
3906
|
+
attr_accessor :user_id
|
|
3907
|
+
|
|
3908
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
3909
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
3910
|
+
# analyze.
|
|
3911
|
+
sig do
|
|
3912
|
+
returns(
|
|
3913
|
+
T.nilable(
|
|
3914
|
+
T::Array[
|
|
3915
|
+
T.any(
|
|
3916
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent,
|
|
3917
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent
|
|
3918
|
+
)
|
|
3919
|
+
]
|
|
3920
|
+
)
|
|
3921
|
+
)
|
|
3922
|
+
end
|
|
3923
|
+
attr_reader :content
|
|
3924
|
+
|
|
3925
|
+
sig do
|
|
3926
|
+
params(
|
|
3927
|
+
content:
|
|
3928
|
+
T::Array[
|
|
3929
|
+
T.any(
|
|
3930
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent::OrHash,
|
|
3931
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::OrHash
|
|
3932
|
+
)
|
|
3933
|
+
]
|
|
3934
|
+
).void
|
|
3935
|
+
end
|
|
3936
|
+
attr_writer :content
|
|
3937
|
+
|
|
3938
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
3939
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
3940
|
+
sig do
|
|
3941
|
+
returns(
|
|
3942
|
+
T.nilable(
|
|
3943
|
+
T::Hash[
|
|
3944
|
+
Symbol,
|
|
3945
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Metadata::Variants
|
|
3946
|
+
]
|
|
3947
|
+
)
|
|
3948
|
+
)
|
|
3949
|
+
end
|
|
3950
|
+
attr_reader :metadata
|
|
3951
|
+
|
|
3952
|
+
sig do
|
|
3953
|
+
params(
|
|
3954
|
+
metadata:
|
|
3955
|
+
T::Hash[
|
|
3956
|
+
Symbol,
|
|
3957
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Metadata::Variants
|
|
3958
|
+
]
|
|
3959
|
+
).void
|
|
3960
|
+
end
|
|
3961
|
+
attr_writer :metadata
|
|
3962
|
+
|
|
3963
|
+
# Stable, typed account-level facts SafetyKit can use in rules and aggregate
|
|
3964
|
+
# analysis.
|
|
3965
|
+
sig do
|
|
3966
|
+
returns(
|
|
3967
|
+
T.nilable(
|
|
3968
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Properties
|
|
3969
|
+
)
|
|
3970
|
+
)
|
|
3971
|
+
end
|
|
3972
|
+
attr_reader :properties
|
|
3973
|
+
|
|
3974
|
+
sig do
|
|
3975
|
+
params(
|
|
3976
|
+
properties:
|
|
3977
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Properties::OrHash
|
|
3978
|
+
).void
|
|
3979
|
+
end
|
|
3980
|
+
attr_writer :properties
|
|
3981
|
+
|
|
3982
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
3983
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
3984
|
+
# identifiers.
|
|
3985
|
+
sig do
|
|
3986
|
+
returns(
|
|
3987
|
+
T.nilable(
|
|
3988
|
+
T::Array[
|
|
3989
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::ResourcesUsed
|
|
3990
|
+
]
|
|
3991
|
+
)
|
|
3992
|
+
)
|
|
3993
|
+
end
|
|
3994
|
+
attr_reader :resources_used
|
|
3995
|
+
|
|
3996
|
+
sig do
|
|
3997
|
+
params(
|
|
3998
|
+
resources_used:
|
|
3999
|
+
T::Array[
|
|
4000
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::ResourcesUsed::OrHash
|
|
4001
|
+
]
|
|
4002
|
+
).void
|
|
4003
|
+
end
|
|
4004
|
+
attr_writer :resources_used
|
|
4005
|
+
|
|
4006
|
+
# A user or account is created.
|
|
4007
|
+
sig do
|
|
4008
|
+
params(
|
|
4009
|
+
event_name: String,
|
|
4010
|
+
timestamp: Time,
|
|
4011
|
+
user_id: String,
|
|
4012
|
+
content:
|
|
4013
|
+
T::Array[
|
|
4014
|
+
T.any(
|
|
4015
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent::OrHash,
|
|
4016
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::OrHash
|
|
4017
|
+
)
|
|
4018
|
+
],
|
|
4019
|
+
metadata:
|
|
4020
|
+
T::Hash[
|
|
4021
|
+
Symbol,
|
|
4022
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Metadata::Variants
|
|
4023
|
+
],
|
|
4024
|
+
properties:
|
|
4025
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Properties::OrHash,
|
|
4026
|
+
resources_used:
|
|
4027
|
+
T::Array[
|
|
4028
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::ResourcesUsed::OrHash
|
|
4029
|
+
],
|
|
4030
|
+
type: Symbol
|
|
4031
|
+
).returns(T.attached_class)
|
|
4032
|
+
end
|
|
4033
|
+
def self.new(
|
|
4034
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
4035
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
4036
|
+
event_name:,
|
|
4037
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
4038
|
+
timestamp:,
|
|
4039
|
+
# Your stable canonical identifier for the user or account.
|
|
4040
|
+
user_id:,
|
|
4041
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
4042
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
4043
|
+
# analyze.
|
|
4044
|
+
content: nil,
|
|
4045
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
4046
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
4047
|
+
metadata: nil,
|
|
4048
|
+
# Stable, typed account-level facts SafetyKit can use in rules and aggregate
|
|
4049
|
+
# analysis.
|
|
4050
|
+
properties: nil,
|
|
4051
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
4052
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
4053
|
+
# identifiers.
|
|
4054
|
+
resources_used: nil,
|
|
4055
|
+
type: :create_account
|
|
4056
|
+
)
|
|
4057
|
+
end
|
|
4058
|
+
|
|
4059
|
+
sig do
|
|
4060
|
+
override.returns(
|
|
4061
|
+
{
|
|
4062
|
+
event_name: String,
|
|
4063
|
+
timestamp: Time,
|
|
4064
|
+
type: Symbol,
|
|
4065
|
+
user_id: String,
|
|
4066
|
+
content:
|
|
4067
|
+
T::Array[
|
|
4068
|
+
T.any(
|
|
4069
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent,
|
|
4070
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent
|
|
4071
|
+
)
|
|
4072
|
+
],
|
|
4073
|
+
metadata:
|
|
4074
|
+
T::Hash[
|
|
4075
|
+
Symbol,
|
|
4076
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Metadata::Variants
|
|
4077
|
+
],
|
|
4078
|
+
properties:
|
|
4079
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Properties,
|
|
4080
|
+
resources_used:
|
|
4081
|
+
T::Array[
|
|
4082
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::ResourcesUsed
|
|
4083
|
+
]
|
|
4084
|
+
}
|
|
4085
|
+
)
|
|
4086
|
+
end
|
|
4087
|
+
def to_hash
|
|
4088
|
+
end
|
|
4089
|
+
|
|
4090
|
+
# User-authored text content associated with an event.
|
|
4091
|
+
module Content
|
|
4092
|
+
extend SafetyKit::Internal::Type::Union
|
|
4093
|
+
|
|
4094
|
+
Variants =
|
|
4095
|
+
T.type_alias do
|
|
4096
|
+
T.any(
|
|
4097
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent,
|
|
4098
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent
|
|
4099
|
+
)
|
|
4100
|
+
end
|
|
4101
|
+
|
|
4102
|
+
class EventTextContent < SafetyKit::Internal::Type::BaseModel
|
|
4103
|
+
OrHash =
|
|
4104
|
+
T.type_alias do
|
|
4105
|
+
T.any(
|
|
4106
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent,
|
|
4107
|
+
SafetyKit::Internal::AnyHash
|
|
4108
|
+
)
|
|
4109
|
+
end
|
|
4110
|
+
|
|
4111
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
4112
|
+
sig { returns(String) }
|
|
4113
|
+
attr_accessor :text
|
|
4114
|
+
|
|
4115
|
+
# Text content part.
|
|
4116
|
+
sig do
|
|
4117
|
+
returns(
|
|
4118
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent::Type::OrSymbol
|
|
4119
|
+
)
|
|
4120
|
+
end
|
|
4121
|
+
attr_accessor :type
|
|
4122
|
+
|
|
4123
|
+
# Stable field key for this content part.
|
|
4124
|
+
sig { returns(T.nilable(String)) }
|
|
4125
|
+
attr_reader :key
|
|
4126
|
+
|
|
4127
|
+
sig { params(key: String).void }
|
|
4128
|
+
attr_writer :key
|
|
4129
|
+
|
|
4130
|
+
# User-authored text content associated with an event.
|
|
4131
|
+
sig do
|
|
4132
|
+
params(
|
|
4133
|
+
text: String,
|
|
4134
|
+
type:
|
|
4135
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent::Type::OrSymbol,
|
|
4136
|
+
key: String
|
|
4137
|
+
).returns(T.attached_class)
|
|
4138
|
+
end
|
|
4139
|
+
def self.new(
|
|
4140
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
4141
|
+
text:,
|
|
4142
|
+
# Text content part.
|
|
4143
|
+
type:,
|
|
4144
|
+
# Stable field key for this content part.
|
|
4145
|
+
key: nil
|
|
4146
|
+
)
|
|
4147
|
+
end
|
|
4148
|
+
|
|
4149
|
+
sig do
|
|
4150
|
+
override.returns(
|
|
4151
|
+
{
|
|
4152
|
+
text: String,
|
|
4153
|
+
type:
|
|
4154
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent::Type::OrSymbol,
|
|
4155
|
+
key: String
|
|
4156
|
+
}
|
|
4157
|
+
)
|
|
4158
|
+
end
|
|
4159
|
+
def to_hash
|
|
4160
|
+
end
|
|
4161
|
+
|
|
4162
|
+
# Text content part.
|
|
4163
|
+
module Type
|
|
4164
|
+
extend SafetyKit::Internal::Type::Enum
|
|
4165
|
+
|
|
4166
|
+
TaggedSymbol =
|
|
4167
|
+
T.type_alias do
|
|
4168
|
+
T.all(
|
|
4169
|
+
Symbol,
|
|
4170
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent::Type
|
|
4171
|
+
)
|
|
4172
|
+
end
|
|
4173
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4174
|
+
|
|
4175
|
+
TEXT =
|
|
4176
|
+
T.let(
|
|
4177
|
+
:text,
|
|
4178
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent::Type::TaggedSymbol
|
|
4179
|
+
)
|
|
4180
|
+
|
|
4181
|
+
sig do
|
|
4182
|
+
override.returns(
|
|
4183
|
+
T::Array[
|
|
4184
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent::Type::TaggedSymbol
|
|
4185
|
+
]
|
|
4186
|
+
)
|
|
4187
|
+
end
|
|
4188
|
+
def self.values
|
|
4189
|
+
end
|
|
4190
|
+
end
|
|
4191
|
+
end
|
|
4192
|
+
|
|
4193
|
+
class EventImageContent < SafetyKit::Internal::Type::BaseModel
|
|
4194
|
+
OrHash =
|
|
4195
|
+
T.type_alias do
|
|
4196
|
+
T.any(
|
|
4197
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent,
|
|
4198
|
+
SafetyKit::Internal::AnyHash
|
|
4199
|
+
)
|
|
4200
|
+
end
|
|
4201
|
+
|
|
4202
|
+
# Image source information.
|
|
4203
|
+
sig do
|
|
4204
|
+
returns(
|
|
4205
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source
|
|
4206
|
+
)
|
|
4207
|
+
end
|
|
4208
|
+
attr_reader :source
|
|
4209
|
+
|
|
4210
|
+
sig do
|
|
4211
|
+
params(
|
|
4212
|
+
source:
|
|
4213
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source::OrHash
|
|
4214
|
+
).void
|
|
4215
|
+
end
|
|
4216
|
+
attr_writer :source
|
|
4217
|
+
|
|
4218
|
+
# Image content part.
|
|
4219
|
+
sig do
|
|
4220
|
+
returns(
|
|
4221
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Type::OrSymbol
|
|
4222
|
+
)
|
|
4223
|
+
end
|
|
4224
|
+
attr_accessor :type
|
|
4225
|
+
|
|
4226
|
+
# Stable field key for this content part.
|
|
4227
|
+
sig { returns(T.nilable(String)) }
|
|
4228
|
+
attr_reader :key
|
|
4229
|
+
|
|
4230
|
+
sig { params(key: String).void }
|
|
4231
|
+
attr_writer :key
|
|
4232
|
+
|
|
4233
|
+
# User-uploaded image content associated with an event.
|
|
4234
|
+
sig do
|
|
4235
|
+
params(
|
|
4236
|
+
source:
|
|
4237
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source::OrHash,
|
|
4238
|
+
type:
|
|
4239
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Type::OrSymbol,
|
|
4240
|
+
key: String
|
|
4241
|
+
).returns(T.attached_class)
|
|
4242
|
+
end
|
|
4243
|
+
def self.new(
|
|
4244
|
+
# Image source information.
|
|
4245
|
+
source:,
|
|
4246
|
+
# Image content part.
|
|
4247
|
+
type:,
|
|
4248
|
+
# Stable field key for this content part.
|
|
4249
|
+
key: nil
|
|
4250
|
+
)
|
|
4251
|
+
end
|
|
4252
|
+
|
|
4253
|
+
sig do
|
|
4254
|
+
override.returns(
|
|
4255
|
+
{
|
|
4256
|
+
source:
|
|
4257
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source,
|
|
4258
|
+
type:
|
|
4259
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Type::OrSymbol,
|
|
4260
|
+
key: String
|
|
4261
|
+
}
|
|
4262
|
+
)
|
|
4263
|
+
end
|
|
4264
|
+
def to_hash
|
|
4265
|
+
end
|
|
4266
|
+
|
|
4267
|
+
class Source < SafetyKit::Internal::Type::BaseModel
|
|
4268
|
+
OrHash =
|
|
4269
|
+
T.type_alias do
|
|
4270
|
+
T.any(
|
|
4271
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source,
|
|
4272
|
+
SafetyKit::Internal::AnyHash
|
|
4273
|
+
)
|
|
4274
|
+
end
|
|
4275
|
+
|
|
4276
|
+
# URL image source.
|
|
4277
|
+
sig do
|
|
4278
|
+
returns(
|
|
4279
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source::Type::OrSymbol
|
|
4280
|
+
)
|
|
4281
|
+
end
|
|
4282
|
+
attr_accessor :type
|
|
4283
|
+
|
|
4284
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
4285
|
+
sig { returns(String) }
|
|
4286
|
+
attr_accessor :url
|
|
4287
|
+
|
|
4288
|
+
# Image source information.
|
|
4289
|
+
sig do
|
|
4290
|
+
params(
|
|
4291
|
+
type:
|
|
4292
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source::Type::OrSymbol,
|
|
4293
|
+
url: String
|
|
4294
|
+
).returns(T.attached_class)
|
|
4295
|
+
end
|
|
4296
|
+
def self.new(
|
|
4297
|
+
# URL image source.
|
|
4298
|
+
type:,
|
|
4299
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
4300
|
+
url:
|
|
4301
|
+
)
|
|
4302
|
+
end
|
|
4303
|
+
|
|
4304
|
+
sig do
|
|
4305
|
+
override.returns(
|
|
4306
|
+
{
|
|
4307
|
+
type:
|
|
4308
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source::Type::OrSymbol,
|
|
4309
|
+
url: String
|
|
4310
|
+
}
|
|
4311
|
+
)
|
|
4312
|
+
end
|
|
4313
|
+
def to_hash
|
|
4314
|
+
end
|
|
4315
|
+
|
|
4316
|
+
# URL image source.
|
|
4317
|
+
module Type
|
|
4318
|
+
extend SafetyKit::Internal::Type::Enum
|
|
4319
|
+
|
|
4320
|
+
TaggedSymbol =
|
|
4321
|
+
T.type_alias do
|
|
4322
|
+
T.all(
|
|
4323
|
+
Symbol,
|
|
4324
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source::Type
|
|
4325
|
+
)
|
|
4326
|
+
end
|
|
4327
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4328
|
+
|
|
4329
|
+
URL =
|
|
4330
|
+
T.let(
|
|
4331
|
+
:url,
|
|
4332
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
4333
|
+
)
|
|
4334
|
+
|
|
4335
|
+
sig do
|
|
4336
|
+
override.returns(
|
|
4337
|
+
T::Array[
|
|
4338
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
4339
|
+
]
|
|
4340
|
+
)
|
|
4341
|
+
end
|
|
4342
|
+
def self.values
|
|
4343
|
+
end
|
|
4344
|
+
end
|
|
4345
|
+
end
|
|
4346
|
+
|
|
4347
|
+
# Image content part.
|
|
4348
|
+
module Type
|
|
4349
|
+
extend SafetyKit::Internal::Type::Enum
|
|
4350
|
+
|
|
4351
|
+
TaggedSymbol =
|
|
4352
|
+
T.type_alias do
|
|
4353
|
+
T.all(
|
|
4354
|
+
Symbol,
|
|
4355
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Type
|
|
4356
|
+
)
|
|
4357
|
+
end
|
|
4358
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4359
|
+
|
|
4360
|
+
IMAGE =
|
|
4361
|
+
T.let(
|
|
4362
|
+
:image,
|
|
4363
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Type::TaggedSymbol
|
|
4364
|
+
)
|
|
4365
|
+
|
|
4366
|
+
sig do
|
|
4367
|
+
override.returns(
|
|
4368
|
+
T::Array[
|
|
4369
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Type::TaggedSymbol
|
|
4370
|
+
]
|
|
4371
|
+
)
|
|
4372
|
+
end
|
|
4373
|
+
def self.values
|
|
4374
|
+
end
|
|
4375
|
+
end
|
|
4376
|
+
end
|
|
4377
|
+
|
|
4378
|
+
sig do
|
|
4379
|
+
override.returns(
|
|
4380
|
+
T::Array[
|
|
4381
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::Variants
|
|
4382
|
+
]
|
|
4383
|
+
)
|
|
4384
|
+
end
|
|
4385
|
+
def self.variants
|
|
4386
|
+
end
|
|
4387
|
+
end
|
|
4388
|
+
|
|
4389
|
+
module Metadata
|
|
4390
|
+
extend SafetyKit::Internal::Type::Union
|
|
4391
|
+
|
|
4392
|
+
Variants =
|
|
4393
|
+
T.type_alias do
|
|
4394
|
+
T.any(
|
|
4395
|
+
String,
|
|
4396
|
+
Float,
|
|
4397
|
+
T::Boolean,
|
|
4398
|
+
T::Array[
|
|
4399
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Metadata::UnionMember3::Variants
|
|
4400
|
+
]
|
|
4401
|
+
)
|
|
4402
|
+
end
|
|
4403
|
+
|
|
4404
|
+
module UnionMember3
|
|
4405
|
+
extend SafetyKit::Internal::Type::Union
|
|
4406
|
+
|
|
4407
|
+
Variants = T.type_alias { T.any(String, Float, T::Boolean) }
|
|
4408
|
+
|
|
4409
|
+
sig do
|
|
4410
|
+
override.returns(
|
|
4411
|
+
T::Array[
|
|
4412
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Metadata::UnionMember3::Variants
|
|
4413
|
+
]
|
|
4414
|
+
)
|
|
4415
|
+
end
|
|
4416
|
+
def self.variants
|
|
4417
|
+
end
|
|
4418
|
+
end
|
|
4419
|
+
|
|
4420
|
+
sig do
|
|
4421
|
+
override.returns(
|
|
4422
|
+
T::Array[
|
|
4423
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Metadata::Variants
|
|
4424
|
+
]
|
|
4425
|
+
)
|
|
4426
|
+
end
|
|
4427
|
+
def self.variants
|
|
4428
|
+
end
|
|
4429
|
+
|
|
4430
|
+
UnionMember3Array =
|
|
4431
|
+
T.let(
|
|
4432
|
+
SafetyKit::Internal::Type::ArrayOf[
|
|
4433
|
+
union:
|
|
4434
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Metadata::UnionMember3
|
|
4435
|
+
],
|
|
4436
|
+
SafetyKit::Internal::Type::Converter
|
|
4437
|
+
)
|
|
4438
|
+
end
|
|
4439
|
+
|
|
4440
|
+
class Properties < SafetyKit::Internal::Type::BaseModel
|
|
4441
|
+
OrHash =
|
|
4442
|
+
T.type_alias do
|
|
4443
|
+
T.any(
|
|
4444
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Properties,
|
|
4445
|
+
SafetyKit::Internal::AnyHash
|
|
4446
|
+
)
|
|
4447
|
+
end
|
|
4448
|
+
|
|
4449
|
+
# Current account lifecycle or moderation state.
|
|
4450
|
+
sig { returns(T.nilable(String)) }
|
|
4451
|
+
attr_reader :account_state
|
|
4452
|
+
|
|
4453
|
+
sig { params(account_state: String).void }
|
|
4454
|
+
attr_writer :account_state
|
|
4455
|
+
|
|
4456
|
+
# Stable account categories in your product.
|
|
4457
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
4458
|
+
attr_reader :account_types
|
|
4459
|
+
|
|
4460
|
+
sig { params(account_types: T::Array[String]).void }
|
|
4461
|
+
attr_writer :account_types
|
|
4462
|
+
|
|
4463
|
+
# Country associated with the account.
|
|
4464
|
+
sig { returns(T.nilable(String)) }
|
|
4465
|
+
attr_reader :country
|
|
4466
|
+
|
|
4467
|
+
sig { params(country: String).void }
|
|
4468
|
+
attr_writer :country
|
|
4469
|
+
|
|
4470
|
+
# Whether the account's email address has been verified.
|
|
4471
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
4472
|
+
attr_reader :email_verified
|
|
4473
|
+
|
|
4474
|
+
sig { params(email_verified: T::Boolean).void }
|
|
4475
|
+
attr_writer :email_verified
|
|
4476
|
+
|
|
4477
|
+
# Stable, typed account-level facts SafetyKit can use in rules and aggregate
|
|
4478
|
+
# analysis.
|
|
4479
|
+
sig do
|
|
4480
|
+
params(
|
|
4481
|
+
account_state: String,
|
|
4482
|
+
account_types: T::Array[String],
|
|
4483
|
+
country: String,
|
|
4484
|
+
email_verified: T::Boolean
|
|
4485
|
+
).returns(T.attached_class)
|
|
4486
|
+
end
|
|
4487
|
+
def self.new(
|
|
4488
|
+
# Current account lifecycle or moderation state.
|
|
4489
|
+
account_state: nil,
|
|
4490
|
+
# Stable account categories in your product.
|
|
4491
|
+
account_types: nil,
|
|
4492
|
+
# Country associated with the account.
|
|
4493
|
+
country: nil,
|
|
4494
|
+
# Whether the account's email address has been verified.
|
|
4495
|
+
email_verified: nil
|
|
4496
|
+
)
|
|
4497
|
+
end
|
|
4498
|
+
|
|
4499
|
+
sig do
|
|
4500
|
+
override.returns(
|
|
4501
|
+
{
|
|
4502
|
+
account_state: String,
|
|
4503
|
+
account_types: T::Array[String],
|
|
4504
|
+
country: String,
|
|
4505
|
+
email_verified: T::Boolean
|
|
4506
|
+
}
|
|
4507
|
+
)
|
|
4508
|
+
end
|
|
4509
|
+
def to_hash
|
|
4510
|
+
end
|
|
4511
|
+
end
|
|
4512
|
+
|
|
4513
|
+
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
4514
|
+
OrHash =
|
|
4515
|
+
T.type_alias do
|
|
4516
|
+
T.any(
|
|
4517
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::ResourcesUsed,
|
|
4518
|
+
SafetyKit::Internal::AnyHash
|
|
4519
|
+
)
|
|
4520
|
+
end
|
|
4521
|
+
|
|
4522
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
4523
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
4524
|
+
sig { returns(String) }
|
|
4525
|
+
attr_accessor :type
|
|
4526
|
+
|
|
4527
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
4528
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
4529
|
+
sig { returns(String) }
|
|
4530
|
+
attr_accessor :value
|
|
4531
|
+
|
|
4532
|
+
# Real-world or account resource used during the event, such as an email, phone
|
|
4533
|
+
# number, address, URL, social handle, or payment identifier.
|
|
4534
|
+
sig do
|
|
4535
|
+
params(type: String, value: String).returns(T.attached_class)
|
|
4536
|
+
end
|
|
4537
|
+
def self.new(
|
|
4538
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
4539
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
4540
|
+
type:,
|
|
4541
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
4542
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
4543
|
+
value:
|
|
4544
|
+
)
|
|
4545
|
+
end
|
|
4546
|
+
|
|
4547
|
+
sig { override.returns({ type: String, value: String }) }
|
|
4548
|
+
def to_hash
|
|
4549
|
+
end
|
|
4550
|
+
end
|
|
4551
|
+
end
|
|
4552
|
+
|
|
4553
|
+
class UpdateAccount < SafetyKit::Internal::Type::BaseModel
|
|
4554
|
+
OrHash =
|
|
4555
|
+
T.type_alias do
|
|
4556
|
+
T.any(
|
|
4557
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount,
|
|
4558
|
+
SafetyKit::Internal::AnyHash
|
|
4559
|
+
)
|
|
4560
|
+
end
|
|
4561
|
+
|
|
4562
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
4563
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
4564
|
+
sig { returns(String) }
|
|
4565
|
+
attr_accessor :event_name
|
|
4566
|
+
|
|
4567
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
4568
|
+
sig { returns(Time) }
|
|
4569
|
+
attr_accessor :timestamp
|
|
4570
|
+
|
|
4571
|
+
sig { returns(Symbol) }
|
|
4572
|
+
attr_accessor :type
|
|
4573
|
+
|
|
4574
|
+
# Your stable canonical identifier for the user or account.
|
|
4575
|
+
sig { returns(String) }
|
|
4576
|
+
attr_accessor :user_id
|
|
4577
|
+
|
|
4578
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
4579
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
4580
|
+
# analyze.
|
|
4581
|
+
sig do
|
|
4582
|
+
returns(
|
|
4583
|
+
T.nilable(
|
|
4584
|
+
T::Array[
|
|
4585
|
+
T.any(
|
|
4586
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent,
|
|
4587
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent
|
|
4588
|
+
)
|
|
4589
|
+
]
|
|
4590
|
+
)
|
|
4591
|
+
)
|
|
4592
|
+
end
|
|
4593
|
+
attr_reader :content
|
|
4594
|
+
|
|
4595
|
+
sig do
|
|
4596
|
+
params(
|
|
4597
|
+
content:
|
|
4598
|
+
T::Array[
|
|
4599
|
+
T.any(
|
|
4600
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent::OrHash,
|
|
4601
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::OrHash
|
|
4602
|
+
)
|
|
4603
|
+
]
|
|
4604
|
+
).void
|
|
4605
|
+
end
|
|
4606
|
+
attr_writer :content
|
|
4607
|
+
|
|
4608
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
4609
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
4610
|
+
sig do
|
|
4611
|
+
returns(
|
|
4612
|
+
T.nilable(
|
|
4613
|
+
T::Hash[
|
|
4614
|
+
Symbol,
|
|
4615
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Metadata::Variants
|
|
4616
|
+
]
|
|
4617
|
+
)
|
|
4618
|
+
)
|
|
4619
|
+
end
|
|
4620
|
+
attr_reader :metadata
|
|
4621
|
+
|
|
4622
|
+
sig do
|
|
4623
|
+
params(
|
|
4624
|
+
metadata:
|
|
4625
|
+
T::Hash[
|
|
4626
|
+
Symbol,
|
|
4627
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Metadata::Variants
|
|
4628
|
+
]
|
|
4629
|
+
).void
|
|
4630
|
+
end
|
|
4631
|
+
attr_writer :metadata
|
|
4632
|
+
|
|
4633
|
+
# Stable, typed account-level facts SafetyKit can use in rules and aggregate
|
|
4634
|
+
# analysis.
|
|
4635
|
+
sig do
|
|
4636
|
+
returns(
|
|
4637
|
+
T.nilable(
|
|
4638
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Properties
|
|
4639
|
+
)
|
|
4640
|
+
)
|
|
4641
|
+
end
|
|
4642
|
+
attr_reader :properties
|
|
4643
|
+
|
|
4644
|
+
sig do
|
|
4645
|
+
params(
|
|
4646
|
+
properties:
|
|
4647
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Properties::OrHash
|
|
4648
|
+
).void
|
|
4649
|
+
end
|
|
4650
|
+
attr_writer :properties
|
|
4651
|
+
|
|
4652
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
4653
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
4654
|
+
# identifiers.
|
|
4655
|
+
sig do
|
|
4656
|
+
returns(
|
|
4657
|
+
T.nilable(
|
|
4658
|
+
T::Array[
|
|
4659
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::ResourcesUsed
|
|
4660
|
+
]
|
|
4661
|
+
)
|
|
4662
|
+
)
|
|
4663
|
+
end
|
|
4664
|
+
attr_reader :resources_used
|
|
4665
|
+
|
|
4666
|
+
sig do
|
|
4667
|
+
params(
|
|
4668
|
+
resources_used:
|
|
4669
|
+
T::Array[
|
|
4670
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::ResourcesUsed::OrHash
|
|
4671
|
+
]
|
|
4672
|
+
).void
|
|
4673
|
+
end
|
|
4674
|
+
attr_writer :resources_used
|
|
4675
|
+
|
|
4676
|
+
# A user or account profile, contact detail, payment detail, or public bio
|
|
4677
|
+
# changes.
|
|
4678
|
+
sig do
|
|
4679
|
+
params(
|
|
4680
|
+
event_name: String,
|
|
4681
|
+
timestamp: Time,
|
|
4682
|
+
user_id: String,
|
|
4683
|
+
content:
|
|
4684
|
+
T::Array[
|
|
4685
|
+
T.any(
|
|
4686
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent::OrHash,
|
|
4687
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::OrHash
|
|
4688
|
+
)
|
|
4689
|
+
],
|
|
4690
|
+
metadata:
|
|
4691
|
+
T::Hash[
|
|
4692
|
+
Symbol,
|
|
4693
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Metadata::Variants
|
|
4694
|
+
],
|
|
4695
|
+
properties:
|
|
4696
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Properties::OrHash,
|
|
4697
|
+
resources_used:
|
|
4698
|
+
T::Array[
|
|
4699
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::ResourcesUsed::OrHash
|
|
4700
|
+
],
|
|
4701
|
+
type: Symbol
|
|
4702
|
+
).returns(T.attached_class)
|
|
4703
|
+
end
|
|
4704
|
+
def self.new(
|
|
4705
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
4706
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
4707
|
+
event_name:,
|
|
4708
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
4709
|
+
timestamp:,
|
|
4710
|
+
# Your stable canonical identifier for the user or account.
|
|
4711
|
+
user_id:,
|
|
4712
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
4713
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
4714
|
+
# analyze.
|
|
4715
|
+
content: nil,
|
|
4716
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
4717
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
4718
|
+
metadata: nil,
|
|
4719
|
+
# Stable, typed account-level facts SafetyKit can use in rules and aggregate
|
|
4720
|
+
# analysis.
|
|
4721
|
+
properties: nil,
|
|
4722
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
4723
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
4724
|
+
# identifiers.
|
|
4725
|
+
resources_used: nil,
|
|
4726
|
+
type: :update_account
|
|
4727
|
+
)
|
|
4728
|
+
end
|
|
4729
|
+
|
|
4730
|
+
sig do
|
|
4731
|
+
override.returns(
|
|
4732
|
+
{
|
|
4733
|
+
event_name: String,
|
|
4734
|
+
timestamp: Time,
|
|
4735
|
+
type: Symbol,
|
|
4736
|
+
user_id: String,
|
|
4737
|
+
content:
|
|
4738
|
+
T::Array[
|
|
4739
|
+
T.any(
|
|
4740
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent,
|
|
4741
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent
|
|
4742
|
+
)
|
|
4743
|
+
],
|
|
4744
|
+
metadata:
|
|
4745
|
+
T::Hash[
|
|
4746
|
+
Symbol,
|
|
4747
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Metadata::Variants
|
|
4748
|
+
],
|
|
4749
|
+
properties:
|
|
4750
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Properties,
|
|
4751
|
+
resources_used:
|
|
4752
|
+
T::Array[
|
|
4753
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::ResourcesUsed
|
|
4754
|
+
]
|
|
4755
|
+
}
|
|
4756
|
+
)
|
|
4757
|
+
end
|
|
4758
|
+
def to_hash
|
|
4759
|
+
end
|
|
4760
|
+
|
|
4761
|
+
# User-authored text content associated with an event.
|
|
4762
|
+
module Content
|
|
4763
|
+
extend SafetyKit::Internal::Type::Union
|
|
4764
|
+
|
|
4765
|
+
Variants =
|
|
4766
|
+
T.type_alias do
|
|
4767
|
+
T.any(
|
|
4768
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent,
|
|
4769
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent
|
|
4770
|
+
)
|
|
4771
|
+
end
|
|
4772
|
+
|
|
4773
|
+
class EventTextContent < SafetyKit::Internal::Type::BaseModel
|
|
4774
|
+
OrHash =
|
|
4775
|
+
T.type_alias do
|
|
4776
|
+
T.any(
|
|
4777
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent,
|
|
4778
|
+
SafetyKit::Internal::AnyHash
|
|
4779
|
+
)
|
|
4780
|
+
end
|
|
4781
|
+
|
|
4782
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
4783
|
+
sig { returns(String) }
|
|
4784
|
+
attr_accessor :text
|
|
4785
|
+
|
|
4786
|
+
# Text content part.
|
|
4787
|
+
sig do
|
|
4788
|
+
returns(
|
|
4789
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent::Type::OrSymbol
|
|
4790
|
+
)
|
|
4791
|
+
end
|
|
4792
|
+
attr_accessor :type
|
|
4793
|
+
|
|
4794
|
+
# Stable field key for this content part.
|
|
4795
|
+
sig { returns(T.nilable(String)) }
|
|
4796
|
+
attr_reader :key
|
|
4797
|
+
|
|
4798
|
+
sig { params(key: String).void }
|
|
4799
|
+
attr_writer :key
|
|
4800
|
+
|
|
4801
|
+
# User-authored text content associated with an event.
|
|
4802
|
+
sig do
|
|
4803
|
+
params(
|
|
4804
|
+
text: String,
|
|
4805
|
+
type:
|
|
4806
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent::Type::OrSymbol,
|
|
4807
|
+
key: String
|
|
4808
|
+
).returns(T.attached_class)
|
|
4809
|
+
end
|
|
4810
|
+
def self.new(
|
|
4811
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
4812
|
+
text:,
|
|
4813
|
+
# Text content part.
|
|
4814
|
+
type:,
|
|
4815
|
+
# Stable field key for this content part.
|
|
4816
|
+
key: nil
|
|
4817
|
+
)
|
|
4818
|
+
end
|
|
4819
|
+
|
|
4820
|
+
sig do
|
|
4821
|
+
override.returns(
|
|
4822
|
+
{
|
|
4823
|
+
text: String,
|
|
4824
|
+
type:
|
|
4825
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent::Type::OrSymbol,
|
|
4826
|
+
key: String
|
|
4827
|
+
}
|
|
4828
|
+
)
|
|
4829
|
+
end
|
|
4830
|
+
def to_hash
|
|
4831
|
+
end
|
|
4832
|
+
|
|
4833
|
+
# Text content part.
|
|
4834
|
+
module Type
|
|
4835
|
+
extend SafetyKit::Internal::Type::Enum
|
|
4836
|
+
|
|
4837
|
+
TaggedSymbol =
|
|
4838
|
+
T.type_alias do
|
|
4839
|
+
T.all(
|
|
4840
|
+
Symbol,
|
|
4841
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent::Type
|
|
4842
|
+
)
|
|
4843
|
+
end
|
|
4844
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4845
|
+
|
|
4846
|
+
TEXT =
|
|
4847
|
+
T.let(
|
|
4848
|
+
:text,
|
|
4849
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent::Type::TaggedSymbol
|
|
4850
|
+
)
|
|
4851
|
+
|
|
4852
|
+
sig do
|
|
4853
|
+
override.returns(
|
|
4854
|
+
T::Array[
|
|
4855
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent::Type::TaggedSymbol
|
|
4856
|
+
]
|
|
4857
|
+
)
|
|
4858
|
+
end
|
|
4859
|
+
def self.values
|
|
4860
|
+
end
|
|
4861
|
+
end
|
|
4862
|
+
end
|
|
4863
|
+
|
|
4864
|
+
class EventImageContent < SafetyKit::Internal::Type::BaseModel
|
|
4865
|
+
OrHash =
|
|
4866
|
+
T.type_alias do
|
|
4867
|
+
T.any(
|
|
4868
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent,
|
|
4869
|
+
SafetyKit::Internal::AnyHash
|
|
4870
|
+
)
|
|
4871
|
+
end
|
|
4872
|
+
|
|
4873
|
+
# Image source information.
|
|
4874
|
+
sig do
|
|
4875
|
+
returns(
|
|
4876
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source
|
|
4877
|
+
)
|
|
4878
|
+
end
|
|
4879
|
+
attr_reader :source
|
|
4880
|
+
|
|
4881
|
+
sig do
|
|
4882
|
+
params(
|
|
4883
|
+
source:
|
|
4884
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source::OrHash
|
|
4885
|
+
).void
|
|
4886
|
+
end
|
|
4887
|
+
attr_writer :source
|
|
4888
|
+
|
|
4889
|
+
# Image content part.
|
|
4890
|
+
sig do
|
|
4891
|
+
returns(
|
|
4892
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Type::OrSymbol
|
|
4893
|
+
)
|
|
4894
|
+
end
|
|
4895
|
+
attr_accessor :type
|
|
4896
|
+
|
|
4897
|
+
# Stable field key for this content part.
|
|
4898
|
+
sig { returns(T.nilable(String)) }
|
|
4899
|
+
attr_reader :key
|
|
4900
|
+
|
|
4901
|
+
sig { params(key: String).void }
|
|
4902
|
+
attr_writer :key
|
|
4903
|
+
|
|
4904
|
+
# User-uploaded image content associated with an event.
|
|
4905
|
+
sig do
|
|
4906
|
+
params(
|
|
4907
|
+
source:
|
|
4908
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source::OrHash,
|
|
4909
|
+
type:
|
|
4910
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Type::OrSymbol,
|
|
4911
|
+
key: String
|
|
4912
|
+
).returns(T.attached_class)
|
|
4913
|
+
end
|
|
4914
|
+
def self.new(
|
|
4915
|
+
# Image source information.
|
|
4916
|
+
source:,
|
|
4917
|
+
# Image content part.
|
|
4918
|
+
type:,
|
|
4919
|
+
# Stable field key for this content part.
|
|
4920
|
+
key: nil
|
|
4921
|
+
)
|
|
4922
|
+
end
|
|
4923
|
+
|
|
4924
|
+
sig do
|
|
4925
|
+
override.returns(
|
|
4926
|
+
{
|
|
4927
|
+
source:
|
|
4928
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source,
|
|
4929
|
+
type:
|
|
4930
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Type::OrSymbol,
|
|
4931
|
+
key: String
|
|
4932
|
+
}
|
|
4933
|
+
)
|
|
4934
|
+
end
|
|
4935
|
+
def to_hash
|
|
4936
|
+
end
|
|
4937
|
+
|
|
4938
|
+
class Source < SafetyKit::Internal::Type::BaseModel
|
|
4939
|
+
OrHash =
|
|
4940
|
+
T.type_alias do
|
|
4941
|
+
T.any(
|
|
4942
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source,
|
|
4943
|
+
SafetyKit::Internal::AnyHash
|
|
4944
|
+
)
|
|
4945
|
+
end
|
|
4946
|
+
|
|
4947
|
+
# URL image source.
|
|
4948
|
+
sig do
|
|
4949
|
+
returns(
|
|
4950
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source::Type::OrSymbol
|
|
4951
|
+
)
|
|
4952
|
+
end
|
|
4953
|
+
attr_accessor :type
|
|
4954
|
+
|
|
4955
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
4956
|
+
sig { returns(String) }
|
|
4957
|
+
attr_accessor :url
|
|
4958
|
+
|
|
4959
|
+
# Image source information.
|
|
4960
|
+
sig do
|
|
4961
|
+
params(
|
|
4962
|
+
type:
|
|
4963
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source::Type::OrSymbol,
|
|
4964
|
+
url: String
|
|
4965
|
+
).returns(T.attached_class)
|
|
4966
|
+
end
|
|
4967
|
+
def self.new(
|
|
4968
|
+
# URL image source.
|
|
4969
|
+
type:,
|
|
4970
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
4971
|
+
url:
|
|
4972
|
+
)
|
|
4973
|
+
end
|
|
4974
|
+
|
|
4975
|
+
sig do
|
|
4976
|
+
override.returns(
|
|
4977
|
+
{
|
|
4978
|
+
type:
|
|
4979
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source::Type::OrSymbol,
|
|
4980
|
+
url: String
|
|
4981
|
+
}
|
|
4982
|
+
)
|
|
4983
|
+
end
|
|
4984
|
+
def to_hash
|
|
4985
|
+
end
|
|
4986
|
+
|
|
4987
|
+
# URL image source.
|
|
4988
|
+
module Type
|
|
4989
|
+
extend SafetyKit::Internal::Type::Enum
|
|
4990
|
+
|
|
4991
|
+
TaggedSymbol =
|
|
4992
|
+
T.type_alias do
|
|
4993
|
+
T.all(
|
|
4994
|
+
Symbol,
|
|
4995
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source::Type
|
|
4996
|
+
)
|
|
4997
|
+
end
|
|
4998
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4999
|
+
|
|
5000
|
+
URL =
|
|
5001
|
+
T.let(
|
|
5002
|
+
:url,
|
|
5003
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
5004
|
+
)
|
|
5005
|
+
|
|
5006
|
+
sig do
|
|
5007
|
+
override.returns(
|
|
5008
|
+
T::Array[
|
|
5009
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
5010
|
+
]
|
|
5011
|
+
)
|
|
5012
|
+
end
|
|
5013
|
+
def self.values
|
|
5014
|
+
end
|
|
5015
|
+
end
|
|
5016
|
+
end
|
|
5017
|
+
|
|
5018
|
+
# Image content part.
|
|
5019
|
+
module Type
|
|
5020
|
+
extend SafetyKit::Internal::Type::Enum
|
|
5021
|
+
|
|
5022
|
+
TaggedSymbol =
|
|
5023
|
+
T.type_alias do
|
|
5024
|
+
T.all(
|
|
5025
|
+
Symbol,
|
|
5026
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Type
|
|
5027
|
+
)
|
|
5028
|
+
end
|
|
5029
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
5030
|
+
|
|
5031
|
+
IMAGE =
|
|
5032
|
+
T.let(
|
|
5033
|
+
:image,
|
|
5034
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Type::TaggedSymbol
|
|
5035
|
+
)
|
|
5036
|
+
|
|
5037
|
+
sig do
|
|
5038
|
+
override.returns(
|
|
5039
|
+
T::Array[
|
|
5040
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Type::TaggedSymbol
|
|
5041
|
+
]
|
|
5042
|
+
)
|
|
5043
|
+
end
|
|
5044
|
+
def self.values
|
|
5045
|
+
end
|
|
5046
|
+
end
|
|
5047
|
+
end
|
|
5048
|
+
|
|
5049
|
+
sig do
|
|
5050
|
+
override.returns(
|
|
5051
|
+
T::Array[
|
|
5052
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::Variants
|
|
5053
|
+
]
|
|
5054
|
+
)
|
|
5055
|
+
end
|
|
5056
|
+
def self.variants
|
|
5057
|
+
end
|
|
5058
|
+
end
|
|
5059
|
+
|
|
5060
|
+
module Metadata
|
|
5061
|
+
extend SafetyKit::Internal::Type::Union
|
|
5062
|
+
|
|
5063
|
+
Variants =
|
|
5064
|
+
T.type_alias do
|
|
5065
|
+
T.any(
|
|
5066
|
+
String,
|
|
5067
|
+
Float,
|
|
5068
|
+
T::Boolean,
|
|
5069
|
+
T::Array[
|
|
5070
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Metadata::UnionMember3::Variants
|
|
5071
|
+
]
|
|
5072
|
+
)
|
|
5073
|
+
end
|
|
5074
|
+
|
|
5075
|
+
module UnionMember3
|
|
5076
|
+
extend SafetyKit::Internal::Type::Union
|
|
5077
|
+
|
|
5078
|
+
Variants = T.type_alias { T.any(String, Float, T::Boolean) }
|
|
5079
|
+
|
|
5080
|
+
sig do
|
|
5081
|
+
override.returns(
|
|
5082
|
+
T::Array[
|
|
5083
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Metadata::UnionMember3::Variants
|
|
5084
|
+
]
|
|
5085
|
+
)
|
|
5086
|
+
end
|
|
5087
|
+
def self.variants
|
|
5088
|
+
end
|
|
5089
|
+
end
|
|
5090
|
+
|
|
5091
|
+
sig do
|
|
5092
|
+
override.returns(
|
|
5093
|
+
T::Array[
|
|
5094
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Metadata::Variants
|
|
5095
|
+
]
|
|
5096
|
+
)
|
|
5097
|
+
end
|
|
5098
|
+
def self.variants
|
|
5099
|
+
end
|
|
5100
|
+
|
|
5101
|
+
UnionMember3Array =
|
|
5102
|
+
T.let(
|
|
5103
|
+
SafetyKit::Internal::Type::ArrayOf[
|
|
5104
|
+
union:
|
|
5105
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Metadata::UnionMember3
|
|
5106
|
+
],
|
|
5107
|
+
SafetyKit::Internal::Type::Converter
|
|
5108
|
+
)
|
|
5109
|
+
end
|
|
5110
|
+
|
|
5111
|
+
class Properties < SafetyKit::Internal::Type::BaseModel
|
|
5112
|
+
OrHash =
|
|
5113
|
+
T.type_alias do
|
|
5114
|
+
T.any(
|
|
5115
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Properties,
|
|
5116
|
+
SafetyKit::Internal::AnyHash
|
|
5117
|
+
)
|
|
5118
|
+
end
|
|
5119
|
+
|
|
5120
|
+
# Current account lifecycle or moderation state.
|
|
5121
|
+
sig { returns(T.nilable(String)) }
|
|
5122
|
+
attr_reader :account_state
|
|
5123
|
+
|
|
5124
|
+
sig { params(account_state: String).void }
|
|
5125
|
+
attr_writer :account_state
|
|
5126
|
+
|
|
5127
|
+
# Stable account categories in your product.
|
|
5128
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
5129
|
+
attr_reader :account_types
|
|
5130
|
+
|
|
5131
|
+
sig { params(account_types: T::Array[String]).void }
|
|
5132
|
+
attr_writer :account_types
|
|
5133
|
+
|
|
5134
|
+
# Country associated with the account.
|
|
5135
|
+
sig { returns(T.nilable(String)) }
|
|
5136
|
+
attr_reader :country
|
|
5137
|
+
|
|
5138
|
+
sig { params(country: String).void }
|
|
5139
|
+
attr_writer :country
|
|
5140
|
+
|
|
5141
|
+
# Whether the account's email address has been verified.
|
|
5142
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
5143
|
+
attr_reader :email_verified
|
|
5144
|
+
|
|
5145
|
+
sig { params(email_verified: T::Boolean).void }
|
|
5146
|
+
attr_writer :email_verified
|
|
5147
|
+
|
|
5148
|
+
# Stable, typed account-level facts SafetyKit can use in rules and aggregate
|
|
5149
|
+
# analysis.
|
|
5150
|
+
sig do
|
|
5151
|
+
params(
|
|
5152
|
+
account_state: String,
|
|
5153
|
+
account_types: T::Array[String],
|
|
5154
|
+
country: String,
|
|
5155
|
+
email_verified: T::Boolean
|
|
5156
|
+
).returns(T.attached_class)
|
|
5157
|
+
end
|
|
5158
|
+
def self.new(
|
|
5159
|
+
# Current account lifecycle or moderation state.
|
|
5160
|
+
account_state: nil,
|
|
5161
|
+
# Stable account categories in your product.
|
|
5162
|
+
account_types: nil,
|
|
5163
|
+
# Country associated with the account.
|
|
5164
|
+
country: nil,
|
|
5165
|
+
# Whether the account's email address has been verified.
|
|
5166
|
+
email_verified: nil
|
|
5167
|
+
)
|
|
5168
|
+
end
|
|
5169
|
+
|
|
5170
|
+
sig do
|
|
5171
|
+
override.returns(
|
|
5172
|
+
{
|
|
5173
|
+
account_state: String,
|
|
5174
|
+
account_types: T::Array[String],
|
|
5175
|
+
country: String,
|
|
5176
|
+
email_verified: T::Boolean
|
|
5177
|
+
}
|
|
5178
|
+
)
|
|
5179
|
+
end
|
|
5180
|
+
def to_hash
|
|
5181
|
+
end
|
|
5182
|
+
end
|
|
5183
|
+
|
|
5184
|
+
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
5185
|
+
OrHash =
|
|
5186
|
+
T.type_alias do
|
|
5187
|
+
T.any(
|
|
5188
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::ResourcesUsed,
|
|
5189
|
+
SafetyKit::Internal::AnyHash
|
|
5190
|
+
)
|
|
5191
|
+
end
|
|
5192
|
+
|
|
5193
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
5194
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
5195
|
+
sig { returns(String) }
|
|
5196
|
+
attr_accessor :type
|
|
5197
|
+
|
|
5198
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
5199
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
5200
|
+
sig { returns(String) }
|
|
5201
|
+
attr_accessor :value
|
|
5202
|
+
|
|
5203
|
+
# Real-world or account resource used during the event, such as an email, phone
|
|
5204
|
+
# number, address, URL, social handle, or payment identifier.
|
|
5205
|
+
sig do
|
|
5206
|
+
params(type: String, value: String).returns(T.attached_class)
|
|
5207
|
+
end
|
|
5208
|
+
def self.new(
|
|
5209
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
5210
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
5211
|
+
type:,
|
|
5212
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
5213
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
5214
|
+
value:
|
|
5215
|
+
)
|
|
5216
|
+
end
|
|
5217
|
+
|
|
5218
|
+
sig { override.returns({ type: String, value: String }) }
|
|
5219
|
+
def to_hash
|
|
5220
|
+
end
|
|
5221
|
+
end
|
|
5222
|
+
end
|
|
5223
|
+
|
|
5224
|
+
sig do
|
|
5225
|
+
override.returns(
|
|
5226
|
+
T::Array[
|
|
5227
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::Variants
|
|
5228
|
+
]
|
|
5229
|
+
)
|
|
5230
|
+
end
|
|
5231
|
+
def self.variants
|
|
5232
|
+
end
|
|
5233
|
+
end
|
|
5234
|
+
|
|
5235
|
+
sig do
|
|
5236
|
+
override.returns(
|
|
5237
|
+
T::Array[SafetyKit::Beta::EventCreateParams::Body::Variants]
|
|
5238
|
+
)
|
|
5239
|
+
end
|
|
5240
|
+
def self.variants
|
|
5241
|
+
end
|
|
5242
|
+
|
|
5243
|
+
UnionMember4Array =
|
|
5244
|
+
T.let(
|
|
5245
|
+
SafetyKit::Internal::Type::ArrayOf[
|
|
5246
|
+
union: SafetyKit::Beta::EventCreateParams::Body::UnionMember4
|
|
5247
|
+
],
|
|
5248
|
+
SafetyKit::Internal::Type::Converter
|
|
5249
|
+
)
|
|
2375
5250
|
end
|
|
2376
5251
|
end
|
|
2377
5252
|
end
|