safetykit 0.7.0 → 0.9.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/internal/type/union.rb +11 -0
- data/lib/safety_kit/models/beta/event_create_params.rb +1324 -171
- 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/version.rb +1 -1
- data/rbi/safety_kit/models/beta/event_create_params.rbi +2746 -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/models/beta/event_create_params.rbs +1106 -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,7 +1396,7 @@ 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
|
|
@@ -1309,7 +1409,7 @@ module SafetyKit
|
|
|
1309
1409
|
returns(
|
|
1310
1410
|
T.nilable(
|
|
1311
1411
|
T::Array[
|
|
1312
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1412
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::ResourcesUsed
|
|
1313
1413
|
]
|
|
1314
1414
|
)
|
|
1315
1415
|
)
|
|
@@ -1320,7 +1420,7 @@ module SafetyKit
|
|
|
1320
1420
|
params(
|
|
1321
1421
|
resources_used:
|
|
1322
1422
|
T::Array[
|
|
1323
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1423
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::ResourcesUsed::OrHash
|
|
1324
1424
|
]
|
|
1325
1425
|
).void
|
|
1326
1426
|
end
|
|
@@ -1331,24 +1431,25 @@ module SafetyKit
|
|
|
1331
1431
|
params(
|
|
1332
1432
|
event_name: String,
|
|
1333
1433
|
timestamp: Time,
|
|
1434
|
+
type:
|
|
1435
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Type::OrSymbol,
|
|
1334
1436
|
user_id: String,
|
|
1335
1437
|
content:
|
|
1336
1438
|
T::Array[
|
|
1337
1439
|
T.any(
|
|
1338
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1339
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1440
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent::OrHash,
|
|
1441
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::OrHash
|
|
1340
1442
|
)
|
|
1341
1443
|
],
|
|
1342
1444
|
metadata:
|
|
1343
1445
|
T::Hash[
|
|
1344
1446
|
Symbol,
|
|
1345
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1447
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Metadata::Variants
|
|
1346
1448
|
],
|
|
1347
1449
|
resources_used:
|
|
1348
1450
|
T::Array[
|
|
1349
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1350
|
-
]
|
|
1351
|
-
type: Symbol
|
|
1451
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::ResourcesUsed::OrHash
|
|
1452
|
+
]
|
|
1352
1453
|
).returns(T.attached_class)
|
|
1353
1454
|
end
|
|
1354
1455
|
def self.new(
|
|
@@ -1357,6 +1458,7 @@ module SafetyKit
|
|
|
1357
1458
|
event_name:,
|
|
1358
1459
|
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
1359
1460
|
timestamp:,
|
|
1461
|
+
type:,
|
|
1360
1462
|
# Your stable canonical identifier for the user or account.
|
|
1361
1463
|
user_id:,
|
|
1362
1464
|
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
@@ -1369,8 +1471,7 @@ module SafetyKit
|
|
|
1369
1471
|
# Reusable resources observed during the event. Use this for emails, phone
|
|
1370
1472
|
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
1371
1473
|
# identifiers.
|
|
1372
|
-
resources_used: nil
|
|
1373
|
-
type: :create_account
|
|
1474
|
+
resources_used: nil
|
|
1374
1475
|
)
|
|
1375
1476
|
end
|
|
1376
1477
|
|
|
@@ -1379,23 +1480,24 @@ module SafetyKit
|
|
|
1379
1480
|
{
|
|
1380
1481
|
event_name: String,
|
|
1381
1482
|
timestamp: Time,
|
|
1382
|
-
type:
|
|
1483
|
+
type:
|
|
1484
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Type::OrSymbol,
|
|
1383
1485
|
user_id: String,
|
|
1384
1486
|
content:
|
|
1385
1487
|
T::Array[
|
|
1386
1488
|
T.any(
|
|
1387
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1388
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1489
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent,
|
|
1490
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent
|
|
1389
1491
|
)
|
|
1390
1492
|
],
|
|
1391
1493
|
metadata:
|
|
1392
1494
|
T::Hash[
|
|
1393
1495
|
Symbol,
|
|
1394
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1496
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Metadata::Variants
|
|
1395
1497
|
],
|
|
1396
1498
|
resources_used:
|
|
1397
1499
|
T::Array[
|
|
1398
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1500
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::ResourcesUsed
|
|
1399
1501
|
]
|
|
1400
1502
|
}
|
|
1401
1503
|
)
|
|
@@ -1403,6 +1505,35 @@ module SafetyKit
|
|
|
1403
1505
|
def to_hash
|
|
1404
1506
|
end
|
|
1405
1507
|
|
|
1508
|
+
module Type
|
|
1509
|
+
extend SafetyKit::Internal::Type::Enum
|
|
1510
|
+
|
|
1511
|
+
TaggedSymbol =
|
|
1512
|
+
T.type_alias do
|
|
1513
|
+
T.all(
|
|
1514
|
+
Symbol,
|
|
1515
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Type
|
|
1516
|
+
)
|
|
1517
|
+
end
|
|
1518
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1519
|
+
|
|
1520
|
+
CREATE_ACCOUNT =
|
|
1521
|
+
T.let(
|
|
1522
|
+
:create_account,
|
|
1523
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Type::TaggedSymbol
|
|
1524
|
+
)
|
|
1525
|
+
|
|
1526
|
+
sig do
|
|
1527
|
+
override.returns(
|
|
1528
|
+
T::Array[
|
|
1529
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Type::TaggedSymbol
|
|
1530
|
+
]
|
|
1531
|
+
)
|
|
1532
|
+
end
|
|
1533
|
+
def self.values
|
|
1534
|
+
end
|
|
1535
|
+
end
|
|
1536
|
+
|
|
1406
1537
|
# User-authored text content associated with an event.
|
|
1407
1538
|
module Content
|
|
1408
1539
|
extend SafetyKit::Internal::Type::Union
|
|
@@ -1410,8 +1541,8 @@ module SafetyKit
|
|
|
1410
1541
|
Variants =
|
|
1411
1542
|
T.type_alias do
|
|
1412
1543
|
T.any(
|
|
1413
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1414
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1544
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent,
|
|
1545
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent
|
|
1415
1546
|
)
|
|
1416
1547
|
end
|
|
1417
1548
|
|
|
@@ -1419,7 +1550,7 @@ module SafetyKit
|
|
|
1419
1550
|
OrHash =
|
|
1420
1551
|
T.type_alias do
|
|
1421
1552
|
T.any(
|
|
1422
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1553
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent,
|
|
1423
1554
|
SafetyKit::Internal::AnyHash
|
|
1424
1555
|
)
|
|
1425
1556
|
end
|
|
@@ -1431,7 +1562,7 @@ module SafetyKit
|
|
|
1431
1562
|
# Text content part.
|
|
1432
1563
|
sig do
|
|
1433
1564
|
returns(
|
|
1434
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1565
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent::Type::OrSymbol
|
|
1435
1566
|
)
|
|
1436
1567
|
end
|
|
1437
1568
|
attr_accessor :type
|
|
@@ -1448,7 +1579,7 @@ module SafetyKit
|
|
|
1448
1579
|
params(
|
|
1449
1580
|
text: String,
|
|
1450
1581
|
type:
|
|
1451
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1582
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent::Type::OrSymbol,
|
|
1452
1583
|
key: String
|
|
1453
1584
|
).returns(T.attached_class)
|
|
1454
1585
|
end
|
|
@@ -1467,7 +1598,7 @@ module SafetyKit
|
|
|
1467
1598
|
{
|
|
1468
1599
|
text: String,
|
|
1469
1600
|
type:
|
|
1470
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1601
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent::Type::OrSymbol,
|
|
1471
1602
|
key: String
|
|
1472
1603
|
}
|
|
1473
1604
|
)
|
|
@@ -1483,7 +1614,7 @@ module SafetyKit
|
|
|
1483
1614
|
T.type_alias do
|
|
1484
1615
|
T.all(
|
|
1485
1616
|
Symbol,
|
|
1486
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1617
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent::Type
|
|
1487
1618
|
)
|
|
1488
1619
|
end
|
|
1489
1620
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -1491,13 +1622,13 @@ module SafetyKit
|
|
|
1491
1622
|
TEXT =
|
|
1492
1623
|
T.let(
|
|
1493
1624
|
:text,
|
|
1494
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1625
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent::Type::TaggedSymbol
|
|
1495
1626
|
)
|
|
1496
1627
|
|
|
1497
1628
|
sig do
|
|
1498
1629
|
override.returns(
|
|
1499
1630
|
T::Array[
|
|
1500
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1631
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventTextContent::Type::TaggedSymbol
|
|
1501
1632
|
]
|
|
1502
1633
|
)
|
|
1503
1634
|
end
|
|
@@ -1510,7 +1641,7 @@ module SafetyKit
|
|
|
1510
1641
|
OrHash =
|
|
1511
1642
|
T.type_alias do
|
|
1512
1643
|
T.any(
|
|
1513
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1644
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent,
|
|
1514
1645
|
SafetyKit::Internal::AnyHash
|
|
1515
1646
|
)
|
|
1516
1647
|
end
|
|
@@ -1518,7 +1649,7 @@ module SafetyKit
|
|
|
1518
1649
|
# Image source information.
|
|
1519
1650
|
sig do
|
|
1520
1651
|
returns(
|
|
1521
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1652
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source
|
|
1522
1653
|
)
|
|
1523
1654
|
end
|
|
1524
1655
|
attr_reader :source
|
|
@@ -1526,7 +1657,7 @@ module SafetyKit
|
|
|
1526
1657
|
sig do
|
|
1527
1658
|
params(
|
|
1528
1659
|
source:
|
|
1529
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1660
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source::OrHash
|
|
1530
1661
|
).void
|
|
1531
1662
|
end
|
|
1532
1663
|
attr_writer :source
|
|
@@ -1534,7 +1665,7 @@ module SafetyKit
|
|
|
1534
1665
|
# Image content part.
|
|
1535
1666
|
sig do
|
|
1536
1667
|
returns(
|
|
1537
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1668
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Type::OrSymbol
|
|
1538
1669
|
)
|
|
1539
1670
|
end
|
|
1540
1671
|
attr_accessor :type
|
|
@@ -1550,9 +1681,9 @@ module SafetyKit
|
|
|
1550
1681
|
sig do
|
|
1551
1682
|
params(
|
|
1552
1683
|
source:
|
|
1553
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1684
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source::OrHash,
|
|
1554
1685
|
type:
|
|
1555
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1686
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Type::OrSymbol,
|
|
1556
1687
|
key: String
|
|
1557
1688
|
).returns(T.attached_class)
|
|
1558
1689
|
end
|
|
@@ -1570,9 +1701,9 @@ module SafetyKit
|
|
|
1570
1701
|
override.returns(
|
|
1571
1702
|
{
|
|
1572
1703
|
source:
|
|
1573
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1704
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source,
|
|
1574
1705
|
type:
|
|
1575
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1706
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Type::OrSymbol,
|
|
1576
1707
|
key: String
|
|
1577
1708
|
}
|
|
1578
1709
|
)
|
|
@@ -1584,7 +1715,7 @@ module SafetyKit
|
|
|
1584
1715
|
OrHash =
|
|
1585
1716
|
T.type_alias do
|
|
1586
1717
|
T.any(
|
|
1587
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1718
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source,
|
|
1588
1719
|
SafetyKit::Internal::AnyHash
|
|
1589
1720
|
)
|
|
1590
1721
|
end
|
|
@@ -1592,7 +1723,7 @@ module SafetyKit
|
|
|
1592
1723
|
# URL image source.
|
|
1593
1724
|
sig do
|
|
1594
1725
|
returns(
|
|
1595
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1726
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source::Type::OrSymbol
|
|
1596
1727
|
)
|
|
1597
1728
|
end
|
|
1598
1729
|
attr_accessor :type
|
|
@@ -1605,7 +1736,7 @@ module SafetyKit
|
|
|
1605
1736
|
sig do
|
|
1606
1737
|
params(
|
|
1607
1738
|
type:
|
|
1608
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1739
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source::Type::OrSymbol,
|
|
1609
1740
|
url: String
|
|
1610
1741
|
).returns(T.attached_class)
|
|
1611
1742
|
end
|
|
@@ -1621,7 +1752,7 @@ module SafetyKit
|
|
|
1621
1752
|
override.returns(
|
|
1622
1753
|
{
|
|
1623
1754
|
type:
|
|
1624
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1755
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source::Type::OrSymbol,
|
|
1625
1756
|
url: String
|
|
1626
1757
|
}
|
|
1627
1758
|
)
|
|
@@ -1637,7 +1768,7 @@ module SafetyKit
|
|
|
1637
1768
|
T.type_alias do
|
|
1638
1769
|
T.all(
|
|
1639
1770
|
Symbol,
|
|
1640
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1771
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source::Type
|
|
1641
1772
|
)
|
|
1642
1773
|
end
|
|
1643
1774
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -1645,13 +1776,13 @@ module SafetyKit
|
|
|
1645
1776
|
URL =
|
|
1646
1777
|
T.let(
|
|
1647
1778
|
:url,
|
|
1648
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1779
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
1649
1780
|
)
|
|
1650
1781
|
|
|
1651
1782
|
sig do
|
|
1652
1783
|
override.returns(
|
|
1653
1784
|
T::Array[
|
|
1654
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1785
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
1655
1786
|
]
|
|
1656
1787
|
)
|
|
1657
1788
|
end
|
|
@@ -1668,7 +1799,7 @@ module SafetyKit
|
|
|
1668
1799
|
T.type_alias do
|
|
1669
1800
|
T.all(
|
|
1670
1801
|
Symbol,
|
|
1671
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1802
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Type
|
|
1672
1803
|
)
|
|
1673
1804
|
end
|
|
1674
1805
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -1676,13 +1807,13 @@ module SafetyKit
|
|
|
1676
1807
|
IMAGE =
|
|
1677
1808
|
T.let(
|
|
1678
1809
|
:image,
|
|
1679
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1810
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Type::TaggedSymbol
|
|
1680
1811
|
)
|
|
1681
1812
|
|
|
1682
1813
|
sig do
|
|
1683
1814
|
override.returns(
|
|
1684
1815
|
T::Array[
|
|
1685
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1816
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::EventImageContent::Type::TaggedSymbol
|
|
1686
1817
|
]
|
|
1687
1818
|
)
|
|
1688
1819
|
end
|
|
@@ -1694,7 +1825,7 @@ module SafetyKit
|
|
|
1694
1825
|
sig do
|
|
1695
1826
|
override.returns(
|
|
1696
1827
|
T::Array[
|
|
1697
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1828
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Content::Variants
|
|
1698
1829
|
]
|
|
1699
1830
|
)
|
|
1700
1831
|
end
|
|
@@ -1712,7 +1843,7 @@ module SafetyKit
|
|
|
1712
1843
|
Float,
|
|
1713
1844
|
T::Boolean,
|
|
1714
1845
|
T::Array[
|
|
1715
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1846
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Metadata::UnionMember3::Variants
|
|
1716
1847
|
]
|
|
1717
1848
|
)
|
|
1718
1849
|
end
|
|
@@ -1725,7 +1856,7 @@ module SafetyKit
|
|
|
1725
1856
|
sig do
|
|
1726
1857
|
override.returns(
|
|
1727
1858
|
T::Array[
|
|
1728
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1859
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Metadata::UnionMember3::Variants
|
|
1729
1860
|
]
|
|
1730
1861
|
)
|
|
1731
1862
|
end
|
|
@@ -1736,7 +1867,7 @@ module SafetyKit
|
|
|
1736
1867
|
sig do
|
|
1737
1868
|
override.returns(
|
|
1738
1869
|
T::Array[
|
|
1739
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1870
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Metadata::Variants
|
|
1740
1871
|
]
|
|
1741
1872
|
)
|
|
1742
1873
|
end
|
|
@@ -1747,7 +1878,7 @@ module SafetyKit
|
|
|
1747
1878
|
T.let(
|
|
1748
1879
|
SafetyKit::Internal::Type::ArrayOf[
|
|
1749
1880
|
union:
|
|
1750
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1881
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::Metadata::UnionMember3
|
|
1751
1882
|
],
|
|
1752
1883
|
SafetyKit::Internal::Type::Converter
|
|
1753
1884
|
)
|
|
@@ -1757,7 +1888,7 @@ module SafetyKit
|
|
|
1757
1888
|
OrHash =
|
|
1758
1889
|
T.type_alias do
|
|
1759
1890
|
T.any(
|
|
1760
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1891
|
+
SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::ResourcesUsed,
|
|
1761
1892
|
SafetyKit::Internal::AnyHash
|
|
1762
1893
|
)
|
|
1763
1894
|
end
|
|
@@ -1768,7 +1899,7 @@ module SafetyKit
|
|
|
1768
1899
|
attr_accessor :type
|
|
1769
1900
|
|
|
1770
1901
|
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
1771
|
-
# value, not the raw value.
|
|
1902
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
1772
1903
|
sig { returns(String) }
|
|
1773
1904
|
attr_accessor :value
|
|
1774
1905
|
|
|
@@ -1782,7 +1913,7 @@ module SafetyKit
|
|
|
1782
1913
|
# youtube, linkedin, or another stable snake_case identifier.
|
|
1783
1914
|
type:,
|
|
1784
1915
|
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
1785
|
-
# value, not the raw value.
|
|
1916
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
1786
1917
|
value:
|
|
1787
1918
|
)
|
|
1788
1919
|
end
|
|
@@ -1793,11 +1924,11 @@ module SafetyKit
|
|
|
1793
1924
|
end
|
|
1794
1925
|
end
|
|
1795
1926
|
|
|
1796
|
-
class
|
|
1927
|
+
class UpdateAccountEventRequest < SafetyKit::Internal::Type::BaseModel
|
|
1797
1928
|
OrHash =
|
|
1798
1929
|
T.type_alias do
|
|
1799
1930
|
T.any(
|
|
1800
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1931
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest,
|
|
1801
1932
|
SafetyKit::Internal::AnyHash
|
|
1802
1933
|
)
|
|
1803
1934
|
end
|
|
@@ -1811,7 +1942,11 @@ module SafetyKit
|
|
|
1811
1942
|
sig { returns(Time) }
|
|
1812
1943
|
attr_accessor :timestamp
|
|
1813
1944
|
|
|
1814
|
-
sig
|
|
1945
|
+
sig do
|
|
1946
|
+
returns(
|
|
1947
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Type::OrSymbol
|
|
1948
|
+
)
|
|
1949
|
+
end
|
|
1815
1950
|
attr_accessor :type
|
|
1816
1951
|
|
|
1817
1952
|
# Your stable canonical identifier for the user or account.
|
|
@@ -1826,8 +1961,8 @@ module SafetyKit
|
|
|
1826
1961
|
T.nilable(
|
|
1827
1962
|
T::Array[
|
|
1828
1963
|
T.any(
|
|
1829
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1830
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1964
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent,
|
|
1965
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent
|
|
1831
1966
|
)
|
|
1832
1967
|
]
|
|
1833
1968
|
)
|
|
@@ -1840,8 +1975,8 @@ module SafetyKit
|
|
|
1840
1975
|
content:
|
|
1841
1976
|
T::Array[
|
|
1842
1977
|
T.any(
|
|
1843
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1844
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1978
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent::OrHash,
|
|
1979
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::OrHash
|
|
1845
1980
|
)
|
|
1846
1981
|
]
|
|
1847
1982
|
).void
|
|
@@ -1855,7 +1990,7 @@ module SafetyKit
|
|
|
1855
1990
|
T.nilable(
|
|
1856
1991
|
T::Hash[
|
|
1857
1992
|
Symbol,
|
|
1858
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1993
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Metadata::Variants
|
|
1859
1994
|
]
|
|
1860
1995
|
)
|
|
1861
1996
|
)
|
|
@@ -1867,7 +2002,7 @@ module SafetyKit
|
|
|
1867
2002
|
metadata:
|
|
1868
2003
|
T::Hash[
|
|
1869
2004
|
Symbol,
|
|
1870
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2005
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Metadata::Variants
|
|
1871
2006
|
]
|
|
1872
2007
|
).void
|
|
1873
2008
|
end
|
|
@@ -1880,7 +2015,7 @@ module SafetyKit
|
|
|
1880
2015
|
returns(
|
|
1881
2016
|
T.nilable(
|
|
1882
2017
|
T::Array[
|
|
1883
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2018
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::ResourcesUsed
|
|
1884
2019
|
]
|
|
1885
2020
|
)
|
|
1886
2021
|
)
|
|
@@ -1891,7 +2026,7 @@ module SafetyKit
|
|
|
1891
2026
|
params(
|
|
1892
2027
|
resources_used:
|
|
1893
2028
|
T::Array[
|
|
1894
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2029
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::ResourcesUsed::OrHash
|
|
1895
2030
|
]
|
|
1896
2031
|
).void
|
|
1897
2032
|
end
|
|
@@ -1903,24 +2038,25 @@ module SafetyKit
|
|
|
1903
2038
|
params(
|
|
1904
2039
|
event_name: String,
|
|
1905
2040
|
timestamp: Time,
|
|
2041
|
+
type:
|
|
2042
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Type::OrSymbol,
|
|
1906
2043
|
user_id: String,
|
|
1907
2044
|
content:
|
|
1908
2045
|
T::Array[
|
|
1909
2046
|
T.any(
|
|
1910
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1911
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2047
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent::OrHash,
|
|
2048
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::OrHash
|
|
1912
2049
|
)
|
|
1913
2050
|
],
|
|
1914
2051
|
metadata:
|
|
1915
2052
|
T::Hash[
|
|
1916
2053
|
Symbol,
|
|
1917
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2054
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Metadata::Variants
|
|
1918
2055
|
],
|
|
1919
2056
|
resources_used:
|
|
1920
2057
|
T::Array[
|
|
1921
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1922
|
-
]
|
|
1923
|
-
type: Symbol
|
|
2058
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::ResourcesUsed::OrHash
|
|
2059
|
+
]
|
|
1924
2060
|
).returns(T.attached_class)
|
|
1925
2061
|
end
|
|
1926
2062
|
def self.new(
|
|
@@ -1929,6 +2065,7 @@ module SafetyKit
|
|
|
1929
2065
|
event_name:,
|
|
1930
2066
|
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
1931
2067
|
timestamp:,
|
|
2068
|
+
type:,
|
|
1932
2069
|
# Your stable canonical identifier for the user or account.
|
|
1933
2070
|
user_id:,
|
|
1934
2071
|
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
@@ -1941,8 +2078,7 @@ module SafetyKit
|
|
|
1941
2078
|
# Reusable resources observed during the event. Use this for emails, phone
|
|
1942
2079
|
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
1943
2080
|
# identifiers.
|
|
1944
|
-
resources_used: nil
|
|
1945
|
-
type: :update_account
|
|
2081
|
+
resources_used: nil
|
|
1946
2082
|
)
|
|
1947
2083
|
end
|
|
1948
2084
|
|
|
@@ -1951,23 +2087,24 @@ module SafetyKit
|
|
|
1951
2087
|
{
|
|
1952
2088
|
event_name: String,
|
|
1953
2089
|
timestamp: Time,
|
|
1954
|
-
type:
|
|
2090
|
+
type:
|
|
2091
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Type::OrSymbol,
|
|
1955
2092
|
user_id: String,
|
|
1956
2093
|
content:
|
|
1957
2094
|
T::Array[
|
|
1958
2095
|
T.any(
|
|
1959
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1960
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2096
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent,
|
|
2097
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent
|
|
1961
2098
|
)
|
|
1962
2099
|
],
|
|
1963
2100
|
metadata:
|
|
1964
2101
|
T::Hash[
|
|
1965
2102
|
Symbol,
|
|
1966
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2103
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Metadata::Variants
|
|
1967
2104
|
],
|
|
1968
2105
|
resources_used:
|
|
1969
2106
|
T::Array[
|
|
1970
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2107
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::ResourcesUsed
|
|
1971
2108
|
]
|
|
1972
2109
|
}
|
|
1973
2110
|
)
|
|
@@ -1975,6 +2112,35 @@ module SafetyKit
|
|
|
1975
2112
|
def to_hash
|
|
1976
2113
|
end
|
|
1977
2114
|
|
|
2115
|
+
module Type
|
|
2116
|
+
extend SafetyKit::Internal::Type::Enum
|
|
2117
|
+
|
|
2118
|
+
TaggedSymbol =
|
|
2119
|
+
T.type_alias do
|
|
2120
|
+
T.all(
|
|
2121
|
+
Symbol,
|
|
2122
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Type
|
|
2123
|
+
)
|
|
2124
|
+
end
|
|
2125
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2126
|
+
|
|
2127
|
+
UPDATE_ACCOUNT =
|
|
2128
|
+
T.let(
|
|
2129
|
+
:update_account,
|
|
2130
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Type::TaggedSymbol
|
|
2131
|
+
)
|
|
2132
|
+
|
|
2133
|
+
sig do
|
|
2134
|
+
override.returns(
|
|
2135
|
+
T::Array[
|
|
2136
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Type::TaggedSymbol
|
|
2137
|
+
]
|
|
2138
|
+
)
|
|
2139
|
+
end
|
|
2140
|
+
def self.values
|
|
2141
|
+
end
|
|
2142
|
+
end
|
|
2143
|
+
|
|
1978
2144
|
# User-authored text content associated with an event.
|
|
1979
2145
|
module Content
|
|
1980
2146
|
extend SafetyKit::Internal::Type::Union
|
|
@@ -1982,8 +2148,8 @@ module SafetyKit
|
|
|
1982
2148
|
Variants =
|
|
1983
2149
|
T.type_alias do
|
|
1984
2150
|
T.any(
|
|
1985
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1986
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2151
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent,
|
|
2152
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent
|
|
1987
2153
|
)
|
|
1988
2154
|
end
|
|
1989
2155
|
|
|
@@ -1991,7 +2157,7 @@ module SafetyKit
|
|
|
1991
2157
|
OrHash =
|
|
1992
2158
|
T.type_alias do
|
|
1993
2159
|
T.any(
|
|
1994
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2160
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent,
|
|
1995
2161
|
SafetyKit::Internal::AnyHash
|
|
1996
2162
|
)
|
|
1997
2163
|
end
|
|
@@ -2003,7 +2169,7 @@ module SafetyKit
|
|
|
2003
2169
|
# Text content part.
|
|
2004
2170
|
sig do
|
|
2005
2171
|
returns(
|
|
2006
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2172
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent::Type::OrSymbol
|
|
2007
2173
|
)
|
|
2008
2174
|
end
|
|
2009
2175
|
attr_accessor :type
|
|
@@ -2020,7 +2186,7 @@ module SafetyKit
|
|
|
2020
2186
|
params(
|
|
2021
2187
|
text: String,
|
|
2022
2188
|
type:
|
|
2023
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2189
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent::Type::OrSymbol,
|
|
2024
2190
|
key: String
|
|
2025
2191
|
).returns(T.attached_class)
|
|
2026
2192
|
end
|
|
@@ -2039,7 +2205,7 @@ module SafetyKit
|
|
|
2039
2205
|
{
|
|
2040
2206
|
text: String,
|
|
2041
2207
|
type:
|
|
2042
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2208
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent::Type::OrSymbol,
|
|
2043
2209
|
key: String
|
|
2044
2210
|
}
|
|
2045
2211
|
)
|
|
@@ -2055,7 +2221,7 @@ module SafetyKit
|
|
|
2055
2221
|
T.type_alias do
|
|
2056
2222
|
T.all(
|
|
2057
2223
|
Symbol,
|
|
2058
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2224
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent::Type
|
|
2059
2225
|
)
|
|
2060
2226
|
end
|
|
2061
2227
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -2063,13 +2229,13 @@ module SafetyKit
|
|
|
2063
2229
|
TEXT =
|
|
2064
2230
|
T.let(
|
|
2065
2231
|
:text,
|
|
2066
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2232
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent::Type::TaggedSymbol
|
|
2067
2233
|
)
|
|
2068
2234
|
|
|
2069
2235
|
sig do
|
|
2070
2236
|
override.returns(
|
|
2071
2237
|
T::Array[
|
|
2072
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2238
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventTextContent::Type::TaggedSymbol
|
|
2073
2239
|
]
|
|
2074
2240
|
)
|
|
2075
2241
|
end
|
|
@@ -2082,7 +2248,7 @@ module SafetyKit
|
|
|
2082
2248
|
OrHash =
|
|
2083
2249
|
T.type_alias do
|
|
2084
2250
|
T.any(
|
|
2085
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2251
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent,
|
|
2086
2252
|
SafetyKit::Internal::AnyHash
|
|
2087
2253
|
)
|
|
2088
2254
|
end
|
|
@@ -2090,7 +2256,7 @@ module SafetyKit
|
|
|
2090
2256
|
# Image source information.
|
|
2091
2257
|
sig do
|
|
2092
2258
|
returns(
|
|
2093
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2259
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source
|
|
2094
2260
|
)
|
|
2095
2261
|
end
|
|
2096
2262
|
attr_reader :source
|
|
@@ -2098,7 +2264,7 @@ module SafetyKit
|
|
|
2098
2264
|
sig do
|
|
2099
2265
|
params(
|
|
2100
2266
|
source:
|
|
2101
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2267
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source::OrHash
|
|
2102
2268
|
).void
|
|
2103
2269
|
end
|
|
2104
2270
|
attr_writer :source
|
|
@@ -2106,7 +2272,7 @@ module SafetyKit
|
|
|
2106
2272
|
# Image content part.
|
|
2107
2273
|
sig do
|
|
2108
2274
|
returns(
|
|
2109
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2275
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Type::OrSymbol
|
|
2110
2276
|
)
|
|
2111
2277
|
end
|
|
2112
2278
|
attr_accessor :type
|
|
@@ -2122,9 +2288,9 @@ module SafetyKit
|
|
|
2122
2288
|
sig do
|
|
2123
2289
|
params(
|
|
2124
2290
|
source:
|
|
2125
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2291
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source::OrHash,
|
|
2126
2292
|
type:
|
|
2127
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2293
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Type::OrSymbol,
|
|
2128
2294
|
key: String
|
|
2129
2295
|
).returns(T.attached_class)
|
|
2130
2296
|
end
|
|
@@ -2142,9 +2308,9 @@ module SafetyKit
|
|
|
2142
2308
|
override.returns(
|
|
2143
2309
|
{
|
|
2144
2310
|
source:
|
|
2145
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2311
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source,
|
|
2146
2312
|
type:
|
|
2147
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2313
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Type::OrSymbol,
|
|
2148
2314
|
key: String
|
|
2149
2315
|
}
|
|
2150
2316
|
)
|
|
@@ -2156,7 +2322,7 @@ module SafetyKit
|
|
|
2156
2322
|
OrHash =
|
|
2157
2323
|
T.type_alias do
|
|
2158
2324
|
T.any(
|
|
2159
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2325
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source,
|
|
2160
2326
|
SafetyKit::Internal::AnyHash
|
|
2161
2327
|
)
|
|
2162
2328
|
end
|
|
@@ -2164,7 +2330,7 @@ module SafetyKit
|
|
|
2164
2330
|
# URL image source.
|
|
2165
2331
|
sig do
|
|
2166
2332
|
returns(
|
|
2167
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2333
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source::Type::OrSymbol
|
|
2168
2334
|
)
|
|
2169
2335
|
end
|
|
2170
2336
|
attr_accessor :type
|
|
@@ -2177,7 +2343,7 @@ module SafetyKit
|
|
|
2177
2343
|
sig do
|
|
2178
2344
|
params(
|
|
2179
2345
|
type:
|
|
2180
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2346
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source::Type::OrSymbol,
|
|
2181
2347
|
url: String
|
|
2182
2348
|
).returns(T.attached_class)
|
|
2183
2349
|
end
|
|
@@ -2193,7 +2359,7 @@ module SafetyKit
|
|
|
2193
2359
|
override.returns(
|
|
2194
2360
|
{
|
|
2195
2361
|
type:
|
|
2196
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2362
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source::Type::OrSymbol,
|
|
2197
2363
|
url: String
|
|
2198
2364
|
}
|
|
2199
2365
|
)
|
|
@@ -2209,7 +2375,7 @@ module SafetyKit
|
|
|
2209
2375
|
T.type_alias do
|
|
2210
2376
|
T.all(
|
|
2211
2377
|
Symbol,
|
|
2212
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2378
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source::Type
|
|
2213
2379
|
)
|
|
2214
2380
|
end
|
|
2215
2381
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -2217,13 +2383,13 @@ module SafetyKit
|
|
|
2217
2383
|
URL =
|
|
2218
2384
|
T.let(
|
|
2219
2385
|
:url,
|
|
2220
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2386
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
2221
2387
|
)
|
|
2222
2388
|
|
|
2223
2389
|
sig do
|
|
2224
2390
|
override.returns(
|
|
2225
2391
|
T::Array[
|
|
2226
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2392
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
2227
2393
|
]
|
|
2228
2394
|
)
|
|
2229
2395
|
end
|
|
@@ -2240,7 +2406,7 @@ module SafetyKit
|
|
|
2240
2406
|
T.type_alias do
|
|
2241
2407
|
T.all(
|
|
2242
2408
|
Symbol,
|
|
2243
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2409
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Type
|
|
2244
2410
|
)
|
|
2245
2411
|
end
|
|
2246
2412
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -2248,13 +2414,13 @@ module SafetyKit
|
|
|
2248
2414
|
IMAGE =
|
|
2249
2415
|
T.let(
|
|
2250
2416
|
:image,
|
|
2251
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2417
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Type::TaggedSymbol
|
|
2252
2418
|
)
|
|
2253
2419
|
|
|
2254
2420
|
sig do
|
|
2255
2421
|
override.returns(
|
|
2256
2422
|
T::Array[
|
|
2257
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2423
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::EventImageContent::Type::TaggedSymbol
|
|
2258
2424
|
]
|
|
2259
2425
|
)
|
|
2260
2426
|
end
|
|
@@ -2266,7 +2432,7 @@ module SafetyKit
|
|
|
2266
2432
|
sig do
|
|
2267
2433
|
override.returns(
|
|
2268
2434
|
T::Array[
|
|
2269
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2435
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Content::Variants
|
|
2270
2436
|
]
|
|
2271
2437
|
)
|
|
2272
2438
|
end
|
|
@@ -2284,7 +2450,7 @@ module SafetyKit
|
|
|
2284
2450
|
Float,
|
|
2285
2451
|
T::Boolean,
|
|
2286
2452
|
T::Array[
|
|
2287
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2453
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Metadata::UnionMember3::Variants
|
|
2288
2454
|
]
|
|
2289
2455
|
)
|
|
2290
2456
|
end
|
|
@@ -2297,7 +2463,7 @@ module SafetyKit
|
|
|
2297
2463
|
sig do
|
|
2298
2464
|
override.returns(
|
|
2299
2465
|
T::Array[
|
|
2300
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2466
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Metadata::UnionMember3::Variants
|
|
2301
2467
|
]
|
|
2302
2468
|
)
|
|
2303
2469
|
end
|
|
@@ -2308,7 +2474,7 @@ module SafetyKit
|
|
|
2308
2474
|
sig do
|
|
2309
2475
|
override.returns(
|
|
2310
2476
|
T::Array[
|
|
2311
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2477
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Metadata::Variants
|
|
2312
2478
|
]
|
|
2313
2479
|
)
|
|
2314
2480
|
end
|
|
@@ -2319,7 +2485,7 @@ module SafetyKit
|
|
|
2319
2485
|
T.let(
|
|
2320
2486
|
SafetyKit::Internal::Type::ArrayOf[
|
|
2321
2487
|
union:
|
|
2322
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2488
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::Metadata::UnionMember3
|
|
2323
2489
|
],
|
|
2324
2490
|
SafetyKit::Internal::Type::Converter
|
|
2325
2491
|
)
|
|
@@ -2329,7 +2495,7 @@ module SafetyKit
|
|
|
2329
2495
|
OrHash =
|
|
2330
2496
|
T.type_alias do
|
|
2331
2497
|
T.any(
|
|
2332
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2498
|
+
SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::ResourcesUsed,
|
|
2333
2499
|
SafetyKit::Internal::AnyHash
|
|
2334
2500
|
)
|
|
2335
2501
|
end
|
|
@@ -2340,7 +2506,7 @@ module SafetyKit
|
|
|
2340
2506
|
attr_accessor :type
|
|
2341
2507
|
|
|
2342
2508
|
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
2343
|
-
# value, not the raw value.
|
|
2509
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
2344
2510
|
sig { returns(String) }
|
|
2345
2511
|
attr_accessor :value
|
|
2346
2512
|
|
|
@@ -2354,7 +2520,7 @@ module SafetyKit
|
|
|
2354
2520
|
# youtube, linkedin, or another stable snake_case identifier.
|
|
2355
2521
|
type:,
|
|
2356
2522
|
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
2357
|
-
# value, not the raw value.
|
|
2523
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
2358
2524
|
value:
|
|
2359
2525
|
)
|
|
2360
2526
|
end
|
|
@@ -2365,13 +2531,2326 @@ module SafetyKit
|
|
|
2365
2531
|
end
|
|
2366
2532
|
end
|
|
2367
2533
|
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2534
|
+
# A user contacts, transacts with, or otherwise interacts with another user.
|
|
2535
|
+
module UnionMember4
|
|
2536
|
+
extend SafetyKit::Internal::Type::Union
|
|
2537
|
+
|
|
2538
|
+
Variants =
|
|
2539
|
+
T.type_alias do
|
|
2540
|
+
T.any(
|
|
2541
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact,
|
|
2542
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded,
|
|
2543
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount,
|
|
2544
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount
|
|
2545
|
+
)
|
|
2546
|
+
end
|
|
2547
|
+
|
|
2548
|
+
class UserContact < SafetyKit::Internal::Type::BaseModel
|
|
2549
|
+
OrHash =
|
|
2550
|
+
T.type_alias do
|
|
2551
|
+
T.any(
|
|
2552
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact,
|
|
2553
|
+
SafetyKit::Internal::AnyHash
|
|
2554
|
+
)
|
|
2555
|
+
end
|
|
2556
|
+
|
|
2557
|
+
# Your stable canonical identifier for the other user in a user-to-user
|
|
2558
|
+
# interaction.
|
|
2559
|
+
sig { returns(String) }
|
|
2560
|
+
attr_accessor :counterparty_user_id
|
|
2561
|
+
|
|
2562
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
2563
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
2564
|
+
sig { returns(String) }
|
|
2565
|
+
attr_accessor :event_name
|
|
2566
|
+
|
|
2567
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
2568
|
+
sig { returns(Time) }
|
|
2569
|
+
attr_accessor :timestamp
|
|
2570
|
+
|
|
2571
|
+
sig { returns(Symbol) }
|
|
2572
|
+
attr_accessor :type
|
|
2573
|
+
|
|
2574
|
+
# Your stable canonical identifier for the user or account.
|
|
2575
|
+
sig { returns(String) }
|
|
2576
|
+
attr_accessor :user_id
|
|
2577
|
+
|
|
2578
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
2579
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
2580
|
+
# analyze.
|
|
2581
|
+
sig do
|
|
2582
|
+
returns(
|
|
2583
|
+
T.nilable(
|
|
2584
|
+
T::Array[
|
|
2585
|
+
T.any(
|
|
2586
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent,
|
|
2587
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent
|
|
2588
|
+
)
|
|
2589
|
+
]
|
|
2590
|
+
)
|
|
2591
|
+
)
|
|
2592
|
+
end
|
|
2593
|
+
attr_reader :content
|
|
2594
|
+
|
|
2595
|
+
sig do
|
|
2596
|
+
params(
|
|
2597
|
+
content:
|
|
2598
|
+
T::Array[
|
|
2599
|
+
T.any(
|
|
2600
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent::OrHash,
|
|
2601
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::OrHash
|
|
2602
|
+
)
|
|
2603
|
+
]
|
|
2604
|
+
).void
|
|
2605
|
+
end
|
|
2606
|
+
attr_writer :content
|
|
2607
|
+
|
|
2608
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
2609
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
2610
|
+
sig do
|
|
2611
|
+
returns(
|
|
2612
|
+
T.nilable(
|
|
2613
|
+
T::Hash[
|
|
2614
|
+
Symbol,
|
|
2615
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Metadata::Variants
|
|
2616
|
+
]
|
|
2617
|
+
)
|
|
2618
|
+
)
|
|
2619
|
+
end
|
|
2620
|
+
attr_reader :metadata
|
|
2621
|
+
|
|
2622
|
+
sig do
|
|
2623
|
+
params(
|
|
2624
|
+
metadata:
|
|
2625
|
+
T::Hash[
|
|
2626
|
+
Symbol,
|
|
2627
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Metadata::Variants
|
|
2628
|
+
]
|
|
2629
|
+
).void
|
|
2630
|
+
end
|
|
2631
|
+
attr_writer :metadata
|
|
2632
|
+
|
|
2633
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
2634
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
2635
|
+
# identifiers.
|
|
2636
|
+
sig do
|
|
2637
|
+
returns(
|
|
2638
|
+
T.nilable(
|
|
2639
|
+
T::Array[
|
|
2640
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::ResourcesUsed
|
|
2641
|
+
]
|
|
2642
|
+
)
|
|
2643
|
+
)
|
|
2644
|
+
end
|
|
2645
|
+
attr_reader :resources_used
|
|
2646
|
+
|
|
2647
|
+
sig do
|
|
2648
|
+
params(
|
|
2649
|
+
resources_used:
|
|
2650
|
+
T::Array[
|
|
2651
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::ResourcesUsed::OrHash
|
|
2652
|
+
]
|
|
2653
|
+
).void
|
|
2654
|
+
end
|
|
2655
|
+
attr_writer :resources_used
|
|
2656
|
+
|
|
2657
|
+
# A user contacts, transacts with, or otherwise interacts with another user.
|
|
2658
|
+
sig do
|
|
2659
|
+
params(
|
|
2660
|
+
counterparty_user_id: String,
|
|
2661
|
+
event_name: String,
|
|
2662
|
+
timestamp: Time,
|
|
2663
|
+
user_id: String,
|
|
2664
|
+
content:
|
|
2665
|
+
T::Array[
|
|
2666
|
+
T.any(
|
|
2667
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent::OrHash,
|
|
2668
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::OrHash
|
|
2669
|
+
)
|
|
2670
|
+
],
|
|
2671
|
+
metadata:
|
|
2672
|
+
T::Hash[
|
|
2673
|
+
Symbol,
|
|
2674
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Metadata::Variants
|
|
2675
|
+
],
|
|
2676
|
+
resources_used:
|
|
2677
|
+
T::Array[
|
|
2678
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::ResourcesUsed::OrHash
|
|
2679
|
+
],
|
|
2680
|
+
type: Symbol
|
|
2681
|
+
).returns(T.attached_class)
|
|
2682
|
+
end
|
|
2683
|
+
def self.new(
|
|
2684
|
+
# Your stable canonical identifier for the other user in a user-to-user
|
|
2685
|
+
# interaction.
|
|
2686
|
+
counterparty_user_id:,
|
|
2687
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
2688
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
2689
|
+
event_name:,
|
|
2690
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
2691
|
+
timestamp:,
|
|
2692
|
+
# Your stable canonical identifier for the user or account.
|
|
2693
|
+
user_id:,
|
|
2694
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
2695
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
2696
|
+
# analyze.
|
|
2697
|
+
content: nil,
|
|
2698
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
2699
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
2700
|
+
metadata: nil,
|
|
2701
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
2702
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
2703
|
+
# identifiers.
|
|
2704
|
+
resources_used: nil,
|
|
2705
|
+
type: :user_contact
|
|
2706
|
+
)
|
|
2707
|
+
end
|
|
2708
|
+
|
|
2709
|
+
sig do
|
|
2710
|
+
override.returns(
|
|
2711
|
+
{
|
|
2712
|
+
counterparty_user_id: String,
|
|
2713
|
+
event_name: String,
|
|
2714
|
+
timestamp: Time,
|
|
2715
|
+
type: Symbol,
|
|
2716
|
+
user_id: String,
|
|
2717
|
+
content:
|
|
2718
|
+
T::Array[
|
|
2719
|
+
T.any(
|
|
2720
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent,
|
|
2721
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent
|
|
2722
|
+
)
|
|
2723
|
+
],
|
|
2724
|
+
metadata:
|
|
2725
|
+
T::Hash[
|
|
2726
|
+
Symbol,
|
|
2727
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Metadata::Variants
|
|
2728
|
+
],
|
|
2729
|
+
resources_used:
|
|
2730
|
+
T::Array[
|
|
2731
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::ResourcesUsed
|
|
2732
|
+
]
|
|
2733
|
+
}
|
|
2734
|
+
)
|
|
2735
|
+
end
|
|
2736
|
+
def to_hash
|
|
2737
|
+
end
|
|
2738
|
+
|
|
2739
|
+
# User-authored text content associated with an event.
|
|
2740
|
+
module Content
|
|
2741
|
+
extend SafetyKit::Internal::Type::Union
|
|
2742
|
+
|
|
2743
|
+
Variants =
|
|
2744
|
+
T.type_alias do
|
|
2745
|
+
T.any(
|
|
2746
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent,
|
|
2747
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent
|
|
2748
|
+
)
|
|
2749
|
+
end
|
|
2750
|
+
|
|
2751
|
+
class EventTextContent < SafetyKit::Internal::Type::BaseModel
|
|
2752
|
+
OrHash =
|
|
2753
|
+
T.type_alias do
|
|
2754
|
+
T.any(
|
|
2755
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent,
|
|
2756
|
+
SafetyKit::Internal::AnyHash
|
|
2757
|
+
)
|
|
2758
|
+
end
|
|
2759
|
+
|
|
2760
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
2761
|
+
sig { returns(String) }
|
|
2762
|
+
attr_accessor :text
|
|
2763
|
+
|
|
2764
|
+
# Text content part.
|
|
2765
|
+
sig do
|
|
2766
|
+
returns(
|
|
2767
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent::Type::OrSymbol
|
|
2768
|
+
)
|
|
2769
|
+
end
|
|
2770
|
+
attr_accessor :type
|
|
2771
|
+
|
|
2772
|
+
# Stable field key for this content part.
|
|
2773
|
+
sig { returns(T.nilable(String)) }
|
|
2774
|
+
attr_reader :key
|
|
2775
|
+
|
|
2776
|
+
sig { params(key: String).void }
|
|
2777
|
+
attr_writer :key
|
|
2778
|
+
|
|
2779
|
+
# User-authored text content associated with an event.
|
|
2780
|
+
sig do
|
|
2781
|
+
params(
|
|
2782
|
+
text: String,
|
|
2783
|
+
type:
|
|
2784
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent::Type::OrSymbol,
|
|
2785
|
+
key: String
|
|
2786
|
+
).returns(T.attached_class)
|
|
2787
|
+
end
|
|
2788
|
+
def self.new(
|
|
2789
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
2790
|
+
text:,
|
|
2791
|
+
# Text content part.
|
|
2792
|
+
type:,
|
|
2793
|
+
# Stable field key for this content part.
|
|
2794
|
+
key: nil
|
|
2795
|
+
)
|
|
2796
|
+
end
|
|
2797
|
+
|
|
2798
|
+
sig do
|
|
2799
|
+
override.returns(
|
|
2800
|
+
{
|
|
2801
|
+
text: String,
|
|
2802
|
+
type:
|
|
2803
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent::Type::OrSymbol,
|
|
2804
|
+
key: String
|
|
2805
|
+
}
|
|
2806
|
+
)
|
|
2807
|
+
end
|
|
2808
|
+
def to_hash
|
|
2809
|
+
end
|
|
2810
|
+
|
|
2811
|
+
# Text content part.
|
|
2812
|
+
module Type
|
|
2813
|
+
extend SafetyKit::Internal::Type::Enum
|
|
2814
|
+
|
|
2815
|
+
TaggedSymbol =
|
|
2816
|
+
T.type_alias do
|
|
2817
|
+
T.all(
|
|
2818
|
+
Symbol,
|
|
2819
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent::Type
|
|
2820
|
+
)
|
|
2821
|
+
end
|
|
2822
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2823
|
+
|
|
2824
|
+
TEXT =
|
|
2825
|
+
T.let(
|
|
2826
|
+
:text,
|
|
2827
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent::Type::TaggedSymbol
|
|
2828
|
+
)
|
|
2829
|
+
|
|
2830
|
+
sig do
|
|
2831
|
+
override.returns(
|
|
2832
|
+
T::Array[
|
|
2833
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventTextContent::Type::TaggedSymbol
|
|
2834
|
+
]
|
|
2835
|
+
)
|
|
2836
|
+
end
|
|
2837
|
+
def self.values
|
|
2838
|
+
end
|
|
2839
|
+
end
|
|
2840
|
+
end
|
|
2841
|
+
|
|
2842
|
+
class EventImageContent < SafetyKit::Internal::Type::BaseModel
|
|
2843
|
+
OrHash =
|
|
2844
|
+
T.type_alias do
|
|
2845
|
+
T.any(
|
|
2846
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent,
|
|
2847
|
+
SafetyKit::Internal::AnyHash
|
|
2848
|
+
)
|
|
2849
|
+
end
|
|
2850
|
+
|
|
2851
|
+
# Image source information.
|
|
2852
|
+
sig do
|
|
2853
|
+
returns(
|
|
2854
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source
|
|
2855
|
+
)
|
|
2856
|
+
end
|
|
2857
|
+
attr_reader :source
|
|
2858
|
+
|
|
2859
|
+
sig do
|
|
2860
|
+
params(
|
|
2861
|
+
source:
|
|
2862
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source::OrHash
|
|
2863
|
+
).void
|
|
2864
|
+
end
|
|
2865
|
+
attr_writer :source
|
|
2866
|
+
|
|
2867
|
+
# Image content part.
|
|
2868
|
+
sig do
|
|
2869
|
+
returns(
|
|
2870
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Type::OrSymbol
|
|
2871
|
+
)
|
|
2872
|
+
end
|
|
2873
|
+
attr_accessor :type
|
|
2874
|
+
|
|
2875
|
+
# Stable field key for this content part.
|
|
2876
|
+
sig { returns(T.nilable(String)) }
|
|
2877
|
+
attr_reader :key
|
|
2878
|
+
|
|
2879
|
+
sig { params(key: String).void }
|
|
2880
|
+
attr_writer :key
|
|
2881
|
+
|
|
2882
|
+
# User-uploaded image content associated with an event.
|
|
2883
|
+
sig do
|
|
2884
|
+
params(
|
|
2885
|
+
source:
|
|
2886
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source::OrHash,
|
|
2887
|
+
type:
|
|
2888
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Type::OrSymbol,
|
|
2889
|
+
key: String
|
|
2890
|
+
).returns(T.attached_class)
|
|
2891
|
+
end
|
|
2892
|
+
def self.new(
|
|
2893
|
+
# Image source information.
|
|
2894
|
+
source:,
|
|
2895
|
+
# Image content part.
|
|
2896
|
+
type:,
|
|
2897
|
+
# Stable field key for this content part.
|
|
2898
|
+
key: nil
|
|
2899
|
+
)
|
|
2900
|
+
end
|
|
2901
|
+
|
|
2902
|
+
sig do
|
|
2903
|
+
override.returns(
|
|
2904
|
+
{
|
|
2905
|
+
source:
|
|
2906
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source,
|
|
2907
|
+
type:
|
|
2908
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Type::OrSymbol,
|
|
2909
|
+
key: String
|
|
2910
|
+
}
|
|
2911
|
+
)
|
|
2912
|
+
end
|
|
2913
|
+
def to_hash
|
|
2914
|
+
end
|
|
2915
|
+
|
|
2916
|
+
class Source < SafetyKit::Internal::Type::BaseModel
|
|
2917
|
+
OrHash =
|
|
2918
|
+
T.type_alias do
|
|
2919
|
+
T.any(
|
|
2920
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source,
|
|
2921
|
+
SafetyKit::Internal::AnyHash
|
|
2922
|
+
)
|
|
2923
|
+
end
|
|
2924
|
+
|
|
2925
|
+
# URL image source.
|
|
2926
|
+
sig do
|
|
2927
|
+
returns(
|
|
2928
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source::Type::OrSymbol
|
|
2929
|
+
)
|
|
2930
|
+
end
|
|
2931
|
+
attr_accessor :type
|
|
2932
|
+
|
|
2933
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
2934
|
+
sig { returns(String) }
|
|
2935
|
+
attr_accessor :url
|
|
2936
|
+
|
|
2937
|
+
# Image source information.
|
|
2938
|
+
sig do
|
|
2939
|
+
params(
|
|
2940
|
+
type:
|
|
2941
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source::Type::OrSymbol,
|
|
2942
|
+
url: String
|
|
2943
|
+
).returns(T.attached_class)
|
|
2944
|
+
end
|
|
2945
|
+
def self.new(
|
|
2946
|
+
# URL image source.
|
|
2947
|
+
type:,
|
|
2948
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
2949
|
+
url:
|
|
2950
|
+
)
|
|
2951
|
+
end
|
|
2952
|
+
|
|
2953
|
+
sig do
|
|
2954
|
+
override.returns(
|
|
2955
|
+
{
|
|
2956
|
+
type:
|
|
2957
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source::Type::OrSymbol,
|
|
2958
|
+
url: String
|
|
2959
|
+
}
|
|
2960
|
+
)
|
|
2961
|
+
end
|
|
2962
|
+
def to_hash
|
|
2963
|
+
end
|
|
2964
|
+
|
|
2965
|
+
# URL image source.
|
|
2966
|
+
module Type
|
|
2967
|
+
extend SafetyKit::Internal::Type::Enum
|
|
2968
|
+
|
|
2969
|
+
TaggedSymbol =
|
|
2970
|
+
T.type_alias do
|
|
2971
|
+
T.all(
|
|
2972
|
+
Symbol,
|
|
2973
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source::Type
|
|
2974
|
+
)
|
|
2975
|
+
end
|
|
2976
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2977
|
+
|
|
2978
|
+
URL =
|
|
2979
|
+
T.let(
|
|
2980
|
+
:url,
|
|
2981
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
2982
|
+
)
|
|
2983
|
+
|
|
2984
|
+
sig do
|
|
2985
|
+
override.returns(
|
|
2986
|
+
T::Array[
|
|
2987
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
2988
|
+
]
|
|
2989
|
+
)
|
|
2990
|
+
end
|
|
2991
|
+
def self.values
|
|
2992
|
+
end
|
|
2993
|
+
end
|
|
2994
|
+
end
|
|
2995
|
+
|
|
2996
|
+
# Image content part.
|
|
2997
|
+
module Type
|
|
2998
|
+
extend SafetyKit::Internal::Type::Enum
|
|
2999
|
+
|
|
3000
|
+
TaggedSymbol =
|
|
3001
|
+
T.type_alias do
|
|
3002
|
+
T.all(
|
|
3003
|
+
Symbol,
|
|
3004
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Type
|
|
3005
|
+
)
|
|
3006
|
+
end
|
|
3007
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
3008
|
+
|
|
3009
|
+
IMAGE =
|
|
3010
|
+
T.let(
|
|
3011
|
+
:image,
|
|
3012
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Type::TaggedSymbol
|
|
3013
|
+
)
|
|
3014
|
+
|
|
3015
|
+
sig do
|
|
3016
|
+
override.returns(
|
|
3017
|
+
T::Array[
|
|
3018
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::EventImageContent::Type::TaggedSymbol
|
|
3019
|
+
]
|
|
3020
|
+
)
|
|
3021
|
+
end
|
|
3022
|
+
def self.values
|
|
3023
|
+
end
|
|
3024
|
+
end
|
|
3025
|
+
end
|
|
3026
|
+
|
|
3027
|
+
sig do
|
|
3028
|
+
override.returns(
|
|
3029
|
+
T::Array[
|
|
3030
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Content::Variants
|
|
3031
|
+
]
|
|
3032
|
+
)
|
|
3033
|
+
end
|
|
3034
|
+
def self.variants
|
|
3035
|
+
end
|
|
3036
|
+
end
|
|
3037
|
+
|
|
3038
|
+
module Metadata
|
|
3039
|
+
extend SafetyKit::Internal::Type::Union
|
|
3040
|
+
|
|
3041
|
+
Variants =
|
|
3042
|
+
T.type_alias do
|
|
3043
|
+
T.any(
|
|
3044
|
+
String,
|
|
3045
|
+
Float,
|
|
3046
|
+
T::Boolean,
|
|
3047
|
+
T::Array[
|
|
3048
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Metadata::UnionMember3::Variants
|
|
3049
|
+
]
|
|
3050
|
+
)
|
|
3051
|
+
end
|
|
3052
|
+
|
|
3053
|
+
module UnionMember3
|
|
3054
|
+
extend SafetyKit::Internal::Type::Union
|
|
3055
|
+
|
|
3056
|
+
Variants = T.type_alias { T.any(String, Float, T::Boolean) }
|
|
3057
|
+
|
|
3058
|
+
sig do
|
|
3059
|
+
override.returns(
|
|
3060
|
+
T::Array[
|
|
3061
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Metadata::UnionMember3::Variants
|
|
3062
|
+
]
|
|
3063
|
+
)
|
|
3064
|
+
end
|
|
3065
|
+
def self.variants
|
|
3066
|
+
end
|
|
3067
|
+
end
|
|
3068
|
+
|
|
3069
|
+
sig do
|
|
3070
|
+
override.returns(
|
|
3071
|
+
T::Array[
|
|
3072
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Metadata::Variants
|
|
3073
|
+
]
|
|
3074
|
+
)
|
|
3075
|
+
end
|
|
3076
|
+
def self.variants
|
|
3077
|
+
end
|
|
3078
|
+
|
|
3079
|
+
UnionMember3Array =
|
|
3080
|
+
T.let(
|
|
3081
|
+
SafetyKit::Internal::Type::ArrayOf[
|
|
3082
|
+
union:
|
|
3083
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::Metadata::UnionMember3
|
|
3084
|
+
],
|
|
3085
|
+
SafetyKit::Internal::Type::Converter
|
|
3086
|
+
)
|
|
3087
|
+
end
|
|
3088
|
+
|
|
3089
|
+
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
3090
|
+
OrHash =
|
|
3091
|
+
T.type_alias do
|
|
3092
|
+
T.any(
|
|
3093
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UserContact::ResourcesUsed,
|
|
3094
|
+
SafetyKit::Internal::AnyHash
|
|
3095
|
+
)
|
|
3096
|
+
end
|
|
3097
|
+
|
|
3098
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
3099
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
3100
|
+
sig { returns(String) }
|
|
3101
|
+
attr_accessor :type
|
|
3102
|
+
|
|
3103
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
3104
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
3105
|
+
sig { returns(String) }
|
|
3106
|
+
attr_accessor :value
|
|
3107
|
+
|
|
3108
|
+
# Real-world or account resource used during the event, such as an email, phone
|
|
3109
|
+
# number, address, URL, social handle, or payment identifier.
|
|
3110
|
+
sig do
|
|
3111
|
+
params(type: String, value: String).returns(T.attached_class)
|
|
3112
|
+
end
|
|
3113
|
+
def self.new(
|
|
3114
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
3115
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
3116
|
+
type:,
|
|
3117
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
3118
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
3119
|
+
value:
|
|
3120
|
+
)
|
|
3121
|
+
end
|
|
3122
|
+
|
|
3123
|
+
sig { override.returns({ type: String, value: String }) }
|
|
3124
|
+
def to_hash
|
|
3125
|
+
end
|
|
3126
|
+
end
|
|
3127
|
+
end
|
|
3128
|
+
|
|
3129
|
+
class ContentUploaded < SafetyKit::Internal::Type::BaseModel
|
|
3130
|
+
OrHash =
|
|
3131
|
+
T.type_alias do
|
|
3132
|
+
T.any(
|
|
3133
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded,
|
|
3134
|
+
SafetyKit::Internal::AnyHash
|
|
3135
|
+
)
|
|
3136
|
+
end
|
|
3137
|
+
|
|
3138
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
3139
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
3140
|
+
# analyze.
|
|
3141
|
+
sig do
|
|
3142
|
+
returns(
|
|
3143
|
+
T::Array[
|
|
3144
|
+
T.any(
|
|
3145
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent,
|
|
3146
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent
|
|
3147
|
+
)
|
|
3148
|
+
]
|
|
3149
|
+
)
|
|
3150
|
+
end
|
|
3151
|
+
attr_accessor :content
|
|
3152
|
+
|
|
3153
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
3154
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
3155
|
+
sig { returns(String) }
|
|
3156
|
+
attr_accessor :event_name
|
|
3157
|
+
|
|
3158
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
3159
|
+
sig { returns(Time) }
|
|
3160
|
+
attr_accessor :timestamp
|
|
3161
|
+
|
|
3162
|
+
sig { returns(Symbol) }
|
|
3163
|
+
attr_accessor :type
|
|
3164
|
+
|
|
3165
|
+
# Your stable canonical identifier for the user or account.
|
|
3166
|
+
sig { returns(String) }
|
|
3167
|
+
attr_accessor :user_id
|
|
3168
|
+
|
|
3169
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
3170
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
3171
|
+
sig do
|
|
3172
|
+
returns(
|
|
3173
|
+
T.nilable(
|
|
3174
|
+
T::Hash[
|
|
3175
|
+
Symbol,
|
|
3176
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Metadata::Variants
|
|
3177
|
+
]
|
|
3178
|
+
)
|
|
3179
|
+
)
|
|
3180
|
+
end
|
|
3181
|
+
attr_reader :metadata
|
|
3182
|
+
|
|
3183
|
+
sig do
|
|
3184
|
+
params(
|
|
3185
|
+
metadata:
|
|
3186
|
+
T::Hash[
|
|
3187
|
+
Symbol,
|
|
3188
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Metadata::Variants
|
|
3189
|
+
]
|
|
3190
|
+
).void
|
|
3191
|
+
end
|
|
3192
|
+
attr_writer :metadata
|
|
3193
|
+
|
|
3194
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
3195
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
3196
|
+
# identifiers.
|
|
3197
|
+
sig do
|
|
3198
|
+
returns(
|
|
3199
|
+
T.nilable(
|
|
3200
|
+
T::Array[
|
|
3201
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::ResourcesUsed
|
|
3202
|
+
]
|
|
3203
|
+
)
|
|
3204
|
+
)
|
|
3205
|
+
end
|
|
3206
|
+
attr_reader :resources_used
|
|
3207
|
+
|
|
3208
|
+
sig do
|
|
3209
|
+
params(
|
|
3210
|
+
resources_used:
|
|
3211
|
+
T::Array[
|
|
3212
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::ResourcesUsed::OrHash
|
|
3213
|
+
]
|
|
3214
|
+
).void
|
|
3215
|
+
end
|
|
3216
|
+
attr_writer :resources_used
|
|
3217
|
+
|
|
3218
|
+
# A user posts, uploads, publishes, edits, or replaces content.
|
|
3219
|
+
sig do
|
|
3220
|
+
params(
|
|
3221
|
+
content:
|
|
3222
|
+
T::Array[
|
|
3223
|
+
T.any(
|
|
3224
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent::OrHash,
|
|
3225
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::OrHash
|
|
3226
|
+
)
|
|
3227
|
+
],
|
|
3228
|
+
event_name: String,
|
|
3229
|
+
timestamp: Time,
|
|
3230
|
+
user_id: String,
|
|
3231
|
+
metadata:
|
|
3232
|
+
T::Hash[
|
|
3233
|
+
Symbol,
|
|
3234
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Metadata::Variants
|
|
3235
|
+
],
|
|
3236
|
+
resources_used:
|
|
3237
|
+
T::Array[
|
|
3238
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::ResourcesUsed::OrHash
|
|
3239
|
+
],
|
|
3240
|
+
type: Symbol
|
|
3241
|
+
).returns(T.attached_class)
|
|
3242
|
+
end
|
|
3243
|
+
def self.new(
|
|
3244
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
3245
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
3246
|
+
# analyze.
|
|
3247
|
+
content:,
|
|
3248
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
3249
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
3250
|
+
event_name:,
|
|
3251
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
3252
|
+
timestamp:,
|
|
3253
|
+
# Your stable canonical identifier for the user or account.
|
|
3254
|
+
user_id:,
|
|
3255
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
3256
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
3257
|
+
metadata: nil,
|
|
3258
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
3259
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
3260
|
+
# identifiers.
|
|
3261
|
+
resources_used: nil,
|
|
3262
|
+
type: :content_uploaded
|
|
3263
|
+
)
|
|
3264
|
+
end
|
|
3265
|
+
|
|
3266
|
+
sig do
|
|
3267
|
+
override.returns(
|
|
3268
|
+
{
|
|
3269
|
+
content:
|
|
3270
|
+
T::Array[
|
|
3271
|
+
T.any(
|
|
3272
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent,
|
|
3273
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent
|
|
3274
|
+
)
|
|
3275
|
+
],
|
|
3276
|
+
event_name: String,
|
|
3277
|
+
timestamp: Time,
|
|
3278
|
+
type: Symbol,
|
|
3279
|
+
user_id: String,
|
|
3280
|
+
metadata:
|
|
3281
|
+
T::Hash[
|
|
3282
|
+
Symbol,
|
|
3283
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Metadata::Variants
|
|
3284
|
+
],
|
|
3285
|
+
resources_used:
|
|
3286
|
+
T::Array[
|
|
3287
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::ResourcesUsed
|
|
3288
|
+
]
|
|
3289
|
+
}
|
|
3290
|
+
)
|
|
3291
|
+
end
|
|
3292
|
+
def to_hash
|
|
3293
|
+
end
|
|
3294
|
+
|
|
3295
|
+
# User-authored text content associated with an event.
|
|
3296
|
+
module Content
|
|
3297
|
+
extend SafetyKit::Internal::Type::Union
|
|
3298
|
+
|
|
3299
|
+
Variants =
|
|
3300
|
+
T.type_alias do
|
|
3301
|
+
T.any(
|
|
3302
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent,
|
|
3303
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent
|
|
3304
|
+
)
|
|
3305
|
+
end
|
|
3306
|
+
|
|
3307
|
+
class EventTextContent < SafetyKit::Internal::Type::BaseModel
|
|
3308
|
+
OrHash =
|
|
3309
|
+
T.type_alias do
|
|
3310
|
+
T.any(
|
|
3311
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent,
|
|
3312
|
+
SafetyKit::Internal::AnyHash
|
|
3313
|
+
)
|
|
3314
|
+
end
|
|
3315
|
+
|
|
3316
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
3317
|
+
sig { returns(String) }
|
|
3318
|
+
attr_accessor :text
|
|
3319
|
+
|
|
3320
|
+
# Text content part.
|
|
3321
|
+
sig do
|
|
3322
|
+
returns(
|
|
3323
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent::Type::OrSymbol
|
|
3324
|
+
)
|
|
3325
|
+
end
|
|
3326
|
+
attr_accessor :type
|
|
3327
|
+
|
|
3328
|
+
# Stable field key for this content part.
|
|
3329
|
+
sig { returns(T.nilable(String)) }
|
|
3330
|
+
attr_reader :key
|
|
3331
|
+
|
|
3332
|
+
sig { params(key: String).void }
|
|
3333
|
+
attr_writer :key
|
|
3334
|
+
|
|
3335
|
+
# User-authored text content associated with an event.
|
|
3336
|
+
sig do
|
|
3337
|
+
params(
|
|
3338
|
+
text: String,
|
|
3339
|
+
type:
|
|
3340
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent::Type::OrSymbol,
|
|
3341
|
+
key: String
|
|
3342
|
+
).returns(T.attached_class)
|
|
3343
|
+
end
|
|
3344
|
+
def self.new(
|
|
3345
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
3346
|
+
text:,
|
|
3347
|
+
# Text content part.
|
|
3348
|
+
type:,
|
|
3349
|
+
# Stable field key for this content part.
|
|
3350
|
+
key: nil
|
|
3351
|
+
)
|
|
3352
|
+
end
|
|
3353
|
+
|
|
3354
|
+
sig do
|
|
3355
|
+
override.returns(
|
|
3356
|
+
{
|
|
3357
|
+
text: String,
|
|
3358
|
+
type:
|
|
3359
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent::Type::OrSymbol,
|
|
3360
|
+
key: String
|
|
3361
|
+
}
|
|
3362
|
+
)
|
|
3363
|
+
end
|
|
3364
|
+
def to_hash
|
|
3365
|
+
end
|
|
3366
|
+
|
|
3367
|
+
# Text content part.
|
|
3368
|
+
module Type
|
|
3369
|
+
extend SafetyKit::Internal::Type::Enum
|
|
3370
|
+
|
|
3371
|
+
TaggedSymbol =
|
|
3372
|
+
T.type_alias do
|
|
3373
|
+
T.all(
|
|
3374
|
+
Symbol,
|
|
3375
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent::Type
|
|
3376
|
+
)
|
|
3377
|
+
end
|
|
3378
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
3379
|
+
|
|
3380
|
+
TEXT =
|
|
3381
|
+
T.let(
|
|
3382
|
+
:text,
|
|
3383
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent::Type::TaggedSymbol
|
|
3384
|
+
)
|
|
3385
|
+
|
|
3386
|
+
sig do
|
|
3387
|
+
override.returns(
|
|
3388
|
+
T::Array[
|
|
3389
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventTextContent::Type::TaggedSymbol
|
|
3390
|
+
]
|
|
3391
|
+
)
|
|
3392
|
+
end
|
|
3393
|
+
def self.values
|
|
3394
|
+
end
|
|
3395
|
+
end
|
|
3396
|
+
end
|
|
3397
|
+
|
|
3398
|
+
class EventImageContent < SafetyKit::Internal::Type::BaseModel
|
|
3399
|
+
OrHash =
|
|
3400
|
+
T.type_alias do
|
|
3401
|
+
T.any(
|
|
3402
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent,
|
|
3403
|
+
SafetyKit::Internal::AnyHash
|
|
3404
|
+
)
|
|
3405
|
+
end
|
|
3406
|
+
|
|
3407
|
+
# Image source information.
|
|
3408
|
+
sig do
|
|
3409
|
+
returns(
|
|
3410
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source
|
|
3411
|
+
)
|
|
3412
|
+
end
|
|
3413
|
+
attr_reader :source
|
|
3414
|
+
|
|
3415
|
+
sig do
|
|
3416
|
+
params(
|
|
3417
|
+
source:
|
|
3418
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source::OrHash
|
|
3419
|
+
).void
|
|
3420
|
+
end
|
|
3421
|
+
attr_writer :source
|
|
3422
|
+
|
|
3423
|
+
# Image content part.
|
|
3424
|
+
sig do
|
|
3425
|
+
returns(
|
|
3426
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Type::OrSymbol
|
|
3427
|
+
)
|
|
3428
|
+
end
|
|
3429
|
+
attr_accessor :type
|
|
3430
|
+
|
|
3431
|
+
# Stable field key for this content part.
|
|
3432
|
+
sig { returns(T.nilable(String)) }
|
|
3433
|
+
attr_reader :key
|
|
3434
|
+
|
|
3435
|
+
sig { params(key: String).void }
|
|
3436
|
+
attr_writer :key
|
|
3437
|
+
|
|
3438
|
+
# User-uploaded image content associated with an event.
|
|
3439
|
+
sig do
|
|
3440
|
+
params(
|
|
3441
|
+
source:
|
|
3442
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source::OrHash,
|
|
3443
|
+
type:
|
|
3444
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Type::OrSymbol,
|
|
3445
|
+
key: String
|
|
3446
|
+
).returns(T.attached_class)
|
|
3447
|
+
end
|
|
3448
|
+
def self.new(
|
|
3449
|
+
# Image source information.
|
|
3450
|
+
source:,
|
|
3451
|
+
# Image content part.
|
|
3452
|
+
type:,
|
|
3453
|
+
# Stable field key for this content part.
|
|
3454
|
+
key: nil
|
|
3455
|
+
)
|
|
3456
|
+
end
|
|
3457
|
+
|
|
3458
|
+
sig do
|
|
3459
|
+
override.returns(
|
|
3460
|
+
{
|
|
3461
|
+
source:
|
|
3462
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source,
|
|
3463
|
+
type:
|
|
3464
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Type::OrSymbol,
|
|
3465
|
+
key: String
|
|
3466
|
+
}
|
|
3467
|
+
)
|
|
3468
|
+
end
|
|
3469
|
+
def to_hash
|
|
3470
|
+
end
|
|
3471
|
+
|
|
3472
|
+
class Source < SafetyKit::Internal::Type::BaseModel
|
|
3473
|
+
OrHash =
|
|
3474
|
+
T.type_alias do
|
|
3475
|
+
T.any(
|
|
3476
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source,
|
|
3477
|
+
SafetyKit::Internal::AnyHash
|
|
3478
|
+
)
|
|
3479
|
+
end
|
|
3480
|
+
|
|
3481
|
+
# URL image source.
|
|
3482
|
+
sig do
|
|
3483
|
+
returns(
|
|
3484
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source::Type::OrSymbol
|
|
3485
|
+
)
|
|
3486
|
+
end
|
|
3487
|
+
attr_accessor :type
|
|
3488
|
+
|
|
3489
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
3490
|
+
sig { returns(String) }
|
|
3491
|
+
attr_accessor :url
|
|
3492
|
+
|
|
3493
|
+
# Image source information.
|
|
3494
|
+
sig do
|
|
3495
|
+
params(
|
|
3496
|
+
type:
|
|
3497
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source::Type::OrSymbol,
|
|
3498
|
+
url: String
|
|
3499
|
+
).returns(T.attached_class)
|
|
3500
|
+
end
|
|
3501
|
+
def self.new(
|
|
3502
|
+
# URL image source.
|
|
3503
|
+
type:,
|
|
3504
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
3505
|
+
url:
|
|
3506
|
+
)
|
|
3507
|
+
end
|
|
3508
|
+
|
|
3509
|
+
sig do
|
|
3510
|
+
override.returns(
|
|
3511
|
+
{
|
|
3512
|
+
type:
|
|
3513
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source::Type::OrSymbol,
|
|
3514
|
+
url: String
|
|
3515
|
+
}
|
|
3516
|
+
)
|
|
3517
|
+
end
|
|
3518
|
+
def to_hash
|
|
3519
|
+
end
|
|
3520
|
+
|
|
3521
|
+
# URL image source.
|
|
3522
|
+
module Type
|
|
3523
|
+
extend SafetyKit::Internal::Type::Enum
|
|
3524
|
+
|
|
3525
|
+
TaggedSymbol =
|
|
3526
|
+
T.type_alias do
|
|
3527
|
+
T.all(
|
|
3528
|
+
Symbol,
|
|
3529
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source::Type
|
|
3530
|
+
)
|
|
3531
|
+
end
|
|
3532
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
3533
|
+
|
|
3534
|
+
URL =
|
|
3535
|
+
T.let(
|
|
3536
|
+
:url,
|
|
3537
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
3538
|
+
)
|
|
3539
|
+
|
|
3540
|
+
sig do
|
|
3541
|
+
override.returns(
|
|
3542
|
+
T::Array[
|
|
3543
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
3544
|
+
]
|
|
3545
|
+
)
|
|
3546
|
+
end
|
|
3547
|
+
def self.values
|
|
3548
|
+
end
|
|
3549
|
+
end
|
|
3550
|
+
end
|
|
3551
|
+
|
|
3552
|
+
# Image content part.
|
|
3553
|
+
module Type
|
|
3554
|
+
extend SafetyKit::Internal::Type::Enum
|
|
3555
|
+
|
|
3556
|
+
TaggedSymbol =
|
|
3557
|
+
T.type_alias do
|
|
3558
|
+
T.all(
|
|
3559
|
+
Symbol,
|
|
3560
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Type
|
|
3561
|
+
)
|
|
3562
|
+
end
|
|
3563
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
3564
|
+
|
|
3565
|
+
IMAGE =
|
|
3566
|
+
T.let(
|
|
3567
|
+
:image,
|
|
3568
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Type::TaggedSymbol
|
|
3569
|
+
)
|
|
3570
|
+
|
|
3571
|
+
sig do
|
|
3572
|
+
override.returns(
|
|
3573
|
+
T::Array[
|
|
3574
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::EventImageContent::Type::TaggedSymbol
|
|
3575
|
+
]
|
|
3576
|
+
)
|
|
3577
|
+
end
|
|
3578
|
+
def self.values
|
|
3579
|
+
end
|
|
3580
|
+
end
|
|
3581
|
+
end
|
|
3582
|
+
|
|
3583
|
+
sig do
|
|
3584
|
+
override.returns(
|
|
3585
|
+
T::Array[
|
|
3586
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Content::Variants
|
|
3587
|
+
]
|
|
3588
|
+
)
|
|
3589
|
+
end
|
|
3590
|
+
def self.variants
|
|
3591
|
+
end
|
|
3592
|
+
end
|
|
3593
|
+
|
|
3594
|
+
module Metadata
|
|
3595
|
+
extend SafetyKit::Internal::Type::Union
|
|
3596
|
+
|
|
3597
|
+
Variants =
|
|
3598
|
+
T.type_alias do
|
|
3599
|
+
T.any(
|
|
3600
|
+
String,
|
|
3601
|
+
Float,
|
|
3602
|
+
T::Boolean,
|
|
3603
|
+
T::Array[
|
|
3604
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Metadata::UnionMember3::Variants
|
|
3605
|
+
]
|
|
3606
|
+
)
|
|
3607
|
+
end
|
|
3608
|
+
|
|
3609
|
+
module UnionMember3
|
|
3610
|
+
extend SafetyKit::Internal::Type::Union
|
|
3611
|
+
|
|
3612
|
+
Variants = T.type_alias { T.any(String, Float, T::Boolean) }
|
|
3613
|
+
|
|
3614
|
+
sig do
|
|
3615
|
+
override.returns(
|
|
3616
|
+
T::Array[
|
|
3617
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Metadata::UnionMember3::Variants
|
|
3618
|
+
]
|
|
3619
|
+
)
|
|
3620
|
+
end
|
|
3621
|
+
def self.variants
|
|
3622
|
+
end
|
|
3623
|
+
end
|
|
3624
|
+
|
|
3625
|
+
sig do
|
|
3626
|
+
override.returns(
|
|
3627
|
+
T::Array[
|
|
3628
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Metadata::Variants
|
|
3629
|
+
]
|
|
3630
|
+
)
|
|
3631
|
+
end
|
|
3632
|
+
def self.variants
|
|
3633
|
+
end
|
|
3634
|
+
|
|
3635
|
+
UnionMember3Array =
|
|
3636
|
+
T.let(
|
|
3637
|
+
SafetyKit::Internal::Type::ArrayOf[
|
|
3638
|
+
union:
|
|
3639
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::Metadata::UnionMember3
|
|
3640
|
+
],
|
|
3641
|
+
SafetyKit::Internal::Type::Converter
|
|
3642
|
+
)
|
|
3643
|
+
end
|
|
3644
|
+
|
|
3645
|
+
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
3646
|
+
OrHash =
|
|
3647
|
+
T.type_alias do
|
|
3648
|
+
T.any(
|
|
3649
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::ContentUploaded::ResourcesUsed,
|
|
3650
|
+
SafetyKit::Internal::AnyHash
|
|
3651
|
+
)
|
|
3652
|
+
end
|
|
3653
|
+
|
|
3654
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
3655
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
3656
|
+
sig { returns(String) }
|
|
3657
|
+
attr_accessor :type
|
|
3658
|
+
|
|
3659
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
3660
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
3661
|
+
sig { returns(String) }
|
|
3662
|
+
attr_accessor :value
|
|
3663
|
+
|
|
3664
|
+
# Real-world or account resource used during the event, such as an email, phone
|
|
3665
|
+
# number, address, URL, social handle, or payment identifier.
|
|
3666
|
+
sig do
|
|
3667
|
+
params(type: String, value: String).returns(T.attached_class)
|
|
3668
|
+
end
|
|
3669
|
+
def self.new(
|
|
3670
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
3671
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
3672
|
+
type:,
|
|
3673
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
3674
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
3675
|
+
value:
|
|
3676
|
+
)
|
|
3677
|
+
end
|
|
3678
|
+
|
|
3679
|
+
sig { override.returns({ type: String, value: String }) }
|
|
3680
|
+
def to_hash
|
|
3681
|
+
end
|
|
3682
|
+
end
|
|
3683
|
+
end
|
|
3684
|
+
|
|
3685
|
+
class CreateAccount < SafetyKit::Internal::Type::BaseModel
|
|
3686
|
+
OrHash =
|
|
3687
|
+
T.type_alias do
|
|
3688
|
+
T.any(
|
|
3689
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount,
|
|
3690
|
+
SafetyKit::Internal::AnyHash
|
|
3691
|
+
)
|
|
3692
|
+
end
|
|
3693
|
+
|
|
3694
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
3695
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
3696
|
+
sig { returns(String) }
|
|
3697
|
+
attr_accessor :event_name
|
|
3698
|
+
|
|
3699
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
3700
|
+
sig { returns(Time) }
|
|
3701
|
+
attr_accessor :timestamp
|
|
3702
|
+
|
|
3703
|
+
sig { returns(Symbol) }
|
|
3704
|
+
attr_accessor :type
|
|
3705
|
+
|
|
3706
|
+
# Your stable canonical identifier for the user or account.
|
|
3707
|
+
sig { returns(String) }
|
|
3708
|
+
attr_accessor :user_id
|
|
3709
|
+
|
|
3710
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
3711
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
3712
|
+
# analyze.
|
|
3713
|
+
sig do
|
|
3714
|
+
returns(
|
|
3715
|
+
T.nilable(
|
|
3716
|
+
T::Array[
|
|
3717
|
+
T.any(
|
|
3718
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent,
|
|
3719
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent
|
|
3720
|
+
)
|
|
3721
|
+
]
|
|
3722
|
+
)
|
|
3723
|
+
)
|
|
3724
|
+
end
|
|
3725
|
+
attr_reader :content
|
|
3726
|
+
|
|
3727
|
+
sig do
|
|
3728
|
+
params(
|
|
3729
|
+
content:
|
|
3730
|
+
T::Array[
|
|
3731
|
+
T.any(
|
|
3732
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent::OrHash,
|
|
3733
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::OrHash
|
|
3734
|
+
)
|
|
3735
|
+
]
|
|
3736
|
+
).void
|
|
3737
|
+
end
|
|
3738
|
+
attr_writer :content
|
|
3739
|
+
|
|
3740
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
3741
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
3742
|
+
sig do
|
|
3743
|
+
returns(
|
|
3744
|
+
T.nilable(
|
|
3745
|
+
T::Hash[
|
|
3746
|
+
Symbol,
|
|
3747
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Metadata::Variants
|
|
3748
|
+
]
|
|
3749
|
+
)
|
|
3750
|
+
)
|
|
3751
|
+
end
|
|
3752
|
+
attr_reader :metadata
|
|
3753
|
+
|
|
3754
|
+
sig do
|
|
3755
|
+
params(
|
|
3756
|
+
metadata:
|
|
3757
|
+
T::Hash[
|
|
3758
|
+
Symbol,
|
|
3759
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Metadata::Variants
|
|
3760
|
+
]
|
|
3761
|
+
).void
|
|
3762
|
+
end
|
|
3763
|
+
attr_writer :metadata
|
|
3764
|
+
|
|
3765
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
3766
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
3767
|
+
# identifiers.
|
|
3768
|
+
sig do
|
|
3769
|
+
returns(
|
|
3770
|
+
T.nilable(
|
|
3771
|
+
T::Array[
|
|
3772
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::ResourcesUsed
|
|
3773
|
+
]
|
|
3774
|
+
)
|
|
3775
|
+
)
|
|
3776
|
+
end
|
|
3777
|
+
attr_reader :resources_used
|
|
3778
|
+
|
|
3779
|
+
sig do
|
|
3780
|
+
params(
|
|
3781
|
+
resources_used:
|
|
3782
|
+
T::Array[
|
|
3783
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::ResourcesUsed::OrHash
|
|
3784
|
+
]
|
|
3785
|
+
).void
|
|
3786
|
+
end
|
|
3787
|
+
attr_writer :resources_used
|
|
3788
|
+
|
|
3789
|
+
# A user or account is created.
|
|
3790
|
+
sig do
|
|
3791
|
+
params(
|
|
3792
|
+
event_name: String,
|
|
3793
|
+
timestamp: Time,
|
|
3794
|
+
user_id: String,
|
|
3795
|
+
content:
|
|
3796
|
+
T::Array[
|
|
3797
|
+
T.any(
|
|
3798
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent::OrHash,
|
|
3799
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::OrHash
|
|
3800
|
+
)
|
|
3801
|
+
],
|
|
3802
|
+
metadata:
|
|
3803
|
+
T::Hash[
|
|
3804
|
+
Symbol,
|
|
3805
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Metadata::Variants
|
|
3806
|
+
],
|
|
3807
|
+
resources_used:
|
|
3808
|
+
T::Array[
|
|
3809
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::ResourcesUsed::OrHash
|
|
3810
|
+
],
|
|
3811
|
+
type: Symbol
|
|
3812
|
+
).returns(T.attached_class)
|
|
3813
|
+
end
|
|
3814
|
+
def self.new(
|
|
3815
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
3816
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
3817
|
+
event_name:,
|
|
3818
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
3819
|
+
timestamp:,
|
|
3820
|
+
# Your stable canonical identifier for the user or account.
|
|
3821
|
+
user_id:,
|
|
3822
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
3823
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
3824
|
+
# analyze.
|
|
3825
|
+
content: nil,
|
|
3826
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
3827
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
3828
|
+
metadata: nil,
|
|
3829
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
3830
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
3831
|
+
# identifiers.
|
|
3832
|
+
resources_used: nil,
|
|
3833
|
+
type: :create_account
|
|
3834
|
+
)
|
|
3835
|
+
end
|
|
3836
|
+
|
|
3837
|
+
sig do
|
|
3838
|
+
override.returns(
|
|
3839
|
+
{
|
|
3840
|
+
event_name: String,
|
|
3841
|
+
timestamp: Time,
|
|
3842
|
+
type: Symbol,
|
|
3843
|
+
user_id: String,
|
|
3844
|
+
content:
|
|
3845
|
+
T::Array[
|
|
3846
|
+
T.any(
|
|
3847
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent,
|
|
3848
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent
|
|
3849
|
+
)
|
|
3850
|
+
],
|
|
3851
|
+
metadata:
|
|
3852
|
+
T::Hash[
|
|
3853
|
+
Symbol,
|
|
3854
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Metadata::Variants
|
|
3855
|
+
],
|
|
3856
|
+
resources_used:
|
|
3857
|
+
T::Array[
|
|
3858
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::ResourcesUsed
|
|
3859
|
+
]
|
|
3860
|
+
}
|
|
3861
|
+
)
|
|
3862
|
+
end
|
|
3863
|
+
def to_hash
|
|
3864
|
+
end
|
|
3865
|
+
|
|
3866
|
+
# User-authored text content associated with an event.
|
|
3867
|
+
module Content
|
|
3868
|
+
extend SafetyKit::Internal::Type::Union
|
|
3869
|
+
|
|
3870
|
+
Variants =
|
|
3871
|
+
T.type_alias do
|
|
3872
|
+
T.any(
|
|
3873
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent,
|
|
3874
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent
|
|
3875
|
+
)
|
|
3876
|
+
end
|
|
3877
|
+
|
|
3878
|
+
class EventTextContent < SafetyKit::Internal::Type::BaseModel
|
|
3879
|
+
OrHash =
|
|
3880
|
+
T.type_alias do
|
|
3881
|
+
T.any(
|
|
3882
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent,
|
|
3883
|
+
SafetyKit::Internal::AnyHash
|
|
3884
|
+
)
|
|
3885
|
+
end
|
|
3886
|
+
|
|
3887
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
3888
|
+
sig { returns(String) }
|
|
3889
|
+
attr_accessor :text
|
|
3890
|
+
|
|
3891
|
+
# Text content part.
|
|
3892
|
+
sig do
|
|
3893
|
+
returns(
|
|
3894
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent::Type::OrSymbol
|
|
3895
|
+
)
|
|
3896
|
+
end
|
|
3897
|
+
attr_accessor :type
|
|
3898
|
+
|
|
3899
|
+
# Stable field key for this content part.
|
|
3900
|
+
sig { returns(T.nilable(String)) }
|
|
3901
|
+
attr_reader :key
|
|
3902
|
+
|
|
3903
|
+
sig { params(key: String).void }
|
|
3904
|
+
attr_writer :key
|
|
3905
|
+
|
|
3906
|
+
# User-authored text content associated with an event.
|
|
3907
|
+
sig do
|
|
3908
|
+
params(
|
|
3909
|
+
text: String,
|
|
3910
|
+
type:
|
|
3911
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent::Type::OrSymbol,
|
|
3912
|
+
key: String
|
|
3913
|
+
).returns(T.attached_class)
|
|
3914
|
+
end
|
|
3915
|
+
def self.new(
|
|
3916
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
3917
|
+
text:,
|
|
3918
|
+
# Text content part.
|
|
3919
|
+
type:,
|
|
3920
|
+
# Stable field key for this content part.
|
|
3921
|
+
key: nil
|
|
3922
|
+
)
|
|
3923
|
+
end
|
|
3924
|
+
|
|
3925
|
+
sig do
|
|
3926
|
+
override.returns(
|
|
3927
|
+
{
|
|
3928
|
+
text: String,
|
|
3929
|
+
type:
|
|
3930
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent::Type::OrSymbol,
|
|
3931
|
+
key: String
|
|
3932
|
+
}
|
|
3933
|
+
)
|
|
3934
|
+
end
|
|
3935
|
+
def to_hash
|
|
3936
|
+
end
|
|
3937
|
+
|
|
3938
|
+
# Text content part.
|
|
3939
|
+
module Type
|
|
3940
|
+
extend SafetyKit::Internal::Type::Enum
|
|
3941
|
+
|
|
3942
|
+
TaggedSymbol =
|
|
3943
|
+
T.type_alias do
|
|
3944
|
+
T.all(
|
|
3945
|
+
Symbol,
|
|
3946
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent::Type
|
|
3947
|
+
)
|
|
3948
|
+
end
|
|
3949
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
3950
|
+
|
|
3951
|
+
TEXT =
|
|
3952
|
+
T.let(
|
|
3953
|
+
:text,
|
|
3954
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent::Type::TaggedSymbol
|
|
3955
|
+
)
|
|
3956
|
+
|
|
3957
|
+
sig do
|
|
3958
|
+
override.returns(
|
|
3959
|
+
T::Array[
|
|
3960
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventTextContent::Type::TaggedSymbol
|
|
3961
|
+
]
|
|
3962
|
+
)
|
|
3963
|
+
end
|
|
3964
|
+
def self.values
|
|
3965
|
+
end
|
|
3966
|
+
end
|
|
3967
|
+
end
|
|
3968
|
+
|
|
3969
|
+
class EventImageContent < SafetyKit::Internal::Type::BaseModel
|
|
3970
|
+
OrHash =
|
|
3971
|
+
T.type_alias do
|
|
3972
|
+
T.any(
|
|
3973
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent,
|
|
3974
|
+
SafetyKit::Internal::AnyHash
|
|
3975
|
+
)
|
|
3976
|
+
end
|
|
3977
|
+
|
|
3978
|
+
# Image source information.
|
|
3979
|
+
sig do
|
|
3980
|
+
returns(
|
|
3981
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source
|
|
3982
|
+
)
|
|
3983
|
+
end
|
|
3984
|
+
attr_reader :source
|
|
3985
|
+
|
|
3986
|
+
sig do
|
|
3987
|
+
params(
|
|
3988
|
+
source:
|
|
3989
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source::OrHash
|
|
3990
|
+
).void
|
|
3991
|
+
end
|
|
3992
|
+
attr_writer :source
|
|
3993
|
+
|
|
3994
|
+
# Image content part.
|
|
3995
|
+
sig do
|
|
3996
|
+
returns(
|
|
3997
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Type::OrSymbol
|
|
3998
|
+
)
|
|
3999
|
+
end
|
|
4000
|
+
attr_accessor :type
|
|
4001
|
+
|
|
4002
|
+
# Stable field key for this content part.
|
|
4003
|
+
sig { returns(T.nilable(String)) }
|
|
4004
|
+
attr_reader :key
|
|
4005
|
+
|
|
4006
|
+
sig { params(key: String).void }
|
|
4007
|
+
attr_writer :key
|
|
4008
|
+
|
|
4009
|
+
# User-uploaded image content associated with an event.
|
|
4010
|
+
sig do
|
|
4011
|
+
params(
|
|
4012
|
+
source:
|
|
4013
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source::OrHash,
|
|
4014
|
+
type:
|
|
4015
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Type::OrSymbol,
|
|
4016
|
+
key: String
|
|
4017
|
+
).returns(T.attached_class)
|
|
4018
|
+
end
|
|
4019
|
+
def self.new(
|
|
4020
|
+
# Image source information.
|
|
4021
|
+
source:,
|
|
4022
|
+
# Image content part.
|
|
4023
|
+
type:,
|
|
4024
|
+
# Stable field key for this content part.
|
|
4025
|
+
key: nil
|
|
4026
|
+
)
|
|
4027
|
+
end
|
|
4028
|
+
|
|
4029
|
+
sig do
|
|
4030
|
+
override.returns(
|
|
4031
|
+
{
|
|
4032
|
+
source:
|
|
4033
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source,
|
|
4034
|
+
type:
|
|
4035
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Type::OrSymbol,
|
|
4036
|
+
key: String
|
|
4037
|
+
}
|
|
4038
|
+
)
|
|
4039
|
+
end
|
|
4040
|
+
def to_hash
|
|
4041
|
+
end
|
|
4042
|
+
|
|
4043
|
+
class Source < SafetyKit::Internal::Type::BaseModel
|
|
4044
|
+
OrHash =
|
|
4045
|
+
T.type_alias do
|
|
4046
|
+
T.any(
|
|
4047
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source,
|
|
4048
|
+
SafetyKit::Internal::AnyHash
|
|
4049
|
+
)
|
|
4050
|
+
end
|
|
4051
|
+
|
|
4052
|
+
# URL image source.
|
|
4053
|
+
sig do
|
|
4054
|
+
returns(
|
|
4055
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source::Type::OrSymbol
|
|
4056
|
+
)
|
|
4057
|
+
end
|
|
4058
|
+
attr_accessor :type
|
|
4059
|
+
|
|
4060
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
4061
|
+
sig { returns(String) }
|
|
4062
|
+
attr_accessor :url
|
|
4063
|
+
|
|
4064
|
+
# Image source information.
|
|
4065
|
+
sig do
|
|
4066
|
+
params(
|
|
4067
|
+
type:
|
|
4068
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source::Type::OrSymbol,
|
|
4069
|
+
url: String
|
|
4070
|
+
).returns(T.attached_class)
|
|
4071
|
+
end
|
|
4072
|
+
def self.new(
|
|
4073
|
+
# URL image source.
|
|
4074
|
+
type:,
|
|
4075
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
4076
|
+
url:
|
|
4077
|
+
)
|
|
4078
|
+
end
|
|
4079
|
+
|
|
4080
|
+
sig do
|
|
4081
|
+
override.returns(
|
|
4082
|
+
{
|
|
4083
|
+
type:
|
|
4084
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source::Type::OrSymbol,
|
|
4085
|
+
url: String
|
|
4086
|
+
}
|
|
4087
|
+
)
|
|
4088
|
+
end
|
|
4089
|
+
def to_hash
|
|
4090
|
+
end
|
|
4091
|
+
|
|
4092
|
+
# URL image source.
|
|
4093
|
+
module Type
|
|
4094
|
+
extend SafetyKit::Internal::Type::Enum
|
|
4095
|
+
|
|
4096
|
+
TaggedSymbol =
|
|
4097
|
+
T.type_alias do
|
|
4098
|
+
T.all(
|
|
4099
|
+
Symbol,
|
|
4100
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source::Type
|
|
4101
|
+
)
|
|
4102
|
+
end
|
|
4103
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4104
|
+
|
|
4105
|
+
URL =
|
|
4106
|
+
T.let(
|
|
4107
|
+
:url,
|
|
4108
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
4109
|
+
)
|
|
4110
|
+
|
|
4111
|
+
sig do
|
|
4112
|
+
override.returns(
|
|
4113
|
+
T::Array[
|
|
4114
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
4115
|
+
]
|
|
4116
|
+
)
|
|
4117
|
+
end
|
|
4118
|
+
def self.values
|
|
4119
|
+
end
|
|
4120
|
+
end
|
|
4121
|
+
end
|
|
4122
|
+
|
|
4123
|
+
# Image content part.
|
|
4124
|
+
module Type
|
|
4125
|
+
extend SafetyKit::Internal::Type::Enum
|
|
4126
|
+
|
|
4127
|
+
TaggedSymbol =
|
|
4128
|
+
T.type_alias do
|
|
4129
|
+
T.all(
|
|
4130
|
+
Symbol,
|
|
4131
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Type
|
|
4132
|
+
)
|
|
4133
|
+
end
|
|
4134
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4135
|
+
|
|
4136
|
+
IMAGE =
|
|
4137
|
+
T.let(
|
|
4138
|
+
:image,
|
|
4139
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Type::TaggedSymbol
|
|
4140
|
+
)
|
|
4141
|
+
|
|
4142
|
+
sig do
|
|
4143
|
+
override.returns(
|
|
4144
|
+
T::Array[
|
|
4145
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::EventImageContent::Type::TaggedSymbol
|
|
4146
|
+
]
|
|
4147
|
+
)
|
|
4148
|
+
end
|
|
4149
|
+
def self.values
|
|
4150
|
+
end
|
|
4151
|
+
end
|
|
4152
|
+
end
|
|
4153
|
+
|
|
4154
|
+
sig do
|
|
4155
|
+
override.returns(
|
|
4156
|
+
T::Array[
|
|
4157
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Content::Variants
|
|
4158
|
+
]
|
|
4159
|
+
)
|
|
4160
|
+
end
|
|
4161
|
+
def self.variants
|
|
4162
|
+
end
|
|
4163
|
+
end
|
|
4164
|
+
|
|
4165
|
+
module Metadata
|
|
4166
|
+
extend SafetyKit::Internal::Type::Union
|
|
4167
|
+
|
|
4168
|
+
Variants =
|
|
4169
|
+
T.type_alias do
|
|
4170
|
+
T.any(
|
|
4171
|
+
String,
|
|
4172
|
+
Float,
|
|
4173
|
+
T::Boolean,
|
|
4174
|
+
T::Array[
|
|
4175
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Metadata::UnionMember3::Variants
|
|
4176
|
+
]
|
|
4177
|
+
)
|
|
4178
|
+
end
|
|
4179
|
+
|
|
4180
|
+
module UnionMember3
|
|
4181
|
+
extend SafetyKit::Internal::Type::Union
|
|
4182
|
+
|
|
4183
|
+
Variants = T.type_alias { T.any(String, Float, T::Boolean) }
|
|
4184
|
+
|
|
4185
|
+
sig do
|
|
4186
|
+
override.returns(
|
|
4187
|
+
T::Array[
|
|
4188
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Metadata::UnionMember3::Variants
|
|
4189
|
+
]
|
|
4190
|
+
)
|
|
4191
|
+
end
|
|
4192
|
+
def self.variants
|
|
4193
|
+
end
|
|
4194
|
+
end
|
|
4195
|
+
|
|
4196
|
+
sig do
|
|
4197
|
+
override.returns(
|
|
4198
|
+
T::Array[
|
|
4199
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Metadata::Variants
|
|
4200
|
+
]
|
|
4201
|
+
)
|
|
4202
|
+
end
|
|
4203
|
+
def self.variants
|
|
4204
|
+
end
|
|
4205
|
+
|
|
4206
|
+
UnionMember3Array =
|
|
4207
|
+
T.let(
|
|
4208
|
+
SafetyKit::Internal::Type::ArrayOf[
|
|
4209
|
+
union:
|
|
4210
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::Metadata::UnionMember3
|
|
4211
|
+
],
|
|
4212
|
+
SafetyKit::Internal::Type::Converter
|
|
4213
|
+
)
|
|
4214
|
+
end
|
|
4215
|
+
|
|
4216
|
+
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
4217
|
+
OrHash =
|
|
4218
|
+
T.type_alias do
|
|
4219
|
+
T.any(
|
|
4220
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::CreateAccount::ResourcesUsed,
|
|
4221
|
+
SafetyKit::Internal::AnyHash
|
|
4222
|
+
)
|
|
4223
|
+
end
|
|
4224
|
+
|
|
4225
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
4226
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
4227
|
+
sig { returns(String) }
|
|
4228
|
+
attr_accessor :type
|
|
4229
|
+
|
|
4230
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
4231
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
4232
|
+
sig { returns(String) }
|
|
4233
|
+
attr_accessor :value
|
|
4234
|
+
|
|
4235
|
+
# Real-world or account resource used during the event, such as an email, phone
|
|
4236
|
+
# number, address, URL, social handle, or payment identifier.
|
|
4237
|
+
sig do
|
|
4238
|
+
params(type: String, value: String).returns(T.attached_class)
|
|
4239
|
+
end
|
|
4240
|
+
def self.new(
|
|
4241
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
4242
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
4243
|
+
type:,
|
|
4244
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
4245
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
4246
|
+
value:
|
|
4247
|
+
)
|
|
4248
|
+
end
|
|
4249
|
+
|
|
4250
|
+
sig { override.returns({ type: String, value: String }) }
|
|
4251
|
+
def to_hash
|
|
4252
|
+
end
|
|
4253
|
+
end
|
|
4254
|
+
end
|
|
4255
|
+
|
|
4256
|
+
class UpdateAccount < SafetyKit::Internal::Type::BaseModel
|
|
4257
|
+
OrHash =
|
|
4258
|
+
T.type_alias do
|
|
4259
|
+
T.any(
|
|
4260
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount,
|
|
4261
|
+
SafetyKit::Internal::AnyHash
|
|
4262
|
+
)
|
|
4263
|
+
end
|
|
4264
|
+
|
|
4265
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
4266
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
4267
|
+
sig { returns(String) }
|
|
4268
|
+
attr_accessor :event_name
|
|
4269
|
+
|
|
4270
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
4271
|
+
sig { returns(Time) }
|
|
4272
|
+
attr_accessor :timestamp
|
|
4273
|
+
|
|
4274
|
+
sig { returns(Symbol) }
|
|
4275
|
+
attr_accessor :type
|
|
4276
|
+
|
|
4277
|
+
# Your stable canonical identifier for the user or account.
|
|
4278
|
+
sig { returns(String) }
|
|
4279
|
+
attr_accessor :user_id
|
|
4280
|
+
|
|
4281
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
4282
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
4283
|
+
# analyze.
|
|
4284
|
+
sig do
|
|
4285
|
+
returns(
|
|
4286
|
+
T.nilable(
|
|
4287
|
+
T::Array[
|
|
4288
|
+
T.any(
|
|
4289
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent,
|
|
4290
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent
|
|
4291
|
+
)
|
|
4292
|
+
]
|
|
4293
|
+
)
|
|
4294
|
+
)
|
|
4295
|
+
end
|
|
4296
|
+
attr_reader :content
|
|
4297
|
+
|
|
4298
|
+
sig do
|
|
4299
|
+
params(
|
|
4300
|
+
content:
|
|
4301
|
+
T::Array[
|
|
4302
|
+
T.any(
|
|
4303
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent::OrHash,
|
|
4304
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::OrHash
|
|
4305
|
+
)
|
|
4306
|
+
]
|
|
4307
|
+
).void
|
|
4308
|
+
end
|
|
4309
|
+
attr_writer :content
|
|
4310
|
+
|
|
4311
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
4312
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
4313
|
+
sig do
|
|
4314
|
+
returns(
|
|
4315
|
+
T.nilable(
|
|
4316
|
+
T::Hash[
|
|
4317
|
+
Symbol,
|
|
4318
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Metadata::Variants
|
|
4319
|
+
]
|
|
4320
|
+
)
|
|
4321
|
+
)
|
|
4322
|
+
end
|
|
4323
|
+
attr_reader :metadata
|
|
4324
|
+
|
|
4325
|
+
sig do
|
|
4326
|
+
params(
|
|
4327
|
+
metadata:
|
|
4328
|
+
T::Hash[
|
|
4329
|
+
Symbol,
|
|
4330
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Metadata::Variants
|
|
4331
|
+
]
|
|
4332
|
+
).void
|
|
4333
|
+
end
|
|
4334
|
+
attr_writer :metadata
|
|
4335
|
+
|
|
4336
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
4337
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
4338
|
+
# identifiers.
|
|
4339
|
+
sig do
|
|
4340
|
+
returns(
|
|
4341
|
+
T.nilable(
|
|
4342
|
+
T::Array[
|
|
4343
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::ResourcesUsed
|
|
4344
|
+
]
|
|
4345
|
+
)
|
|
4346
|
+
)
|
|
4347
|
+
end
|
|
4348
|
+
attr_reader :resources_used
|
|
4349
|
+
|
|
4350
|
+
sig do
|
|
4351
|
+
params(
|
|
4352
|
+
resources_used:
|
|
4353
|
+
T::Array[
|
|
4354
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::ResourcesUsed::OrHash
|
|
4355
|
+
]
|
|
4356
|
+
).void
|
|
4357
|
+
end
|
|
4358
|
+
attr_writer :resources_used
|
|
4359
|
+
|
|
4360
|
+
# A user or account profile, contact detail, payment detail, or public bio
|
|
4361
|
+
# changes.
|
|
4362
|
+
sig do
|
|
4363
|
+
params(
|
|
4364
|
+
event_name: String,
|
|
4365
|
+
timestamp: Time,
|
|
4366
|
+
user_id: String,
|
|
4367
|
+
content:
|
|
4368
|
+
T::Array[
|
|
4369
|
+
T.any(
|
|
4370
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent::OrHash,
|
|
4371
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::OrHash
|
|
4372
|
+
)
|
|
4373
|
+
],
|
|
4374
|
+
metadata:
|
|
4375
|
+
T::Hash[
|
|
4376
|
+
Symbol,
|
|
4377
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Metadata::Variants
|
|
4378
|
+
],
|
|
4379
|
+
resources_used:
|
|
4380
|
+
T::Array[
|
|
4381
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::ResourcesUsed::OrHash
|
|
4382
|
+
],
|
|
4383
|
+
type: Symbol
|
|
4384
|
+
).returns(T.attached_class)
|
|
4385
|
+
end
|
|
4386
|
+
def self.new(
|
|
4387
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
4388
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
4389
|
+
event_name:,
|
|
4390
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
4391
|
+
timestamp:,
|
|
4392
|
+
# Your stable canonical identifier for the user or account.
|
|
4393
|
+
user_id:,
|
|
4394
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
4395
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
4396
|
+
# analyze.
|
|
4397
|
+
content: nil,
|
|
4398
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
4399
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
4400
|
+
metadata: nil,
|
|
4401
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
4402
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
4403
|
+
# identifiers.
|
|
4404
|
+
resources_used: nil,
|
|
4405
|
+
type: :update_account
|
|
4406
|
+
)
|
|
4407
|
+
end
|
|
4408
|
+
|
|
4409
|
+
sig do
|
|
4410
|
+
override.returns(
|
|
4411
|
+
{
|
|
4412
|
+
event_name: String,
|
|
4413
|
+
timestamp: Time,
|
|
4414
|
+
type: Symbol,
|
|
4415
|
+
user_id: String,
|
|
4416
|
+
content:
|
|
4417
|
+
T::Array[
|
|
4418
|
+
T.any(
|
|
4419
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent,
|
|
4420
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent
|
|
4421
|
+
)
|
|
4422
|
+
],
|
|
4423
|
+
metadata:
|
|
4424
|
+
T::Hash[
|
|
4425
|
+
Symbol,
|
|
4426
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Metadata::Variants
|
|
4427
|
+
],
|
|
4428
|
+
resources_used:
|
|
4429
|
+
T::Array[
|
|
4430
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::ResourcesUsed
|
|
4431
|
+
]
|
|
4432
|
+
}
|
|
4433
|
+
)
|
|
4434
|
+
end
|
|
4435
|
+
def to_hash
|
|
4436
|
+
end
|
|
4437
|
+
|
|
4438
|
+
# User-authored text content associated with an event.
|
|
4439
|
+
module Content
|
|
4440
|
+
extend SafetyKit::Internal::Type::Union
|
|
4441
|
+
|
|
4442
|
+
Variants =
|
|
4443
|
+
T.type_alias do
|
|
4444
|
+
T.any(
|
|
4445
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent,
|
|
4446
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent
|
|
4447
|
+
)
|
|
4448
|
+
end
|
|
4449
|
+
|
|
4450
|
+
class EventTextContent < SafetyKit::Internal::Type::BaseModel
|
|
4451
|
+
OrHash =
|
|
4452
|
+
T.type_alias do
|
|
4453
|
+
T.any(
|
|
4454
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent,
|
|
4455
|
+
SafetyKit::Internal::AnyHash
|
|
4456
|
+
)
|
|
4457
|
+
end
|
|
4458
|
+
|
|
4459
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
4460
|
+
sig { returns(String) }
|
|
4461
|
+
attr_accessor :text
|
|
4462
|
+
|
|
4463
|
+
# Text content part.
|
|
4464
|
+
sig do
|
|
4465
|
+
returns(
|
|
4466
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent::Type::OrSymbol
|
|
4467
|
+
)
|
|
4468
|
+
end
|
|
4469
|
+
attr_accessor :type
|
|
4470
|
+
|
|
4471
|
+
# Stable field key for this content part.
|
|
4472
|
+
sig { returns(T.nilable(String)) }
|
|
4473
|
+
attr_reader :key
|
|
4474
|
+
|
|
4475
|
+
sig { params(key: String).void }
|
|
4476
|
+
attr_writer :key
|
|
4477
|
+
|
|
4478
|
+
# User-authored text content associated with an event.
|
|
4479
|
+
sig do
|
|
4480
|
+
params(
|
|
4481
|
+
text: String,
|
|
4482
|
+
type:
|
|
4483
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent::Type::OrSymbol,
|
|
4484
|
+
key: String
|
|
4485
|
+
).returns(T.attached_class)
|
|
4486
|
+
end
|
|
4487
|
+
def self.new(
|
|
4488
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
4489
|
+
text:,
|
|
4490
|
+
# Text content part.
|
|
4491
|
+
type:,
|
|
4492
|
+
# Stable field key for this content part.
|
|
4493
|
+
key: nil
|
|
4494
|
+
)
|
|
4495
|
+
end
|
|
4496
|
+
|
|
4497
|
+
sig do
|
|
4498
|
+
override.returns(
|
|
4499
|
+
{
|
|
4500
|
+
text: String,
|
|
4501
|
+
type:
|
|
4502
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent::Type::OrSymbol,
|
|
4503
|
+
key: String
|
|
4504
|
+
}
|
|
4505
|
+
)
|
|
4506
|
+
end
|
|
4507
|
+
def to_hash
|
|
4508
|
+
end
|
|
4509
|
+
|
|
4510
|
+
# Text content part.
|
|
4511
|
+
module Type
|
|
4512
|
+
extend SafetyKit::Internal::Type::Enum
|
|
4513
|
+
|
|
4514
|
+
TaggedSymbol =
|
|
4515
|
+
T.type_alias do
|
|
4516
|
+
T.all(
|
|
4517
|
+
Symbol,
|
|
4518
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent::Type
|
|
4519
|
+
)
|
|
4520
|
+
end
|
|
4521
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4522
|
+
|
|
4523
|
+
TEXT =
|
|
4524
|
+
T.let(
|
|
4525
|
+
:text,
|
|
4526
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent::Type::TaggedSymbol
|
|
4527
|
+
)
|
|
4528
|
+
|
|
4529
|
+
sig do
|
|
4530
|
+
override.returns(
|
|
4531
|
+
T::Array[
|
|
4532
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventTextContent::Type::TaggedSymbol
|
|
4533
|
+
]
|
|
4534
|
+
)
|
|
4535
|
+
end
|
|
4536
|
+
def self.values
|
|
4537
|
+
end
|
|
4538
|
+
end
|
|
4539
|
+
end
|
|
4540
|
+
|
|
4541
|
+
class EventImageContent < SafetyKit::Internal::Type::BaseModel
|
|
4542
|
+
OrHash =
|
|
4543
|
+
T.type_alias do
|
|
4544
|
+
T.any(
|
|
4545
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent,
|
|
4546
|
+
SafetyKit::Internal::AnyHash
|
|
4547
|
+
)
|
|
4548
|
+
end
|
|
4549
|
+
|
|
4550
|
+
# Image source information.
|
|
4551
|
+
sig do
|
|
4552
|
+
returns(
|
|
4553
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source
|
|
4554
|
+
)
|
|
4555
|
+
end
|
|
4556
|
+
attr_reader :source
|
|
4557
|
+
|
|
4558
|
+
sig do
|
|
4559
|
+
params(
|
|
4560
|
+
source:
|
|
4561
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source::OrHash
|
|
4562
|
+
).void
|
|
4563
|
+
end
|
|
4564
|
+
attr_writer :source
|
|
4565
|
+
|
|
4566
|
+
# Image content part.
|
|
4567
|
+
sig do
|
|
4568
|
+
returns(
|
|
4569
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Type::OrSymbol
|
|
4570
|
+
)
|
|
4571
|
+
end
|
|
4572
|
+
attr_accessor :type
|
|
4573
|
+
|
|
4574
|
+
# Stable field key for this content part.
|
|
4575
|
+
sig { returns(T.nilable(String)) }
|
|
4576
|
+
attr_reader :key
|
|
4577
|
+
|
|
4578
|
+
sig { params(key: String).void }
|
|
4579
|
+
attr_writer :key
|
|
4580
|
+
|
|
4581
|
+
# User-uploaded image content associated with an event.
|
|
4582
|
+
sig do
|
|
4583
|
+
params(
|
|
4584
|
+
source:
|
|
4585
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source::OrHash,
|
|
4586
|
+
type:
|
|
4587
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Type::OrSymbol,
|
|
4588
|
+
key: String
|
|
4589
|
+
).returns(T.attached_class)
|
|
4590
|
+
end
|
|
4591
|
+
def self.new(
|
|
4592
|
+
# Image source information.
|
|
4593
|
+
source:,
|
|
4594
|
+
# Image content part.
|
|
4595
|
+
type:,
|
|
4596
|
+
# Stable field key for this content part.
|
|
4597
|
+
key: nil
|
|
4598
|
+
)
|
|
4599
|
+
end
|
|
4600
|
+
|
|
4601
|
+
sig do
|
|
4602
|
+
override.returns(
|
|
4603
|
+
{
|
|
4604
|
+
source:
|
|
4605
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source,
|
|
4606
|
+
type:
|
|
4607
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Type::OrSymbol,
|
|
4608
|
+
key: String
|
|
4609
|
+
}
|
|
4610
|
+
)
|
|
4611
|
+
end
|
|
4612
|
+
def to_hash
|
|
4613
|
+
end
|
|
4614
|
+
|
|
4615
|
+
class Source < SafetyKit::Internal::Type::BaseModel
|
|
4616
|
+
OrHash =
|
|
4617
|
+
T.type_alias do
|
|
4618
|
+
T.any(
|
|
4619
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source,
|
|
4620
|
+
SafetyKit::Internal::AnyHash
|
|
4621
|
+
)
|
|
4622
|
+
end
|
|
4623
|
+
|
|
4624
|
+
# URL image source.
|
|
4625
|
+
sig do
|
|
4626
|
+
returns(
|
|
4627
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source::Type::OrSymbol
|
|
4628
|
+
)
|
|
4629
|
+
end
|
|
4630
|
+
attr_accessor :type
|
|
4631
|
+
|
|
4632
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
4633
|
+
sig { returns(String) }
|
|
4634
|
+
attr_accessor :url
|
|
4635
|
+
|
|
4636
|
+
# Image source information.
|
|
4637
|
+
sig do
|
|
4638
|
+
params(
|
|
4639
|
+
type:
|
|
4640
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source::Type::OrSymbol,
|
|
4641
|
+
url: String
|
|
4642
|
+
).returns(T.attached_class)
|
|
4643
|
+
end
|
|
4644
|
+
def self.new(
|
|
4645
|
+
# URL image source.
|
|
4646
|
+
type:,
|
|
4647
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
4648
|
+
url:
|
|
4649
|
+
)
|
|
4650
|
+
end
|
|
4651
|
+
|
|
4652
|
+
sig do
|
|
4653
|
+
override.returns(
|
|
4654
|
+
{
|
|
4655
|
+
type:
|
|
4656
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source::Type::OrSymbol,
|
|
4657
|
+
url: String
|
|
4658
|
+
}
|
|
4659
|
+
)
|
|
4660
|
+
end
|
|
4661
|
+
def to_hash
|
|
4662
|
+
end
|
|
4663
|
+
|
|
4664
|
+
# URL image source.
|
|
4665
|
+
module Type
|
|
4666
|
+
extend SafetyKit::Internal::Type::Enum
|
|
4667
|
+
|
|
4668
|
+
TaggedSymbol =
|
|
4669
|
+
T.type_alias do
|
|
4670
|
+
T.all(
|
|
4671
|
+
Symbol,
|
|
4672
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source::Type
|
|
4673
|
+
)
|
|
4674
|
+
end
|
|
4675
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4676
|
+
|
|
4677
|
+
URL =
|
|
4678
|
+
T.let(
|
|
4679
|
+
:url,
|
|
4680
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
4681
|
+
)
|
|
4682
|
+
|
|
4683
|
+
sig do
|
|
4684
|
+
override.returns(
|
|
4685
|
+
T::Array[
|
|
4686
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Source::Type::TaggedSymbol
|
|
4687
|
+
]
|
|
4688
|
+
)
|
|
4689
|
+
end
|
|
4690
|
+
def self.values
|
|
4691
|
+
end
|
|
4692
|
+
end
|
|
4693
|
+
end
|
|
4694
|
+
|
|
4695
|
+
# Image content part.
|
|
4696
|
+
module Type
|
|
4697
|
+
extend SafetyKit::Internal::Type::Enum
|
|
4698
|
+
|
|
4699
|
+
TaggedSymbol =
|
|
4700
|
+
T.type_alias do
|
|
4701
|
+
T.all(
|
|
4702
|
+
Symbol,
|
|
4703
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Type
|
|
4704
|
+
)
|
|
4705
|
+
end
|
|
4706
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4707
|
+
|
|
4708
|
+
IMAGE =
|
|
4709
|
+
T.let(
|
|
4710
|
+
:image,
|
|
4711
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Type::TaggedSymbol
|
|
4712
|
+
)
|
|
4713
|
+
|
|
4714
|
+
sig do
|
|
4715
|
+
override.returns(
|
|
4716
|
+
T::Array[
|
|
4717
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::EventImageContent::Type::TaggedSymbol
|
|
4718
|
+
]
|
|
4719
|
+
)
|
|
4720
|
+
end
|
|
4721
|
+
def self.values
|
|
4722
|
+
end
|
|
4723
|
+
end
|
|
4724
|
+
end
|
|
4725
|
+
|
|
4726
|
+
sig do
|
|
4727
|
+
override.returns(
|
|
4728
|
+
T::Array[
|
|
4729
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Content::Variants
|
|
4730
|
+
]
|
|
4731
|
+
)
|
|
4732
|
+
end
|
|
4733
|
+
def self.variants
|
|
4734
|
+
end
|
|
4735
|
+
end
|
|
4736
|
+
|
|
4737
|
+
module Metadata
|
|
4738
|
+
extend SafetyKit::Internal::Type::Union
|
|
4739
|
+
|
|
4740
|
+
Variants =
|
|
4741
|
+
T.type_alias do
|
|
4742
|
+
T.any(
|
|
4743
|
+
String,
|
|
4744
|
+
Float,
|
|
4745
|
+
T::Boolean,
|
|
4746
|
+
T::Array[
|
|
4747
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Metadata::UnionMember3::Variants
|
|
4748
|
+
]
|
|
4749
|
+
)
|
|
4750
|
+
end
|
|
4751
|
+
|
|
4752
|
+
module UnionMember3
|
|
4753
|
+
extend SafetyKit::Internal::Type::Union
|
|
4754
|
+
|
|
4755
|
+
Variants = T.type_alias { T.any(String, Float, T::Boolean) }
|
|
4756
|
+
|
|
4757
|
+
sig do
|
|
4758
|
+
override.returns(
|
|
4759
|
+
T::Array[
|
|
4760
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Metadata::UnionMember3::Variants
|
|
4761
|
+
]
|
|
4762
|
+
)
|
|
4763
|
+
end
|
|
4764
|
+
def self.variants
|
|
4765
|
+
end
|
|
4766
|
+
end
|
|
4767
|
+
|
|
4768
|
+
sig do
|
|
4769
|
+
override.returns(
|
|
4770
|
+
T::Array[
|
|
4771
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Metadata::Variants
|
|
4772
|
+
]
|
|
4773
|
+
)
|
|
4774
|
+
end
|
|
4775
|
+
def self.variants
|
|
4776
|
+
end
|
|
4777
|
+
|
|
4778
|
+
UnionMember3Array =
|
|
4779
|
+
T.let(
|
|
4780
|
+
SafetyKit::Internal::Type::ArrayOf[
|
|
4781
|
+
union:
|
|
4782
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::Metadata::UnionMember3
|
|
4783
|
+
],
|
|
4784
|
+
SafetyKit::Internal::Type::Converter
|
|
4785
|
+
)
|
|
4786
|
+
end
|
|
4787
|
+
|
|
4788
|
+
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
4789
|
+
OrHash =
|
|
4790
|
+
T.type_alias do
|
|
4791
|
+
T.any(
|
|
4792
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::UpdateAccount::ResourcesUsed,
|
|
4793
|
+
SafetyKit::Internal::AnyHash
|
|
4794
|
+
)
|
|
4795
|
+
end
|
|
4796
|
+
|
|
4797
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
4798
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
4799
|
+
sig { returns(String) }
|
|
4800
|
+
attr_accessor :type
|
|
4801
|
+
|
|
4802
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
4803
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
4804
|
+
sig { returns(String) }
|
|
4805
|
+
attr_accessor :value
|
|
4806
|
+
|
|
4807
|
+
# Real-world or account resource used during the event, such as an email, phone
|
|
4808
|
+
# number, address, URL, social handle, or payment identifier.
|
|
4809
|
+
sig do
|
|
4810
|
+
params(type: String, value: String).returns(T.attached_class)
|
|
4811
|
+
end
|
|
4812
|
+
def self.new(
|
|
4813
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
4814
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
4815
|
+
type:,
|
|
4816
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
4817
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
4818
|
+
value:
|
|
4819
|
+
)
|
|
4820
|
+
end
|
|
4821
|
+
|
|
4822
|
+
sig { override.returns({ type: String, value: String }) }
|
|
4823
|
+
def to_hash
|
|
4824
|
+
end
|
|
4825
|
+
end
|
|
4826
|
+
end
|
|
4827
|
+
|
|
4828
|
+
sig do
|
|
4829
|
+
override.returns(
|
|
4830
|
+
T::Array[
|
|
4831
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember4::Variants
|
|
4832
|
+
]
|
|
4833
|
+
)
|
|
4834
|
+
end
|
|
4835
|
+
def self.variants
|
|
4836
|
+
end
|
|
4837
|
+
end
|
|
4838
|
+
|
|
4839
|
+
sig do
|
|
4840
|
+
override.returns(
|
|
4841
|
+
T::Array[SafetyKit::Beta::EventCreateParams::Body::Variants]
|
|
4842
|
+
)
|
|
4843
|
+
end
|
|
4844
|
+
def self.variants
|
|
4845
|
+
end
|
|
4846
|
+
|
|
4847
|
+
UnionMember4Array =
|
|
4848
|
+
T.let(
|
|
4849
|
+
SafetyKit::Internal::Type::ArrayOf[
|
|
4850
|
+
union: SafetyKit::Beta::EventCreateParams::Body::UnionMember4
|
|
4851
|
+
],
|
|
4852
|
+
SafetyKit::Internal::Type::Converter
|
|
4853
|
+
)
|
|
2375
4854
|
end
|
|
2376
4855
|
end
|
|
2377
4856
|
end
|