safetykit 0.18.0 → 0.20.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/models/beta/event_create_params.rb +1115 -333
- data/lib/safety_kit/resources/beta/events.rb +6 -4
- data/lib/safety_kit/resources/beta.rb +2 -1
- data/lib/safety_kit/version.rb +1 -1
- data/rbi/safety_kit/models/beta/event_create_params.rbi +2013 -482
- data/rbi/safety_kit/resources/beta/events.rbi +12 -8
- data/rbi/safety_kit/resources/beta.rbi +2 -1
- data/sig/safety_kit/models/beta/event_create_params.rbs +831 -227
- metadata +2 -2
|
@@ -13,14 +13,14 @@ module SafetyKit
|
|
|
13
13
|
# your server after an action has happened in your product. Do not send these
|
|
14
14
|
# events directly from a browser or mobile client.
|
|
15
15
|
#
|
|
16
|
-
# @return [SafetyKit::Models::Beta::EventCreateParams::Body::UserContactEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::ContentUploadedEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::CreateAccountEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::UpdateAccountEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::UserReportEventRequest, Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
16
|
+
# @return [SafetyKit::Models::Beta::EventCreateParams::Body::UserContactEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::ContentUploadedEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::CreateAccountEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::UpdateAccountEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::UserReportEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest, Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision>]
|
|
17
17
|
required :body, union: -> { SafetyKit::Beta::EventCreateParams::Body }
|
|
18
18
|
|
|
19
19
|
# @!method initialize(body:, request_options: {})
|
|
20
20
|
# Some parameter documentations has been truncated, see
|
|
21
21
|
# {SafetyKit::Models::Beta::EventCreateParams} for more details.
|
|
22
22
|
#
|
|
23
|
-
# @param body [SafetyKit::Models::Beta::EventCreateParams::Body::UserContactEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::ContentUploadedEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::CreateAccountEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::UpdateAccountEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::UserReportEventRequest, Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
23
|
+
# @param body [SafetyKit::Models::Beta::EventCreateParams::Body::UserContactEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::ContentUploadedEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::CreateAccountEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::UpdateAccountEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::UserReportEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest, Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision>] Backend event or ordered batch of events to send to SafetyKit. Send events from
|
|
24
24
|
#
|
|
25
25
|
# @param request_options [SafetyKit::RequestOptions, Hash{Symbol=>Object}]
|
|
26
26
|
|
|
@@ -45,7 +45,10 @@ module SafetyKit
|
|
|
45
45
|
# A user-submitted report. Use user_id for the reporter. Include target_user_id when a user is reported, target_content_id when content is reported, and both when the report is about content associated with a user. Use content and content_id for the report itself.
|
|
46
46
|
variant -> { SafetyKit::Beta::EventCreateParams::Body::UserReportEventRequest }
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
# A moderation label or decision from an automated enforcement system or manual review workflow. Do not send user_id; use source_type and source_id for attribution.
|
|
49
|
+
variant -> { SafetyKit::Beta::EventCreateParams::Body::ModerationDecisionEventRequest }
|
|
50
|
+
|
|
51
|
+
variant -> { SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6Array }
|
|
49
52
|
|
|
50
53
|
class UserContactEventRequest < SafetyKit::Internal::Type::BaseModel
|
|
51
54
|
# @!attribute event_name
|
|
@@ -95,6 +98,13 @@ module SafetyKit
|
|
|
95
98
|
# @return [String, nil]
|
|
96
99
|
optional :content_id, String
|
|
97
100
|
|
|
101
|
+
# @!attribute idempotency_key
|
|
102
|
+
# Optional caller-provided key used to make retries of this individual event
|
|
103
|
+
# idempotent. Reuse the same key only for retries of the same logical event.
|
|
104
|
+
#
|
|
105
|
+
# @return [String, nil]
|
|
106
|
+
optional :idempotency_key, String
|
|
107
|
+
|
|
98
108
|
# @!attribute metadata
|
|
99
109
|
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
100
110
|
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
@@ -112,7 +122,7 @@ module SafetyKit
|
|
|
112
122
|
optional :resources_used,
|
|
113
123
|
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::UserContactEventRequest::ResourcesUsed] }
|
|
114
124
|
|
|
115
|
-
# @!method initialize(event_name:, target_user_id:, timestamp:, type:, user_id:, content: nil, content_id: nil, metadata: nil, resources_used: nil)
|
|
125
|
+
# @!method initialize(event_name:, target_user_id:, timestamp:, type:, user_id:, content: nil, content_id: nil, idempotency_key: nil, metadata: nil, resources_used: nil)
|
|
116
126
|
# Some parameter documentations has been truncated, see
|
|
117
127
|
# {SafetyKit::Models::Beta::EventCreateParams::Body::UserContactEventRequest} for
|
|
118
128
|
# more details.
|
|
@@ -133,6 +143,8 @@ module SafetyKit
|
|
|
133
143
|
#
|
|
134
144
|
# @param content_id [String] Your stable identifier for the content involved in this event, such as a message
|
|
135
145
|
#
|
|
146
|
+
# @param idempotency_key [String] Optional caller-provided key used to make retries of this individual event idemp
|
|
147
|
+
#
|
|
136
148
|
# @param metadata [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}] Non-PII product context for filtering, segmentation, and debugging. Values may b
|
|
137
149
|
#
|
|
138
150
|
# @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UserContactEventRequest::ResourcesUsed>] Reusable resources observed during the event. Use this for emails, phone numbers
|
|
@@ -385,6 +397,13 @@ module SafetyKit
|
|
|
385
397
|
# @return [String, nil]
|
|
386
398
|
optional :content_id, String
|
|
387
399
|
|
|
400
|
+
# @!attribute idempotency_key
|
|
401
|
+
# Optional caller-provided key used to make retries of this individual event
|
|
402
|
+
# idempotent. Reuse the same key only for retries of the same logical event.
|
|
403
|
+
#
|
|
404
|
+
# @return [String, nil]
|
|
405
|
+
optional :idempotency_key, String
|
|
406
|
+
|
|
388
407
|
# @!attribute metadata
|
|
389
408
|
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
390
409
|
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
@@ -402,7 +421,7 @@ module SafetyKit
|
|
|
402
421
|
optional :resources_used,
|
|
403
422
|
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::ContentUploadedEventRequest::ResourcesUsed] }
|
|
404
423
|
|
|
405
|
-
# @!method initialize(content:, event_name:, timestamp:, type:, user_id:, content_id: nil, metadata: nil, resources_used: nil)
|
|
424
|
+
# @!method initialize(content:, event_name:, timestamp:, type:, user_id:, content_id: nil, idempotency_key: nil, metadata: nil, resources_used: nil)
|
|
406
425
|
# Some parameter documentations has been truncated, see
|
|
407
426
|
# {SafetyKit::Models::Beta::EventCreateParams::Body::ContentUploadedEventRequest}
|
|
408
427
|
# for more details.
|
|
@@ -421,6 +440,8 @@ module SafetyKit
|
|
|
421
440
|
#
|
|
422
441
|
# @param content_id [String] Your stable identifier for the content involved in this event, such as a message
|
|
423
442
|
#
|
|
443
|
+
# @param idempotency_key [String] Optional caller-provided key used to make retries of this individual event idemp
|
|
444
|
+
#
|
|
424
445
|
# @param metadata [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}] Non-PII product context for filtering, segmentation, and debugging. Values may b
|
|
425
446
|
#
|
|
426
447
|
# @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::ContentUploadedEventRequest::ResourcesUsed>] Reusable resources observed during the event. Use this for emails, phone numbers
|
|
@@ -673,6 +694,13 @@ module SafetyKit
|
|
|
673
694
|
# @return [String, nil]
|
|
674
695
|
optional :content_id, String
|
|
675
696
|
|
|
697
|
+
# @!attribute idempotency_key
|
|
698
|
+
# Optional caller-provided key used to make retries of this individual event
|
|
699
|
+
# idempotent. Reuse the same key only for retries of the same logical event.
|
|
700
|
+
#
|
|
701
|
+
# @return [String, nil]
|
|
702
|
+
optional :idempotency_key, String
|
|
703
|
+
|
|
676
704
|
# @!attribute metadata
|
|
677
705
|
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
678
706
|
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
@@ -690,7 +718,7 @@ module SafetyKit
|
|
|
690
718
|
optional :resources_used,
|
|
691
719
|
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::CreateAccountEventRequest::ResourcesUsed] }
|
|
692
720
|
|
|
693
|
-
# @!method initialize(event_name:, timestamp:, type:, user_id:, content: nil, content_id: nil, metadata: nil, resources_used: nil)
|
|
721
|
+
# @!method initialize(event_name:, timestamp:, type:, user_id:, content: nil, content_id: nil, idempotency_key: nil, metadata: nil, resources_used: nil)
|
|
694
722
|
# Some parameter documentations has been truncated, see
|
|
695
723
|
# {SafetyKit::Models::Beta::EventCreateParams::Body::CreateAccountEventRequest}
|
|
696
724
|
# for more details.
|
|
@@ -709,6 +737,8 @@ module SafetyKit
|
|
|
709
737
|
#
|
|
710
738
|
# @param content_id [String] Your stable identifier for the content involved in this event, such as a message
|
|
711
739
|
#
|
|
740
|
+
# @param idempotency_key [String] Optional caller-provided key used to make retries of this individual event idemp
|
|
741
|
+
#
|
|
712
742
|
# @param metadata [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}] Non-PII product context for filtering, segmentation, and debugging. Values may b
|
|
713
743
|
#
|
|
714
744
|
# @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::CreateAccountEventRequest::ResourcesUsed>] Reusable resources observed during the event. Use this for emails, phone numbers
|
|
@@ -961,6 +991,13 @@ module SafetyKit
|
|
|
961
991
|
# @return [String, nil]
|
|
962
992
|
optional :content_id, String
|
|
963
993
|
|
|
994
|
+
# @!attribute idempotency_key
|
|
995
|
+
# Optional caller-provided key used to make retries of this individual event
|
|
996
|
+
# idempotent. Reuse the same key only for retries of the same logical event.
|
|
997
|
+
#
|
|
998
|
+
# @return [String, nil]
|
|
999
|
+
optional :idempotency_key, String
|
|
1000
|
+
|
|
964
1001
|
# @!attribute metadata
|
|
965
1002
|
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
966
1003
|
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
@@ -978,7 +1015,7 @@ module SafetyKit
|
|
|
978
1015
|
optional :resources_used,
|
|
979
1016
|
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::UpdateAccountEventRequest::ResourcesUsed] }
|
|
980
1017
|
|
|
981
|
-
# @!method initialize(event_name:, timestamp:, type:, user_id:, content: nil, content_id: nil, metadata: nil, resources_used: nil)
|
|
1018
|
+
# @!method initialize(event_name:, timestamp:, type:, user_id:, content: nil, content_id: nil, idempotency_key: nil, metadata: nil, resources_used: nil)
|
|
982
1019
|
# Some parameter documentations has been truncated, see
|
|
983
1020
|
# {SafetyKit::Models::Beta::EventCreateParams::Body::UpdateAccountEventRequest}
|
|
984
1021
|
# for more details.
|
|
@@ -998,6 +1035,8 @@ module SafetyKit
|
|
|
998
1035
|
#
|
|
999
1036
|
# @param content_id [String] Your stable identifier for the content involved in this event, such as a message
|
|
1000
1037
|
#
|
|
1038
|
+
# @param idempotency_key [String] Optional caller-provided key used to make retries of this individual event idemp
|
|
1039
|
+
#
|
|
1001
1040
|
# @param metadata [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}] Non-PII product context for filtering, segmentation, and debugging. Values may b
|
|
1002
1041
|
#
|
|
1003
1042
|
# @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UpdateAccountEventRequest::ResourcesUsed>] Reusable resources observed during the event. Use this for emails, phone numbers
|
|
@@ -1257,6 +1296,13 @@ module SafetyKit
|
|
|
1257
1296
|
# @return [String, nil]
|
|
1258
1297
|
optional :content_id, String
|
|
1259
1298
|
|
|
1299
|
+
# @!attribute idempotency_key
|
|
1300
|
+
# Optional caller-provided key used to make retries of this individual event
|
|
1301
|
+
# idempotent. Reuse the same key only for retries of the same logical event.
|
|
1302
|
+
#
|
|
1303
|
+
# @return [String, nil]
|
|
1304
|
+
optional :idempotency_key, String
|
|
1305
|
+
|
|
1260
1306
|
# @!attribute metadata
|
|
1261
1307
|
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
1262
1308
|
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
@@ -1286,7 +1332,7 @@ module SafetyKit
|
|
|
1286
1332
|
# @return [String, nil]
|
|
1287
1333
|
optional :target_user_id, String
|
|
1288
1334
|
|
|
1289
|
-
# @!method initialize(event_name:, labels:, timestamp:, type:, user_id:, content: nil, content_id: nil, metadata: nil, resources_used: nil, target_content_id: nil, target_user_id: nil)
|
|
1335
|
+
# @!method initialize(event_name:, labels:, timestamp:, type:, user_id:, content: nil, content_id: nil, idempotency_key: nil, metadata: nil, resources_used: nil, target_content_id: nil, target_user_id: nil)
|
|
1290
1336
|
# Some parameter documentations has been truncated, see
|
|
1291
1337
|
# {SafetyKit::Models::Beta::EventCreateParams::Body::UserReportEventRequest} for
|
|
1292
1338
|
# more details.
|
|
@@ -1310,6 +1356,8 @@ module SafetyKit
|
|
|
1310
1356
|
#
|
|
1311
1357
|
# @param content_id [String] Your stable identifier for the content involved in this event, such as a message
|
|
1312
1358
|
#
|
|
1359
|
+
# @param idempotency_key [String] Optional caller-provided key used to make retries of this individual event idemp
|
|
1360
|
+
#
|
|
1313
1361
|
# @param metadata [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}] Non-PII product context for filtering, segmentation, and debugging. Values may b
|
|
1314
1362
|
#
|
|
1315
1363
|
# @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UserReportEventRequest::ResourcesUsed>] Reusable resources observed during the event. Use this for emails, phone numbers
|
|
@@ -1538,165 +1586,813 @@ module SafetyKit
|
|
|
1538
1586
|
end
|
|
1539
1587
|
end
|
|
1540
1588
|
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1589
|
+
class ModerationDecisionEventRequest < SafetyKit::Internal::Type::BaseModel
|
|
1590
|
+
# @!attribute event_name
|
|
1591
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
1592
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
1593
|
+
#
|
|
1594
|
+
# @return [String]
|
|
1595
|
+
required :event_name, String
|
|
1544
1596
|
|
|
1545
|
-
|
|
1597
|
+
# @!attribute labels
|
|
1598
|
+
# One or more label categories supplied with the report.
|
|
1599
|
+
#
|
|
1600
|
+
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Label>]
|
|
1601
|
+
required :labels,
|
|
1602
|
+
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Label] }
|
|
1546
1603
|
|
|
1547
|
-
#
|
|
1548
|
-
|
|
1604
|
+
# @!attribute source_id
|
|
1605
|
+
# Stable identifier within source_type. For system_auto_ban, use a versioned
|
|
1606
|
+
# system identifier; for manual_review, use the manual reviewer id.
|
|
1607
|
+
#
|
|
1608
|
+
# @return [String]
|
|
1609
|
+
required :source_id, String
|
|
1549
1610
|
|
|
1550
|
-
#
|
|
1551
|
-
|
|
1611
|
+
# @!attribute source_type
|
|
1612
|
+
# Stable snake_case attribution namespace for the decision source, such as
|
|
1613
|
+
# system_auto_ban or manual_review.
|
|
1614
|
+
#
|
|
1615
|
+
# @return [String]
|
|
1616
|
+
required :source_type, String
|
|
1552
1617
|
|
|
1553
|
-
#
|
|
1554
|
-
|
|
1618
|
+
# @!attribute timestamp
|
|
1619
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
1620
|
+
#
|
|
1621
|
+
# @return [Time]
|
|
1622
|
+
required :timestamp, Time
|
|
1555
1623
|
|
|
1556
|
-
#
|
|
1557
|
-
|
|
1624
|
+
# @!attribute type
|
|
1625
|
+
#
|
|
1626
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Type]
|
|
1627
|
+
required :type,
|
|
1628
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Type }
|
|
1558
1629
|
|
|
1559
|
-
#
|
|
1560
|
-
|
|
1630
|
+
# @!attribute content
|
|
1631
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
1632
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
1633
|
+
# analyze.
|
|
1634
|
+
#
|
|
1635
|
+
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventImageContent>, nil]
|
|
1636
|
+
optional :content,
|
|
1637
|
+
-> { SafetyKit::Internal::Type::ArrayOf[union: SafetyKit::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content] }
|
|
1561
1638
|
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
required :event_name, String
|
|
1639
|
+
# @!attribute content_id
|
|
1640
|
+
# Your stable identifier for the content involved in this event, such as a
|
|
1641
|
+
# message, listing, page, post, profile, or uploaded media item.
|
|
1642
|
+
#
|
|
1643
|
+
# @return [String, nil]
|
|
1644
|
+
optional :content_id, String
|
|
1569
1645
|
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1646
|
+
# @!attribute idempotency_key
|
|
1647
|
+
# Optional caller-provided key used to make retries of this individual event
|
|
1648
|
+
# idempotent. Reuse the same key only for retries of the same logical event.
|
|
1649
|
+
#
|
|
1650
|
+
# @return [String, nil]
|
|
1651
|
+
optional :idempotency_key, String
|
|
1576
1652
|
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1653
|
+
# @!attribute metadata
|
|
1654
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
1655
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
1656
|
+
#
|
|
1657
|
+
# @return [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}, nil]
|
|
1658
|
+
optional :metadata,
|
|
1659
|
+
-> { SafetyKit::Internal::Type::HashOf[union: SafetyKit::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Metadata] }
|
|
1582
1660
|
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1661
|
+
# @!attribute resources_used
|
|
1662
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
1663
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
1664
|
+
# identifiers.
|
|
1665
|
+
#
|
|
1666
|
+
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::ResourcesUsed>, nil]
|
|
1667
|
+
optional :resources_used,
|
|
1668
|
+
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::ResourcesUsed] }
|
|
1587
1669
|
|
|
1588
|
-
|
|
1589
|
-
|
|
1670
|
+
# @!attribute target_content_id
|
|
1671
|
+
# Your stable identifier for the content being reported.
|
|
1672
|
+
#
|
|
1673
|
+
# @return [String, nil]
|
|
1674
|
+
optional :target_content_id, String
|
|
1675
|
+
|
|
1676
|
+
# @!attribute target_user_id
|
|
1677
|
+
# Your stable canonical identifier for the user being reported.
|
|
1678
|
+
#
|
|
1679
|
+
# @return [String, nil]
|
|
1680
|
+
optional :target_user_id, String
|
|
1681
|
+
|
|
1682
|
+
# @!method initialize(event_name:, labels:, source_id:, source_type:, timestamp:, type:, content: nil, content_id: nil, idempotency_key: nil, metadata: nil, resources_used: nil, target_content_id: nil, target_user_id: nil)
|
|
1683
|
+
# Some parameter documentations has been truncated, see
|
|
1684
|
+
# {SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest}
|
|
1685
|
+
# for more details.
|
|
1686
|
+
#
|
|
1687
|
+
# A moderation label or decision from an automated enforcement system or manual
|
|
1688
|
+
# review workflow. Do not send user_id; use source_type and source_id for
|
|
1689
|
+
# attribution.
|
|
1690
|
+
#
|
|
1691
|
+
# @param event_name [String] Stable, low-cardinality product action name. Use snake_case and put dynamic valu
|
|
1692
|
+
#
|
|
1693
|
+
# @param labels [Array<SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Label>] One or more label categories supplied with the report.
|
|
1694
|
+
#
|
|
1695
|
+
# @param source_id [String] Stable identifier within source_type. For system_auto_ban, use a versioned syste
|
|
1696
|
+
#
|
|
1697
|
+
# @param source_type [String] Stable snake*case attribution namespace for the decision source, such as system*
|
|
1698
|
+
#
|
|
1699
|
+
# @param timestamp [Time] The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
1700
|
+
#
|
|
1701
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Type]
|
|
1702
|
+
#
|
|
1703
|
+
# @param content [Array<SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventImageContent>] User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
1704
|
+
#
|
|
1705
|
+
# @param content_id [String] Your stable identifier for the content involved in this event, such as a message
|
|
1706
|
+
#
|
|
1707
|
+
# @param idempotency_key [String] Optional caller-provided key used to make retries of this individual event idemp
|
|
1708
|
+
#
|
|
1709
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}] Non-PII product context for filtering, segmentation, and debugging. Values may b
|
|
1710
|
+
#
|
|
1711
|
+
# @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::ResourcesUsed>] Reusable resources observed during the event. Use this for emails, phone numbers
|
|
1712
|
+
#
|
|
1713
|
+
# @param target_content_id [String] Your stable identifier for the content being reported.
|
|
1714
|
+
#
|
|
1715
|
+
# @param target_user_id [String] Your stable canonical identifier for the user being reported.
|
|
1716
|
+
|
|
1717
|
+
class Label < SafetyKit::Internal::Type::BaseModel
|
|
1718
|
+
# @!attribute label
|
|
1719
|
+
# Stable snake_case report label category.
|
|
1590
1720
|
#
|
|
1591
1721
|
# @return [String]
|
|
1592
|
-
required :
|
|
1722
|
+
required :label, String
|
|
1593
1723
|
|
|
1594
|
-
# @!
|
|
1595
|
-
#
|
|
1596
|
-
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
1597
|
-
# analyze.
|
|
1724
|
+
# @!method initialize(label:)
|
|
1725
|
+
# Label category supplied with a user report.
|
|
1598
1726
|
#
|
|
1599
|
-
# @
|
|
1600
|
-
|
|
1601
|
-
-> { SafetyKit::Internal::Type::ArrayOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember5::UserContact::Content] }
|
|
1727
|
+
# @param label [String] Stable snake_case report label category.
|
|
1728
|
+
end
|
|
1602
1729
|
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
#
|
|
1607
|
-
# @return [String, nil]
|
|
1608
|
-
optional :content_id, String
|
|
1730
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest#type
|
|
1731
|
+
module Type
|
|
1732
|
+
extend SafetyKit::Internal::Type::Enum
|
|
1609
1733
|
|
|
1610
|
-
|
|
1611
|
-
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
1612
|
-
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
1613
|
-
#
|
|
1614
|
-
# @return [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}, nil]
|
|
1615
|
-
optional :metadata,
|
|
1616
|
-
-> { SafetyKit::Internal::Type::HashOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember5::UserContact::Metadata] }
|
|
1734
|
+
MODERATION_DECISION = :moderation_decision
|
|
1617
1735
|
|
|
1618
|
-
# @!
|
|
1619
|
-
#
|
|
1620
|
-
|
|
1621
|
-
# identifiers.
|
|
1622
|
-
#
|
|
1623
|
-
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember5::UserContact::ResourcesUsed>, nil]
|
|
1624
|
-
optional :resources_used,
|
|
1625
|
-
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::UnionMember5::UserContact::ResourcesUsed] }
|
|
1736
|
+
# @!method self.values
|
|
1737
|
+
# @return [Array<Symbol>]
|
|
1738
|
+
end
|
|
1626
1739
|
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
# for more details.
|
|
1631
|
-
#
|
|
1632
|
-
# A user contacts, transacts with, or otherwise interacts with another user.
|
|
1633
|
-
#
|
|
1634
|
-
# @param event_name [String] Stable, low-cardinality product action name. Use snake_case and put dynamic valu
|
|
1635
|
-
#
|
|
1636
|
-
# @param target_user_id [String] Your stable canonical identifier for the other user in a user-to-user interactio
|
|
1637
|
-
#
|
|
1638
|
-
# @param timestamp [Time] The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
1639
|
-
#
|
|
1640
|
-
# @param user_id [String] Your stable canonical identifier for the user or account.
|
|
1641
|
-
#
|
|
1642
|
-
# @param content [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember5::UserContact::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember5::UserContact::Content::EventImageContent>] User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
1643
|
-
#
|
|
1644
|
-
# @param content_id [String] Your stable identifier for the content involved in this event, such as a message
|
|
1645
|
-
#
|
|
1646
|
-
# @param metadata [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}] Non-PII product context for filtering, segmentation, and debugging. Values may b
|
|
1647
|
-
#
|
|
1648
|
-
# @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember5::UserContact::ResourcesUsed>] Reusable resources observed during the event. Use this for emails, phone numbers
|
|
1649
|
-
#
|
|
1650
|
-
# @param type [Symbol, :user_contact]
|
|
1740
|
+
# User-authored text content associated with an event.
|
|
1741
|
+
module Content
|
|
1742
|
+
extend SafetyKit::Internal::Type::Union
|
|
1651
1743
|
|
|
1652
1744
|
# User-authored text content associated with an event.
|
|
1653
|
-
|
|
1654
|
-
extend SafetyKit::Internal::Type::Union
|
|
1655
|
-
|
|
1656
|
-
# User-authored text content associated with an event.
|
|
1657
|
-
variant -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember5::UserContact::Content::EventTextContent }
|
|
1745
|
+
variant -> { SafetyKit::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventTextContent }
|
|
1658
1746
|
|
|
1659
|
-
|
|
1660
|
-
|
|
1747
|
+
# User-uploaded image content associated with an event.
|
|
1748
|
+
variant -> { SafetyKit::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventImageContent }
|
|
1661
1749
|
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1750
|
+
class EventTextContent < SafetyKit::Internal::Type::BaseModel
|
|
1751
|
+
# @!attribute text
|
|
1752
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
1753
|
+
#
|
|
1754
|
+
# @return [String]
|
|
1755
|
+
required :text, String
|
|
1668
1756
|
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1757
|
+
# @!attribute type
|
|
1758
|
+
# Text content part.
|
|
1759
|
+
#
|
|
1760
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventTextContent::Type]
|
|
1761
|
+
required :type,
|
|
1762
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventTextContent::Type }
|
|
1675
1763
|
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1764
|
+
# @!attribute key
|
|
1765
|
+
# Stable field key for this content part.
|
|
1766
|
+
#
|
|
1767
|
+
# @return [String, nil]
|
|
1768
|
+
optional :key, String
|
|
1681
1769
|
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1770
|
+
# @!method initialize(text:, type:, key: nil)
|
|
1771
|
+
# User-authored text content associated with an event.
|
|
1772
|
+
#
|
|
1773
|
+
# @param text [String] User-authored text SafetyKit should compare or analyze.
|
|
1774
|
+
#
|
|
1775
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventTextContent::Type] Text content part.
|
|
1776
|
+
#
|
|
1777
|
+
# @param key [String] Stable field key for this content part.
|
|
1690
1778
|
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1779
|
+
# Text content part.
|
|
1780
|
+
#
|
|
1781
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventTextContent#type
|
|
1782
|
+
module Type
|
|
1783
|
+
extend SafetyKit::Internal::Type::Enum
|
|
1696
1784
|
|
|
1697
|
-
|
|
1785
|
+
TEXT = :text
|
|
1698
1786
|
|
|
1699
|
-
|
|
1787
|
+
# @!method self.values
|
|
1788
|
+
# @return [Array<Symbol>]
|
|
1789
|
+
end
|
|
1790
|
+
end
|
|
1791
|
+
|
|
1792
|
+
class EventImageContent < SafetyKit::Internal::Type::BaseModel
|
|
1793
|
+
# @!attribute source
|
|
1794
|
+
# Image source information.
|
|
1795
|
+
#
|
|
1796
|
+
# @return [SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventImageContent::Source]
|
|
1797
|
+
required :source,
|
|
1798
|
+
-> { SafetyKit::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventImageContent::Source }
|
|
1799
|
+
|
|
1800
|
+
# @!attribute type
|
|
1801
|
+
# Image content part.
|
|
1802
|
+
#
|
|
1803
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventImageContent::Type]
|
|
1804
|
+
required :type,
|
|
1805
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventImageContent::Type }
|
|
1806
|
+
|
|
1807
|
+
# @!attribute key
|
|
1808
|
+
# Stable field key for this content part.
|
|
1809
|
+
#
|
|
1810
|
+
# @return [String, nil]
|
|
1811
|
+
optional :key, String
|
|
1812
|
+
|
|
1813
|
+
# @!method initialize(source:, type:, key: nil)
|
|
1814
|
+
# User-uploaded image content associated with an event.
|
|
1815
|
+
#
|
|
1816
|
+
# @param source [SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventImageContent::Source] Image source information.
|
|
1817
|
+
#
|
|
1818
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventImageContent::Type] Image content part.
|
|
1819
|
+
#
|
|
1820
|
+
# @param key [String] Stable field key for this content part.
|
|
1821
|
+
|
|
1822
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventImageContent#source
|
|
1823
|
+
class Source < SafetyKit::Internal::Type::BaseModel
|
|
1824
|
+
# @!attribute type
|
|
1825
|
+
# URL image source.
|
|
1826
|
+
#
|
|
1827
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventImageContent::Source::Type]
|
|
1828
|
+
required :type,
|
|
1829
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventImageContent::Source::Type }
|
|
1830
|
+
|
|
1831
|
+
# @!attribute url
|
|
1832
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
1833
|
+
#
|
|
1834
|
+
# @return [String]
|
|
1835
|
+
required :url, String
|
|
1836
|
+
|
|
1837
|
+
# @!method initialize(type:, url:)
|
|
1838
|
+
# Image source information.
|
|
1839
|
+
#
|
|
1840
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventImageContent::Source::Type] URL image source.
|
|
1841
|
+
#
|
|
1842
|
+
# @param url [String] URL of the image SafetyKit should compare or analyze.
|
|
1843
|
+
|
|
1844
|
+
# URL image source.
|
|
1845
|
+
#
|
|
1846
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventImageContent::Source#type
|
|
1847
|
+
module Type
|
|
1848
|
+
extend SafetyKit::Internal::Type::Enum
|
|
1849
|
+
|
|
1850
|
+
URL = :url
|
|
1851
|
+
|
|
1852
|
+
# @!method self.values
|
|
1853
|
+
# @return [Array<Symbol>]
|
|
1854
|
+
end
|
|
1855
|
+
end
|
|
1856
|
+
|
|
1857
|
+
# Image content part.
|
|
1858
|
+
#
|
|
1859
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventImageContent#type
|
|
1860
|
+
module Type
|
|
1861
|
+
extend SafetyKit::Internal::Type::Enum
|
|
1862
|
+
|
|
1863
|
+
IMAGE = :image
|
|
1864
|
+
|
|
1865
|
+
# @!method self.values
|
|
1866
|
+
# @return [Array<Symbol>]
|
|
1867
|
+
end
|
|
1868
|
+
end
|
|
1869
|
+
|
|
1870
|
+
# @!method self.variants
|
|
1871
|
+
# @return [Array(SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Content::EventImageContent)]
|
|
1872
|
+
end
|
|
1873
|
+
|
|
1874
|
+
module Metadata
|
|
1875
|
+
extend SafetyKit::Internal::Type::Union
|
|
1876
|
+
|
|
1877
|
+
variant String
|
|
1878
|
+
|
|
1879
|
+
variant Float
|
|
1880
|
+
|
|
1881
|
+
variant SafetyKit::Internal::Type::Boolean
|
|
1882
|
+
|
|
1883
|
+
variant -> { SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Metadata::UnionMember3Array }
|
|
1884
|
+
|
|
1885
|
+
module UnionMember3
|
|
1886
|
+
extend SafetyKit::Internal::Type::Union
|
|
1887
|
+
|
|
1888
|
+
variant String
|
|
1889
|
+
|
|
1890
|
+
variant Float
|
|
1891
|
+
|
|
1892
|
+
variant SafetyKit::Internal::Type::Boolean
|
|
1893
|
+
|
|
1894
|
+
# @!method self.variants
|
|
1895
|
+
# @return [Array(String, Float, Boolean)]
|
|
1896
|
+
end
|
|
1897
|
+
|
|
1898
|
+
# @!method self.variants
|
|
1899
|
+
# @return [Array(String, Float, Boolean, Array<String, Float, Boolean>)]
|
|
1900
|
+
|
|
1901
|
+
# @type [SafetyKit::Internal::Type::Converter]
|
|
1902
|
+
UnionMember3Array =
|
|
1903
|
+
SafetyKit::Internal::Type::ArrayOf[
|
|
1904
|
+
union: -> { SafetyKit::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::Metadata::UnionMember3 }
|
|
1905
|
+
]
|
|
1906
|
+
end
|
|
1907
|
+
|
|
1908
|
+
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
1909
|
+
# @!attribute type
|
|
1910
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
1911
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
1912
|
+
#
|
|
1913
|
+
# @return [String]
|
|
1914
|
+
required :type, String
|
|
1915
|
+
|
|
1916
|
+
# @!attribute value
|
|
1917
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
1918
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
1919
|
+
#
|
|
1920
|
+
# @return [String]
|
|
1921
|
+
required :value, String
|
|
1922
|
+
|
|
1923
|
+
# @!method initialize(type:, value:)
|
|
1924
|
+
# Some parameter documentations has been truncated, see
|
|
1925
|
+
# {SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest::ResourcesUsed}
|
|
1926
|
+
# for more details.
|
|
1927
|
+
#
|
|
1928
|
+
# Real-world or account resource used during the event, such as an email, phone
|
|
1929
|
+
# number, address, URL, social handle, or payment identifier.
|
|
1930
|
+
#
|
|
1931
|
+
# @param type [String] Resource family, such as email, phone, name, address, url, instagram, tiktok, yo
|
|
1932
|
+
#
|
|
1933
|
+
# @param value [String] Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
1934
|
+
end
|
|
1935
|
+
end
|
|
1936
|
+
|
|
1937
|
+
# A user contacts, transacts with, or otherwise interacts with another user.
|
|
1938
|
+
module UnionMember6
|
|
1939
|
+
extend SafetyKit::Internal::Type::Union
|
|
1940
|
+
|
|
1941
|
+
discriminator :type
|
|
1942
|
+
|
|
1943
|
+
# A user contacts, transacts with, or otherwise interacts with another user.
|
|
1944
|
+
variant :user_contact, -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserContact }
|
|
1945
|
+
|
|
1946
|
+
# A user posts, uploads, publishes, edits, or replaces content.
|
|
1947
|
+
variant :content_uploaded, -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded }
|
|
1948
|
+
|
|
1949
|
+
# A user or account is created.
|
|
1950
|
+
variant :create_account, -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::CreateAccount }
|
|
1951
|
+
|
|
1952
|
+
# A user or account profile, contact detail, payment detail, or public bio changes.
|
|
1953
|
+
variant :update_account, -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount }
|
|
1954
|
+
|
|
1955
|
+
# A user-submitted report. Use user_id for the reporter. Include target_user_id when a user is reported, target_content_id when content is reported, and both when the report is about content associated with a user. Use content and content_id for the report itself.
|
|
1956
|
+
variant :user_report, -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserReport }
|
|
1957
|
+
|
|
1958
|
+
# A moderation label or decision from an automated enforcement system or manual review workflow. Do not send user_id; use source_type and source_id for attribution.
|
|
1959
|
+
variant :moderation_decision,
|
|
1960
|
+
-> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision }
|
|
1961
|
+
|
|
1962
|
+
class UserContact < SafetyKit::Internal::Type::BaseModel
|
|
1963
|
+
# @!attribute event_name
|
|
1964
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
1965
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
1966
|
+
#
|
|
1967
|
+
# @return [String]
|
|
1968
|
+
required :event_name, String
|
|
1969
|
+
|
|
1970
|
+
# @!attribute target_user_id
|
|
1971
|
+
# Your stable canonical identifier for the other user in a user-to-user
|
|
1972
|
+
# interaction.
|
|
1973
|
+
#
|
|
1974
|
+
# @return [String]
|
|
1975
|
+
required :target_user_id, String
|
|
1976
|
+
|
|
1977
|
+
# @!attribute timestamp
|
|
1978
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
1979
|
+
#
|
|
1980
|
+
# @return [Time]
|
|
1981
|
+
required :timestamp, Time
|
|
1982
|
+
|
|
1983
|
+
# @!attribute type
|
|
1984
|
+
#
|
|
1985
|
+
# @return [Symbol, :user_contact]
|
|
1986
|
+
required :type, const: :user_contact
|
|
1987
|
+
|
|
1988
|
+
# @!attribute user_id
|
|
1989
|
+
# Your stable canonical identifier for the user or account.
|
|
1990
|
+
#
|
|
1991
|
+
# @return [String]
|
|
1992
|
+
required :user_id, String
|
|
1993
|
+
|
|
1994
|
+
# @!attribute content
|
|
1995
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
1996
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
1997
|
+
# analyze.
|
|
1998
|
+
#
|
|
1999
|
+
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventImageContent>, nil]
|
|
2000
|
+
optional :content,
|
|
2001
|
+
-> { SafetyKit::Internal::Type::ArrayOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content] }
|
|
2002
|
+
|
|
2003
|
+
# @!attribute content_id
|
|
2004
|
+
# Your stable identifier for the content involved in this event, such as a
|
|
2005
|
+
# message, listing, page, post, profile, or uploaded media item.
|
|
2006
|
+
#
|
|
2007
|
+
# @return [String, nil]
|
|
2008
|
+
optional :content_id, String
|
|
2009
|
+
|
|
2010
|
+
# @!attribute idempotency_key
|
|
2011
|
+
# Optional caller-provided key used to make retries of this individual event
|
|
2012
|
+
# idempotent. Reuse the same key only for retries of the same logical event.
|
|
2013
|
+
#
|
|
2014
|
+
# @return [String, nil]
|
|
2015
|
+
optional :idempotency_key, String
|
|
2016
|
+
|
|
2017
|
+
# @!attribute metadata
|
|
2018
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
2019
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
2020
|
+
#
|
|
2021
|
+
# @return [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}, nil]
|
|
2022
|
+
optional :metadata,
|
|
2023
|
+
-> { SafetyKit::Internal::Type::HashOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserContact::Metadata] }
|
|
2024
|
+
|
|
2025
|
+
# @!attribute resources_used
|
|
2026
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
2027
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
2028
|
+
# identifiers.
|
|
2029
|
+
#
|
|
2030
|
+
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::ResourcesUsed>, nil]
|
|
2031
|
+
optional :resources_used,
|
|
2032
|
+
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserContact::ResourcesUsed] }
|
|
2033
|
+
|
|
2034
|
+
# @!method initialize(event_name:, target_user_id:, timestamp:, user_id:, content: nil, content_id: nil, idempotency_key: nil, metadata: nil, resources_used: nil, type: :user_contact)
|
|
2035
|
+
# Some parameter documentations has been truncated, see
|
|
2036
|
+
# {SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact}
|
|
2037
|
+
# for more details.
|
|
2038
|
+
#
|
|
2039
|
+
# A user contacts, transacts with, or otherwise interacts with another user.
|
|
2040
|
+
#
|
|
2041
|
+
# @param event_name [String] Stable, low-cardinality product action name. Use snake_case and put dynamic valu
|
|
2042
|
+
#
|
|
2043
|
+
# @param target_user_id [String] Your stable canonical identifier for the other user in a user-to-user interactio
|
|
2044
|
+
#
|
|
2045
|
+
# @param timestamp [Time] The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
2046
|
+
#
|
|
2047
|
+
# @param user_id [String] Your stable canonical identifier for the user or account.
|
|
2048
|
+
#
|
|
2049
|
+
# @param content [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventImageContent>] User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
2050
|
+
#
|
|
2051
|
+
# @param content_id [String] Your stable identifier for the content involved in this event, such as a message
|
|
2052
|
+
#
|
|
2053
|
+
# @param idempotency_key [String] Optional caller-provided key used to make retries of this individual event idemp
|
|
2054
|
+
#
|
|
2055
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}] Non-PII product context for filtering, segmentation, and debugging. Values may b
|
|
2056
|
+
#
|
|
2057
|
+
# @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::ResourcesUsed>] Reusable resources observed during the event. Use this for emails, phone numbers
|
|
2058
|
+
#
|
|
2059
|
+
# @param type [Symbol, :user_contact]
|
|
2060
|
+
|
|
2061
|
+
# User-authored text content associated with an event.
|
|
2062
|
+
module Content
|
|
2063
|
+
extend SafetyKit::Internal::Type::Union
|
|
2064
|
+
|
|
2065
|
+
# User-authored text content associated with an event.
|
|
2066
|
+
variant -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventTextContent }
|
|
2067
|
+
|
|
2068
|
+
# User-uploaded image content associated with an event.
|
|
2069
|
+
variant -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventImageContent }
|
|
2070
|
+
|
|
2071
|
+
class EventTextContent < SafetyKit::Internal::Type::BaseModel
|
|
2072
|
+
# @!attribute text
|
|
2073
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
2074
|
+
#
|
|
2075
|
+
# @return [String]
|
|
2076
|
+
required :text, String
|
|
2077
|
+
|
|
2078
|
+
# @!attribute type
|
|
2079
|
+
# Text content part.
|
|
2080
|
+
#
|
|
2081
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventTextContent::Type]
|
|
2082
|
+
required :type,
|
|
2083
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventTextContent::Type }
|
|
2084
|
+
|
|
2085
|
+
# @!attribute key
|
|
2086
|
+
# Stable field key for this content part.
|
|
2087
|
+
#
|
|
2088
|
+
# @return [String, nil]
|
|
2089
|
+
optional :key, String
|
|
2090
|
+
|
|
2091
|
+
# @!method initialize(text:, type:, key: nil)
|
|
2092
|
+
# User-authored text content associated with an event.
|
|
2093
|
+
#
|
|
2094
|
+
# @param text [String] User-authored text SafetyKit should compare or analyze.
|
|
2095
|
+
#
|
|
2096
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventTextContent::Type] Text content part.
|
|
2097
|
+
#
|
|
2098
|
+
# @param key [String] Stable field key for this content part.
|
|
2099
|
+
|
|
2100
|
+
# Text content part.
|
|
2101
|
+
#
|
|
2102
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventTextContent#type
|
|
2103
|
+
module Type
|
|
2104
|
+
extend SafetyKit::Internal::Type::Enum
|
|
2105
|
+
|
|
2106
|
+
TEXT = :text
|
|
2107
|
+
|
|
2108
|
+
# @!method self.values
|
|
2109
|
+
# @return [Array<Symbol>]
|
|
2110
|
+
end
|
|
2111
|
+
end
|
|
2112
|
+
|
|
2113
|
+
class EventImageContent < SafetyKit::Internal::Type::BaseModel
|
|
2114
|
+
# @!attribute source
|
|
2115
|
+
# Image source information.
|
|
2116
|
+
#
|
|
2117
|
+
# @return [SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventImageContent::Source]
|
|
2118
|
+
required :source,
|
|
2119
|
+
-> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventImageContent::Source }
|
|
2120
|
+
|
|
2121
|
+
# @!attribute type
|
|
2122
|
+
# Image content part.
|
|
2123
|
+
#
|
|
2124
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventImageContent::Type]
|
|
2125
|
+
required :type,
|
|
2126
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventImageContent::Type }
|
|
2127
|
+
|
|
2128
|
+
# @!attribute key
|
|
2129
|
+
# Stable field key for this content part.
|
|
2130
|
+
#
|
|
2131
|
+
# @return [String, nil]
|
|
2132
|
+
optional :key, String
|
|
2133
|
+
|
|
2134
|
+
# @!method initialize(source:, type:, key: nil)
|
|
2135
|
+
# User-uploaded image content associated with an event.
|
|
2136
|
+
#
|
|
2137
|
+
# @param source [SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventImageContent::Source] Image source information.
|
|
2138
|
+
#
|
|
2139
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventImageContent::Type] Image content part.
|
|
2140
|
+
#
|
|
2141
|
+
# @param key [String] Stable field key for this content part.
|
|
2142
|
+
|
|
2143
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventImageContent#source
|
|
2144
|
+
class Source < SafetyKit::Internal::Type::BaseModel
|
|
2145
|
+
# @!attribute type
|
|
2146
|
+
# URL image source.
|
|
2147
|
+
#
|
|
2148
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventImageContent::Source::Type]
|
|
2149
|
+
required :type,
|
|
2150
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventImageContent::Source::Type }
|
|
2151
|
+
|
|
2152
|
+
# @!attribute url
|
|
2153
|
+
# URL of the image SafetyKit should compare or analyze.
|
|
2154
|
+
#
|
|
2155
|
+
# @return [String]
|
|
2156
|
+
required :url, String
|
|
2157
|
+
|
|
2158
|
+
# @!method initialize(type:, url:)
|
|
2159
|
+
# Image source information.
|
|
2160
|
+
#
|
|
2161
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventImageContent::Source::Type] URL image source.
|
|
2162
|
+
#
|
|
2163
|
+
# @param url [String] URL of the image SafetyKit should compare or analyze.
|
|
2164
|
+
|
|
2165
|
+
# URL image source.
|
|
2166
|
+
#
|
|
2167
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventImageContent::Source#type
|
|
2168
|
+
module Type
|
|
2169
|
+
extend SafetyKit::Internal::Type::Enum
|
|
2170
|
+
|
|
2171
|
+
URL = :url
|
|
2172
|
+
|
|
2173
|
+
# @!method self.values
|
|
2174
|
+
# @return [Array<Symbol>]
|
|
2175
|
+
end
|
|
2176
|
+
end
|
|
2177
|
+
|
|
2178
|
+
# Image content part.
|
|
2179
|
+
#
|
|
2180
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventImageContent#type
|
|
2181
|
+
module Type
|
|
2182
|
+
extend SafetyKit::Internal::Type::Enum
|
|
2183
|
+
|
|
2184
|
+
IMAGE = :image
|
|
2185
|
+
|
|
2186
|
+
# @!method self.values
|
|
2187
|
+
# @return [Array<Symbol>]
|
|
2188
|
+
end
|
|
2189
|
+
end
|
|
2190
|
+
|
|
2191
|
+
# @!method self.variants
|
|
2192
|
+
# @return [Array(SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Content::EventImageContent)]
|
|
2193
|
+
end
|
|
2194
|
+
|
|
2195
|
+
module Metadata
|
|
2196
|
+
extend SafetyKit::Internal::Type::Union
|
|
2197
|
+
|
|
2198
|
+
variant String
|
|
2199
|
+
|
|
2200
|
+
variant Float
|
|
2201
|
+
|
|
2202
|
+
variant SafetyKit::Internal::Type::Boolean
|
|
2203
|
+
|
|
2204
|
+
variant -> { SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::Metadata::UnionMember3Array }
|
|
2205
|
+
|
|
2206
|
+
module UnionMember3
|
|
2207
|
+
extend SafetyKit::Internal::Type::Union
|
|
2208
|
+
|
|
2209
|
+
variant String
|
|
2210
|
+
|
|
2211
|
+
variant Float
|
|
2212
|
+
|
|
2213
|
+
variant SafetyKit::Internal::Type::Boolean
|
|
2214
|
+
|
|
2215
|
+
# @!method self.variants
|
|
2216
|
+
# @return [Array(String, Float, Boolean)]
|
|
2217
|
+
end
|
|
2218
|
+
|
|
2219
|
+
# @!method self.variants
|
|
2220
|
+
# @return [Array(String, Float, Boolean, Array<String, Float, Boolean>)]
|
|
2221
|
+
|
|
2222
|
+
# @type [SafetyKit::Internal::Type::Converter]
|
|
2223
|
+
UnionMember3Array =
|
|
2224
|
+
SafetyKit::Internal::Type::ArrayOf[union: -> {
|
|
2225
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserContact::Metadata::UnionMember3
|
|
2226
|
+
}]
|
|
2227
|
+
end
|
|
2228
|
+
|
|
2229
|
+
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
2230
|
+
# @!attribute type
|
|
2231
|
+
# Resource family, such as email, phone, name, address, url, instagram, tiktok,
|
|
2232
|
+
# youtube, linkedin, or another stable snake_case identifier.
|
|
2233
|
+
#
|
|
2234
|
+
# @return [String]
|
|
2235
|
+
required :type, String
|
|
2236
|
+
|
|
2237
|
+
# @!attribute value
|
|
2238
|
+
# Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
2239
|
+
# value, not the raw value. When type is url, this must be a valid URL.
|
|
2240
|
+
#
|
|
2241
|
+
# @return [String]
|
|
2242
|
+
required :value, String
|
|
2243
|
+
|
|
2244
|
+
# @!method initialize(type:, value:)
|
|
2245
|
+
# Some parameter documentations has been truncated, see
|
|
2246
|
+
# {SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact::ResourcesUsed}
|
|
2247
|
+
# for more details.
|
|
2248
|
+
#
|
|
2249
|
+
# Real-world or account resource used during the event, such as an email, phone
|
|
2250
|
+
# number, address, URL, social handle, or payment identifier.
|
|
2251
|
+
#
|
|
2252
|
+
# @param type [String] Resource family, such as email, phone, name, address, url, instagram, tiktok, yo
|
|
2253
|
+
#
|
|
2254
|
+
# @param value [String] Resource value used during the event. SafetyKit stores a normalized hash of this
|
|
2255
|
+
end
|
|
2256
|
+
end
|
|
2257
|
+
|
|
2258
|
+
class ContentUploaded < SafetyKit::Internal::Type::BaseModel
|
|
2259
|
+
# @!attribute content
|
|
2260
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
2261
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
2262
|
+
# analyze.
|
|
2263
|
+
#
|
|
2264
|
+
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventImageContent>]
|
|
2265
|
+
required :content,
|
|
2266
|
+
-> { SafetyKit::Internal::Type::ArrayOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content] }
|
|
2267
|
+
|
|
2268
|
+
# @!attribute event_name
|
|
2269
|
+
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
2270
|
+
# values in typed fields, content, resources_used, or metadata.
|
|
2271
|
+
#
|
|
2272
|
+
# @return [String]
|
|
2273
|
+
required :event_name, String
|
|
2274
|
+
|
|
2275
|
+
# @!attribute timestamp
|
|
2276
|
+
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
2277
|
+
#
|
|
2278
|
+
# @return [Time]
|
|
2279
|
+
required :timestamp, Time
|
|
2280
|
+
|
|
2281
|
+
# @!attribute type
|
|
2282
|
+
#
|
|
2283
|
+
# @return [Symbol, :content_uploaded]
|
|
2284
|
+
required :type, const: :content_uploaded
|
|
2285
|
+
|
|
2286
|
+
# @!attribute user_id
|
|
2287
|
+
# Your stable canonical identifier for the user or account.
|
|
2288
|
+
#
|
|
2289
|
+
# @return [String]
|
|
2290
|
+
required :user_id, String
|
|
2291
|
+
|
|
2292
|
+
# @!attribute content_id
|
|
2293
|
+
# Your stable identifier for the content involved in this event, such as a
|
|
2294
|
+
# message, listing, page, post, profile, or uploaded media item.
|
|
2295
|
+
#
|
|
2296
|
+
# @return [String, nil]
|
|
2297
|
+
optional :content_id, String
|
|
2298
|
+
|
|
2299
|
+
# @!attribute idempotency_key
|
|
2300
|
+
# Optional caller-provided key used to make retries of this individual event
|
|
2301
|
+
# idempotent. Reuse the same key only for retries of the same logical event.
|
|
2302
|
+
#
|
|
2303
|
+
# @return [String, nil]
|
|
2304
|
+
optional :idempotency_key, String
|
|
2305
|
+
|
|
2306
|
+
# @!attribute metadata
|
|
2307
|
+
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
2308
|
+
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
2309
|
+
#
|
|
2310
|
+
# @return [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}, nil]
|
|
2311
|
+
optional :metadata,
|
|
2312
|
+
-> { SafetyKit::Internal::Type::HashOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Metadata] }
|
|
2313
|
+
|
|
2314
|
+
# @!attribute resources_used
|
|
2315
|
+
# Reusable resources observed during the event. Use this for emails, phone
|
|
2316
|
+
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
2317
|
+
# identifiers.
|
|
2318
|
+
#
|
|
2319
|
+
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::ResourcesUsed>, nil]
|
|
2320
|
+
optional :resources_used,
|
|
2321
|
+
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::ResourcesUsed] }
|
|
2322
|
+
|
|
2323
|
+
# @!method initialize(content:, event_name:, timestamp:, user_id:, content_id: nil, idempotency_key: nil, metadata: nil, resources_used: nil, type: :content_uploaded)
|
|
2324
|
+
# Some parameter documentations has been truncated, see
|
|
2325
|
+
# {SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded}
|
|
2326
|
+
# for more details.
|
|
2327
|
+
#
|
|
2328
|
+
# A user posts, uploads, publishes, edits, or replaces content.
|
|
2329
|
+
#
|
|
2330
|
+
# @param content [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventImageContent>] User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
2331
|
+
#
|
|
2332
|
+
# @param event_name [String] Stable, low-cardinality product action name. Use snake_case and put dynamic valu
|
|
2333
|
+
#
|
|
2334
|
+
# @param timestamp [Time] The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
2335
|
+
#
|
|
2336
|
+
# @param user_id [String] Your stable canonical identifier for the user or account.
|
|
2337
|
+
#
|
|
2338
|
+
# @param content_id [String] Your stable identifier for the content involved in this event, such as a message
|
|
2339
|
+
#
|
|
2340
|
+
# @param idempotency_key [String] Optional caller-provided key used to make retries of this individual event idemp
|
|
2341
|
+
#
|
|
2342
|
+
# @param metadata [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}] Non-PII product context for filtering, segmentation, and debugging. Values may b
|
|
2343
|
+
#
|
|
2344
|
+
# @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::ResourcesUsed>] Reusable resources observed during the event. Use this for emails, phone numbers
|
|
2345
|
+
#
|
|
2346
|
+
# @param type [Symbol, :content_uploaded]
|
|
2347
|
+
|
|
2348
|
+
# User-authored text content associated with an event.
|
|
2349
|
+
module Content
|
|
2350
|
+
extend SafetyKit::Internal::Type::Union
|
|
2351
|
+
|
|
2352
|
+
# User-authored text content associated with an event.
|
|
2353
|
+
variant -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventTextContent }
|
|
2354
|
+
|
|
2355
|
+
# User-uploaded image content associated with an event.
|
|
2356
|
+
variant -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventImageContent }
|
|
2357
|
+
|
|
2358
|
+
class EventTextContent < SafetyKit::Internal::Type::BaseModel
|
|
2359
|
+
# @!attribute text
|
|
2360
|
+
# User-authored text SafetyKit should compare or analyze.
|
|
2361
|
+
#
|
|
2362
|
+
# @return [String]
|
|
2363
|
+
required :text, String
|
|
2364
|
+
|
|
2365
|
+
# @!attribute type
|
|
2366
|
+
# Text content part.
|
|
2367
|
+
#
|
|
2368
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventTextContent::Type]
|
|
2369
|
+
required :type,
|
|
2370
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventTextContent::Type }
|
|
2371
|
+
|
|
2372
|
+
# @!attribute key
|
|
2373
|
+
# Stable field key for this content part.
|
|
2374
|
+
#
|
|
2375
|
+
# @return [String, nil]
|
|
2376
|
+
optional :key, String
|
|
2377
|
+
|
|
2378
|
+
# @!method initialize(text:, type:, key: nil)
|
|
2379
|
+
# User-authored text content associated with an event.
|
|
2380
|
+
#
|
|
2381
|
+
# @param text [String] User-authored text SafetyKit should compare or analyze.
|
|
2382
|
+
#
|
|
2383
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventTextContent::Type] Text content part.
|
|
2384
|
+
#
|
|
2385
|
+
# @param key [String] Stable field key for this content part.
|
|
2386
|
+
|
|
2387
|
+
# Text content part.
|
|
2388
|
+
#
|
|
2389
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventTextContent#type
|
|
2390
|
+
module Type
|
|
2391
|
+
extend SafetyKit::Internal::Type::Enum
|
|
2392
|
+
|
|
2393
|
+
TEXT = :text
|
|
2394
|
+
|
|
2395
|
+
# @!method self.values
|
|
1700
2396
|
# @return [Array<Symbol>]
|
|
1701
2397
|
end
|
|
1702
2398
|
end
|
|
@@ -1705,16 +2401,16 @@ module SafetyKit
|
|
|
1705
2401
|
# @!attribute source
|
|
1706
2402
|
# Image source information.
|
|
1707
2403
|
#
|
|
1708
|
-
# @return [SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2404
|
+
# @return [SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventImageContent::Source]
|
|
1709
2405
|
required :source,
|
|
1710
|
-
-> { SafetyKit::Beta::EventCreateParams::Body::
|
|
2406
|
+
-> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventImageContent::Source }
|
|
1711
2407
|
|
|
1712
2408
|
# @!attribute type
|
|
1713
2409
|
# Image content part.
|
|
1714
2410
|
#
|
|
1715
|
-
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2411
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventImageContent::Type]
|
|
1716
2412
|
required :type,
|
|
1717
|
-
enum: -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
2413
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventImageContent::Type }
|
|
1718
2414
|
|
|
1719
2415
|
# @!attribute key
|
|
1720
2416
|
# Stable field key for this content part.
|
|
@@ -1725,20 +2421,20 @@ module SafetyKit
|
|
|
1725
2421
|
# @!method initialize(source:, type:, key: nil)
|
|
1726
2422
|
# User-uploaded image content associated with an event.
|
|
1727
2423
|
#
|
|
1728
|
-
# @param source [SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2424
|
+
# @param source [SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventImageContent::Source] Image source information.
|
|
1729
2425
|
#
|
|
1730
|
-
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2426
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventImageContent::Type] Image content part.
|
|
1731
2427
|
#
|
|
1732
2428
|
# @param key [String] Stable field key for this content part.
|
|
1733
2429
|
|
|
1734
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2430
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventImageContent#source
|
|
1735
2431
|
class Source < SafetyKit::Internal::Type::BaseModel
|
|
1736
2432
|
# @!attribute type
|
|
1737
2433
|
# URL image source.
|
|
1738
2434
|
#
|
|
1739
|
-
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2435
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventImageContent::Source::Type]
|
|
1740
2436
|
required :type,
|
|
1741
|
-
enum: -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
2437
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventImageContent::Source::Type }
|
|
1742
2438
|
|
|
1743
2439
|
# @!attribute url
|
|
1744
2440
|
# URL of the image SafetyKit should compare or analyze.
|
|
@@ -1749,13 +2445,13 @@ module SafetyKit
|
|
|
1749
2445
|
# @!method initialize(type:, url:)
|
|
1750
2446
|
# Image source information.
|
|
1751
2447
|
#
|
|
1752
|
-
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2448
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventImageContent::Source::Type] URL image source.
|
|
1753
2449
|
#
|
|
1754
2450
|
# @param url [String] URL of the image SafetyKit should compare or analyze.
|
|
1755
2451
|
|
|
1756
2452
|
# URL image source.
|
|
1757
2453
|
#
|
|
1758
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2454
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventImageContent::Source#type
|
|
1759
2455
|
module Type
|
|
1760
2456
|
extend SafetyKit::Internal::Type::Enum
|
|
1761
2457
|
|
|
@@ -1768,7 +2464,7 @@ module SafetyKit
|
|
|
1768
2464
|
|
|
1769
2465
|
# Image content part.
|
|
1770
2466
|
#
|
|
1771
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2467
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventImageContent#type
|
|
1772
2468
|
module Type
|
|
1773
2469
|
extend SafetyKit::Internal::Type::Enum
|
|
1774
2470
|
|
|
@@ -1780,7 +2476,7 @@ module SafetyKit
|
|
|
1780
2476
|
end
|
|
1781
2477
|
|
|
1782
2478
|
# @!method self.variants
|
|
1783
|
-
# @return [Array(SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2479
|
+
# @return [Array(SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Content::EventImageContent)]
|
|
1784
2480
|
end
|
|
1785
2481
|
|
|
1786
2482
|
module Metadata
|
|
@@ -1792,7 +2488,7 @@ module SafetyKit
|
|
|
1792
2488
|
|
|
1793
2489
|
variant SafetyKit::Internal::Type::Boolean
|
|
1794
2490
|
|
|
1795
|
-
variant -> { SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2491
|
+
variant -> { SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Metadata::UnionMember3Array }
|
|
1796
2492
|
|
|
1797
2493
|
module UnionMember3
|
|
1798
2494
|
extend SafetyKit::Internal::Type::Union
|
|
@@ -1812,9 +2508,9 @@ module SafetyKit
|
|
|
1812
2508
|
|
|
1813
2509
|
# @type [SafetyKit::Internal::Type::Converter]
|
|
1814
2510
|
UnionMember3Array =
|
|
1815
|
-
SafetyKit::Internal::Type::ArrayOf[
|
|
1816
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
1817
|
-
|
|
2511
|
+
SafetyKit::Internal::Type::ArrayOf[
|
|
2512
|
+
union: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::Metadata::UnionMember3 }
|
|
2513
|
+
]
|
|
1818
2514
|
end
|
|
1819
2515
|
|
|
1820
2516
|
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
@@ -1834,7 +2530,7 @@ module SafetyKit
|
|
|
1834
2530
|
|
|
1835
2531
|
# @!method initialize(type:, value:)
|
|
1836
2532
|
# Some parameter documentations has been truncated, see
|
|
1837
|
-
# {SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2533
|
+
# {SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded::ResourcesUsed}
|
|
1838
2534
|
# for more details.
|
|
1839
2535
|
#
|
|
1840
2536
|
# Real-world or account resource used during the event, such as an email, phone
|
|
@@ -1846,16 +2542,7 @@ module SafetyKit
|
|
|
1846
2542
|
end
|
|
1847
2543
|
end
|
|
1848
2544
|
|
|
1849
|
-
class
|
|
1850
|
-
# @!attribute content
|
|
1851
|
-
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
1852
|
-
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
1853
|
-
# analyze.
|
|
1854
|
-
#
|
|
1855
|
-
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember5::ContentUploaded::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember5::ContentUploaded::Content::EventImageContent>]
|
|
1856
|
-
required :content,
|
|
1857
|
-
-> { SafetyKit::Internal::Type::ArrayOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember5::ContentUploaded::Content] }
|
|
1858
|
-
|
|
2545
|
+
class CreateAccount < SafetyKit::Internal::Type::BaseModel
|
|
1859
2546
|
# @!attribute event_name
|
|
1860
2547
|
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
1861
2548
|
# values in typed fields, content, resources_used, or metadata.
|
|
@@ -1871,8 +2558,8 @@ module SafetyKit
|
|
|
1871
2558
|
|
|
1872
2559
|
# @!attribute type
|
|
1873
2560
|
#
|
|
1874
|
-
# @return [Symbol, :
|
|
1875
|
-
required :type, const: :
|
|
2561
|
+
# @return [Symbol, :create_account]
|
|
2562
|
+
required :type, const: :create_account
|
|
1876
2563
|
|
|
1877
2564
|
# @!attribute user_id
|
|
1878
2565
|
# Your stable canonical identifier for the user or account.
|
|
@@ -1880,6 +2567,15 @@ module SafetyKit
|
|
|
1880
2567
|
# @return [String]
|
|
1881
2568
|
required :user_id, String
|
|
1882
2569
|
|
|
2570
|
+
# @!attribute content
|
|
2571
|
+
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
2572
|
+
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
2573
|
+
# analyze.
|
|
2574
|
+
#
|
|
2575
|
+
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventImageContent>, nil]
|
|
2576
|
+
optional :content,
|
|
2577
|
+
-> { SafetyKit::Internal::Type::ArrayOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content] }
|
|
2578
|
+
|
|
1883
2579
|
# @!attribute content_id
|
|
1884
2580
|
# Your stable identifier for the content involved in this event, such as a
|
|
1885
2581
|
# message, listing, page, post, profile, or uploaded media item.
|
|
@@ -1887,31 +2583,36 @@ module SafetyKit
|
|
|
1887
2583
|
# @return [String, nil]
|
|
1888
2584
|
optional :content_id, String
|
|
1889
2585
|
|
|
2586
|
+
# @!attribute idempotency_key
|
|
2587
|
+
# Optional caller-provided key used to make retries of this individual event
|
|
2588
|
+
# idempotent. Reuse the same key only for retries of the same logical event.
|
|
2589
|
+
#
|
|
2590
|
+
# @return [String, nil]
|
|
2591
|
+
optional :idempotency_key, String
|
|
2592
|
+
|
|
1890
2593
|
# @!attribute metadata
|
|
1891
2594
|
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
1892
2595
|
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
1893
2596
|
#
|
|
1894
2597
|
# @return [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}, nil]
|
|
1895
2598
|
optional :metadata,
|
|
1896
|
-
-> { SafetyKit::Internal::Type::HashOf[union: SafetyKit::Beta::EventCreateParams::Body::
|
|
2599
|
+
-> { SafetyKit::Internal::Type::HashOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Metadata] }
|
|
1897
2600
|
|
|
1898
2601
|
# @!attribute resources_used
|
|
1899
2602
|
# Reusable resources observed during the event. Use this for emails, phone
|
|
1900
2603
|
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
1901
2604
|
# identifiers.
|
|
1902
2605
|
#
|
|
1903
|
-
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2606
|
+
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::ResourcesUsed>, nil]
|
|
1904
2607
|
optional :resources_used,
|
|
1905
|
-
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::
|
|
2608
|
+
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::ResourcesUsed] }
|
|
1906
2609
|
|
|
1907
|
-
# @!method initialize(
|
|
2610
|
+
# @!method initialize(event_name:, timestamp:, user_id:, content: nil, content_id: nil, idempotency_key: nil, metadata: nil, resources_used: nil, type: :create_account)
|
|
1908
2611
|
# Some parameter documentations has been truncated, see
|
|
1909
|
-
# {SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2612
|
+
# {SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount}
|
|
1910
2613
|
# for more details.
|
|
1911
2614
|
#
|
|
1912
|
-
# A user
|
|
1913
|
-
#
|
|
1914
|
-
# @param content [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember5::ContentUploaded::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember5::ContentUploaded::Content::EventImageContent>] User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
2615
|
+
# A user or account is created.
|
|
1915
2616
|
#
|
|
1916
2617
|
# @param event_name [String] Stable, low-cardinality product action name. Use snake_case and put dynamic valu
|
|
1917
2618
|
#
|
|
@@ -1919,23 +2620,27 @@ module SafetyKit
|
|
|
1919
2620
|
#
|
|
1920
2621
|
# @param user_id [String] Your stable canonical identifier for the user or account.
|
|
1921
2622
|
#
|
|
2623
|
+
# @param content [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventImageContent>] User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
2624
|
+
#
|
|
1922
2625
|
# @param content_id [String] Your stable identifier for the content involved in this event, such as a message
|
|
1923
2626
|
#
|
|
2627
|
+
# @param idempotency_key [String] Optional caller-provided key used to make retries of this individual event idemp
|
|
2628
|
+
#
|
|
1924
2629
|
# @param metadata [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}] Non-PII product context for filtering, segmentation, and debugging. Values may b
|
|
1925
2630
|
#
|
|
1926
|
-
# @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2631
|
+
# @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::ResourcesUsed>] Reusable resources observed during the event. Use this for emails, phone numbers
|
|
1927
2632
|
#
|
|
1928
|
-
# @param type [Symbol, :
|
|
2633
|
+
# @param type [Symbol, :create_account]
|
|
1929
2634
|
|
|
1930
2635
|
# User-authored text content associated with an event.
|
|
1931
2636
|
module Content
|
|
1932
2637
|
extend SafetyKit::Internal::Type::Union
|
|
1933
2638
|
|
|
1934
2639
|
# User-authored text content associated with an event.
|
|
1935
|
-
variant -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
2640
|
+
variant -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventTextContent }
|
|
1936
2641
|
|
|
1937
2642
|
# User-uploaded image content associated with an event.
|
|
1938
|
-
variant -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
2643
|
+
variant -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventImageContent }
|
|
1939
2644
|
|
|
1940
2645
|
class EventTextContent < SafetyKit::Internal::Type::BaseModel
|
|
1941
2646
|
# @!attribute text
|
|
@@ -1947,9 +2652,9 @@ module SafetyKit
|
|
|
1947
2652
|
# @!attribute type
|
|
1948
2653
|
# Text content part.
|
|
1949
2654
|
#
|
|
1950
|
-
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2655
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventTextContent::Type]
|
|
1951
2656
|
required :type,
|
|
1952
|
-
enum: -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
2657
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventTextContent::Type }
|
|
1953
2658
|
|
|
1954
2659
|
# @!attribute key
|
|
1955
2660
|
# Stable field key for this content part.
|
|
@@ -1962,13 +2667,13 @@ module SafetyKit
|
|
|
1962
2667
|
#
|
|
1963
2668
|
# @param text [String] User-authored text SafetyKit should compare or analyze.
|
|
1964
2669
|
#
|
|
1965
|
-
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2670
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventTextContent::Type] Text content part.
|
|
1966
2671
|
#
|
|
1967
2672
|
# @param key [String] Stable field key for this content part.
|
|
1968
2673
|
|
|
1969
2674
|
# Text content part.
|
|
1970
2675
|
#
|
|
1971
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2676
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventTextContent#type
|
|
1972
2677
|
module Type
|
|
1973
2678
|
extend SafetyKit::Internal::Type::Enum
|
|
1974
2679
|
|
|
@@ -1983,16 +2688,16 @@ module SafetyKit
|
|
|
1983
2688
|
# @!attribute source
|
|
1984
2689
|
# Image source information.
|
|
1985
2690
|
#
|
|
1986
|
-
# @return [SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2691
|
+
# @return [SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventImageContent::Source]
|
|
1987
2692
|
required :source,
|
|
1988
|
-
-> { SafetyKit::Beta::EventCreateParams::Body::
|
|
2693
|
+
-> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventImageContent::Source }
|
|
1989
2694
|
|
|
1990
2695
|
# @!attribute type
|
|
1991
2696
|
# Image content part.
|
|
1992
2697
|
#
|
|
1993
|
-
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2698
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventImageContent::Type]
|
|
1994
2699
|
required :type,
|
|
1995
|
-
enum: -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
2700
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventImageContent::Type }
|
|
1996
2701
|
|
|
1997
2702
|
# @!attribute key
|
|
1998
2703
|
# Stable field key for this content part.
|
|
@@ -2003,20 +2708,20 @@ module SafetyKit
|
|
|
2003
2708
|
# @!method initialize(source:, type:, key: nil)
|
|
2004
2709
|
# User-uploaded image content associated with an event.
|
|
2005
2710
|
#
|
|
2006
|
-
# @param source [SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2711
|
+
# @param source [SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventImageContent::Source] Image source information.
|
|
2007
2712
|
#
|
|
2008
|
-
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2713
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventImageContent::Type] Image content part.
|
|
2009
2714
|
#
|
|
2010
2715
|
# @param key [String] Stable field key for this content part.
|
|
2011
2716
|
|
|
2012
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2717
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventImageContent#source
|
|
2013
2718
|
class Source < SafetyKit::Internal::Type::BaseModel
|
|
2014
2719
|
# @!attribute type
|
|
2015
2720
|
# URL image source.
|
|
2016
2721
|
#
|
|
2017
|
-
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2722
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventImageContent::Source::Type]
|
|
2018
2723
|
required :type,
|
|
2019
|
-
enum: -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
2724
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventImageContent::Source::Type }
|
|
2020
2725
|
|
|
2021
2726
|
# @!attribute url
|
|
2022
2727
|
# URL of the image SafetyKit should compare or analyze.
|
|
@@ -2027,13 +2732,13 @@ module SafetyKit
|
|
|
2027
2732
|
# @!method initialize(type:, url:)
|
|
2028
2733
|
# Image source information.
|
|
2029
2734
|
#
|
|
2030
|
-
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2735
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventImageContent::Source::Type] URL image source.
|
|
2031
2736
|
#
|
|
2032
2737
|
# @param url [String] URL of the image SafetyKit should compare or analyze.
|
|
2033
2738
|
|
|
2034
2739
|
# URL image source.
|
|
2035
2740
|
#
|
|
2036
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2741
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventImageContent::Source#type
|
|
2037
2742
|
module Type
|
|
2038
2743
|
extend SafetyKit::Internal::Type::Enum
|
|
2039
2744
|
|
|
@@ -2046,7 +2751,7 @@ module SafetyKit
|
|
|
2046
2751
|
|
|
2047
2752
|
# Image content part.
|
|
2048
2753
|
#
|
|
2049
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2754
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventImageContent#type
|
|
2050
2755
|
module Type
|
|
2051
2756
|
extend SafetyKit::Internal::Type::Enum
|
|
2052
2757
|
|
|
@@ -2058,7 +2763,7 @@ module SafetyKit
|
|
|
2058
2763
|
end
|
|
2059
2764
|
|
|
2060
2765
|
# @!method self.variants
|
|
2061
|
-
# @return [Array(SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2766
|
+
# @return [Array(SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Content::EventImageContent)]
|
|
2062
2767
|
end
|
|
2063
2768
|
|
|
2064
2769
|
module Metadata
|
|
@@ -2070,7 +2775,7 @@ module SafetyKit
|
|
|
2070
2775
|
|
|
2071
2776
|
variant SafetyKit::Internal::Type::Boolean
|
|
2072
2777
|
|
|
2073
|
-
variant -> { SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2778
|
+
variant -> { SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Metadata::UnionMember3Array }
|
|
2074
2779
|
|
|
2075
2780
|
module UnionMember3
|
|
2076
2781
|
extend SafetyKit::Internal::Type::Union
|
|
@@ -2091,7 +2796,7 @@ module SafetyKit
|
|
|
2091
2796
|
# @type [SafetyKit::Internal::Type::Converter]
|
|
2092
2797
|
UnionMember3Array =
|
|
2093
2798
|
SafetyKit::Internal::Type::ArrayOf[
|
|
2094
|
-
union: -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
2799
|
+
union: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::Metadata::UnionMember3 }
|
|
2095
2800
|
]
|
|
2096
2801
|
end
|
|
2097
2802
|
|
|
@@ -2112,7 +2817,7 @@ module SafetyKit
|
|
|
2112
2817
|
|
|
2113
2818
|
# @!method initialize(type:, value:)
|
|
2114
2819
|
# Some parameter documentations has been truncated, see
|
|
2115
|
-
# {SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2820
|
+
# {SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount::ResourcesUsed}
|
|
2116
2821
|
# for more details.
|
|
2117
2822
|
#
|
|
2118
2823
|
# Real-world or account resource used during the event, such as an email, phone
|
|
@@ -2124,7 +2829,7 @@ module SafetyKit
|
|
|
2124
2829
|
end
|
|
2125
2830
|
end
|
|
2126
2831
|
|
|
2127
|
-
class
|
|
2832
|
+
class UpdateAccount < SafetyKit::Internal::Type::BaseModel
|
|
2128
2833
|
# @!attribute event_name
|
|
2129
2834
|
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
2130
2835
|
# values in typed fields, content, resources_used, or metadata.
|
|
@@ -2140,8 +2845,8 @@ module SafetyKit
|
|
|
2140
2845
|
|
|
2141
2846
|
# @!attribute type
|
|
2142
2847
|
#
|
|
2143
|
-
# @return [Symbol, :
|
|
2144
|
-
required :type, const: :
|
|
2848
|
+
# @return [Symbol, :update_account]
|
|
2849
|
+
required :type, const: :update_account
|
|
2145
2850
|
|
|
2146
2851
|
# @!attribute user_id
|
|
2147
2852
|
# Your stable canonical identifier for the user or account.
|
|
@@ -2154,9 +2859,9 @@ module SafetyKit
|
|
|
2154
2859
|
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
2155
2860
|
# analyze.
|
|
2156
2861
|
#
|
|
2157
|
-
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2862
|
+
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventImageContent>, nil]
|
|
2158
2863
|
optional :content,
|
|
2159
|
-
-> { SafetyKit::Internal::Type::ArrayOf[union: SafetyKit::Beta::EventCreateParams::Body::
|
|
2864
|
+
-> { SafetyKit::Internal::Type::ArrayOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content] }
|
|
2160
2865
|
|
|
2161
2866
|
# @!attribute content_id
|
|
2162
2867
|
# Your stable identifier for the content involved in this event, such as a
|
|
@@ -2165,29 +2870,37 @@ module SafetyKit
|
|
|
2165
2870
|
# @return [String, nil]
|
|
2166
2871
|
optional :content_id, String
|
|
2167
2872
|
|
|
2873
|
+
# @!attribute idempotency_key
|
|
2874
|
+
# Optional caller-provided key used to make retries of this individual event
|
|
2875
|
+
# idempotent. Reuse the same key only for retries of the same logical event.
|
|
2876
|
+
#
|
|
2877
|
+
# @return [String, nil]
|
|
2878
|
+
optional :idempotency_key, String
|
|
2879
|
+
|
|
2168
2880
|
# @!attribute metadata
|
|
2169
2881
|
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
2170
2882
|
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
2171
2883
|
#
|
|
2172
2884
|
# @return [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}, nil]
|
|
2173
2885
|
optional :metadata,
|
|
2174
|
-
-> { SafetyKit::Internal::Type::HashOf[union: SafetyKit::Beta::EventCreateParams::Body::
|
|
2886
|
+
-> { SafetyKit::Internal::Type::HashOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Metadata] }
|
|
2175
2887
|
|
|
2176
2888
|
# @!attribute resources_used
|
|
2177
2889
|
# Reusable resources observed during the event. Use this for emails, phone
|
|
2178
2890
|
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
2179
2891
|
# identifiers.
|
|
2180
2892
|
#
|
|
2181
|
-
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2893
|
+
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::ResourcesUsed>, nil]
|
|
2182
2894
|
optional :resources_used,
|
|
2183
|
-
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::
|
|
2895
|
+
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::ResourcesUsed] }
|
|
2184
2896
|
|
|
2185
|
-
# @!method initialize(event_name:, timestamp:, user_id:, content: nil, content_id: nil, metadata: nil, resources_used: nil, type: :
|
|
2897
|
+
# @!method initialize(event_name:, timestamp:, user_id:, content: nil, content_id: nil, idempotency_key: nil, metadata: nil, resources_used: nil, type: :update_account)
|
|
2186
2898
|
# Some parameter documentations has been truncated, see
|
|
2187
|
-
# {SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2899
|
+
# {SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount}
|
|
2188
2900
|
# for more details.
|
|
2189
2901
|
#
|
|
2190
|
-
# A user or account
|
|
2902
|
+
# A user or account profile, contact detail, payment detail, or public bio
|
|
2903
|
+
# changes.
|
|
2191
2904
|
#
|
|
2192
2905
|
# @param event_name [String] Stable, low-cardinality product action name. Use snake_case and put dynamic valu
|
|
2193
2906
|
#
|
|
@@ -2195,25 +2908,27 @@ module SafetyKit
|
|
|
2195
2908
|
#
|
|
2196
2909
|
# @param user_id [String] Your stable canonical identifier for the user or account.
|
|
2197
2910
|
#
|
|
2198
|
-
# @param content [Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2911
|
+
# @param content [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventImageContent>] User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
2199
2912
|
#
|
|
2200
2913
|
# @param content_id [String] Your stable identifier for the content involved in this event, such as a message
|
|
2201
2914
|
#
|
|
2915
|
+
# @param idempotency_key [String] Optional caller-provided key used to make retries of this individual event idemp
|
|
2916
|
+
#
|
|
2202
2917
|
# @param metadata [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}] Non-PII product context for filtering, segmentation, and debugging. Values may b
|
|
2203
2918
|
#
|
|
2204
|
-
# @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2919
|
+
# @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::ResourcesUsed>] Reusable resources observed during the event. Use this for emails, phone numbers
|
|
2205
2920
|
#
|
|
2206
|
-
# @param type [Symbol, :
|
|
2921
|
+
# @param type [Symbol, :update_account]
|
|
2207
2922
|
|
|
2208
2923
|
# User-authored text content associated with an event.
|
|
2209
2924
|
module Content
|
|
2210
2925
|
extend SafetyKit::Internal::Type::Union
|
|
2211
2926
|
|
|
2212
2927
|
# User-authored text content associated with an event.
|
|
2213
|
-
variant -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
2928
|
+
variant -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventTextContent }
|
|
2214
2929
|
|
|
2215
2930
|
# User-uploaded image content associated with an event.
|
|
2216
|
-
variant -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
2931
|
+
variant -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventImageContent }
|
|
2217
2932
|
|
|
2218
2933
|
class EventTextContent < SafetyKit::Internal::Type::BaseModel
|
|
2219
2934
|
# @!attribute text
|
|
@@ -2225,9 +2940,9 @@ module SafetyKit
|
|
|
2225
2940
|
# @!attribute type
|
|
2226
2941
|
# Text content part.
|
|
2227
2942
|
#
|
|
2228
|
-
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2943
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventTextContent::Type]
|
|
2229
2944
|
required :type,
|
|
2230
|
-
enum: -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
2945
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventTextContent::Type }
|
|
2231
2946
|
|
|
2232
2947
|
# @!attribute key
|
|
2233
2948
|
# Stable field key for this content part.
|
|
@@ -2240,13 +2955,13 @@ module SafetyKit
|
|
|
2240
2955
|
#
|
|
2241
2956
|
# @param text [String] User-authored text SafetyKit should compare or analyze.
|
|
2242
2957
|
#
|
|
2243
|
-
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2958
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventTextContent::Type] Text content part.
|
|
2244
2959
|
#
|
|
2245
2960
|
# @param key [String] Stable field key for this content part.
|
|
2246
2961
|
|
|
2247
2962
|
# Text content part.
|
|
2248
2963
|
#
|
|
2249
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2964
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventTextContent#type
|
|
2250
2965
|
module Type
|
|
2251
2966
|
extend SafetyKit::Internal::Type::Enum
|
|
2252
2967
|
|
|
@@ -2261,16 +2976,16 @@ module SafetyKit
|
|
|
2261
2976
|
# @!attribute source
|
|
2262
2977
|
# Image source information.
|
|
2263
2978
|
#
|
|
2264
|
-
# @return [SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2979
|
+
# @return [SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventImageContent::Source]
|
|
2265
2980
|
required :source,
|
|
2266
|
-
-> { SafetyKit::Beta::EventCreateParams::Body::
|
|
2981
|
+
-> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventImageContent::Source }
|
|
2267
2982
|
|
|
2268
2983
|
# @!attribute type
|
|
2269
2984
|
# Image content part.
|
|
2270
2985
|
#
|
|
2271
|
-
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2986
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventImageContent::Type]
|
|
2272
2987
|
required :type,
|
|
2273
|
-
enum: -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
2988
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventImageContent::Type }
|
|
2274
2989
|
|
|
2275
2990
|
# @!attribute key
|
|
2276
2991
|
# Stable field key for this content part.
|
|
@@ -2281,20 +2996,20 @@ module SafetyKit
|
|
|
2281
2996
|
# @!method initialize(source:, type:, key: nil)
|
|
2282
2997
|
# User-uploaded image content associated with an event.
|
|
2283
2998
|
#
|
|
2284
|
-
# @param source [SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2999
|
+
# @param source [SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventImageContent::Source] Image source information.
|
|
2285
3000
|
#
|
|
2286
|
-
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3001
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventImageContent::Type] Image content part.
|
|
2287
3002
|
#
|
|
2288
3003
|
# @param key [String] Stable field key for this content part.
|
|
2289
3004
|
|
|
2290
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3005
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventImageContent#source
|
|
2291
3006
|
class Source < SafetyKit::Internal::Type::BaseModel
|
|
2292
3007
|
# @!attribute type
|
|
2293
3008
|
# URL image source.
|
|
2294
3009
|
#
|
|
2295
|
-
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3010
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventImageContent::Source::Type]
|
|
2296
3011
|
required :type,
|
|
2297
|
-
enum: -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
3012
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventImageContent::Source::Type }
|
|
2298
3013
|
|
|
2299
3014
|
# @!attribute url
|
|
2300
3015
|
# URL of the image SafetyKit should compare or analyze.
|
|
@@ -2305,13 +3020,13 @@ module SafetyKit
|
|
|
2305
3020
|
# @!method initialize(type:, url:)
|
|
2306
3021
|
# Image source information.
|
|
2307
3022
|
#
|
|
2308
|
-
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3023
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventImageContent::Source::Type] URL image source.
|
|
2309
3024
|
#
|
|
2310
3025
|
# @param url [String] URL of the image SafetyKit should compare or analyze.
|
|
2311
3026
|
|
|
2312
3027
|
# URL image source.
|
|
2313
3028
|
#
|
|
2314
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3029
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventImageContent::Source#type
|
|
2315
3030
|
module Type
|
|
2316
3031
|
extend SafetyKit::Internal::Type::Enum
|
|
2317
3032
|
|
|
@@ -2324,7 +3039,7 @@ module SafetyKit
|
|
|
2324
3039
|
|
|
2325
3040
|
# Image content part.
|
|
2326
3041
|
#
|
|
2327
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3042
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventImageContent#type
|
|
2328
3043
|
module Type
|
|
2329
3044
|
extend SafetyKit::Internal::Type::Enum
|
|
2330
3045
|
|
|
@@ -2336,7 +3051,7 @@ module SafetyKit
|
|
|
2336
3051
|
end
|
|
2337
3052
|
|
|
2338
3053
|
# @!method self.variants
|
|
2339
|
-
# @return [Array(SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3054
|
+
# @return [Array(SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Content::EventImageContent)]
|
|
2340
3055
|
end
|
|
2341
3056
|
|
|
2342
3057
|
module Metadata
|
|
@@ -2348,7 +3063,7 @@ module SafetyKit
|
|
|
2348
3063
|
|
|
2349
3064
|
variant SafetyKit::Internal::Type::Boolean
|
|
2350
3065
|
|
|
2351
|
-
variant -> { SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3066
|
+
variant -> { SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Metadata::UnionMember3Array }
|
|
2352
3067
|
|
|
2353
3068
|
module UnionMember3
|
|
2354
3069
|
extend SafetyKit::Internal::Type::Union
|
|
@@ -2369,7 +3084,7 @@ module SafetyKit
|
|
|
2369
3084
|
# @type [SafetyKit::Internal::Type::Converter]
|
|
2370
3085
|
UnionMember3Array =
|
|
2371
3086
|
SafetyKit::Internal::Type::ArrayOf[
|
|
2372
|
-
union: -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
3087
|
+
union: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::Metadata::UnionMember3 }
|
|
2373
3088
|
]
|
|
2374
3089
|
end
|
|
2375
3090
|
|
|
@@ -2390,7 +3105,7 @@ module SafetyKit
|
|
|
2390
3105
|
|
|
2391
3106
|
# @!method initialize(type:, value:)
|
|
2392
3107
|
# Some parameter documentations has been truncated, see
|
|
2393
|
-
# {SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3108
|
+
# {SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount::ResourcesUsed}
|
|
2394
3109
|
# for more details.
|
|
2395
3110
|
#
|
|
2396
3111
|
# Real-world or account resource used during the event, such as an email, phone
|
|
@@ -2402,7 +3117,7 @@ module SafetyKit
|
|
|
2402
3117
|
end
|
|
2403
3118
|
end
|
|
2404
3119
|
|
|
2405
|
-
class
|
|
3120
|
+
class UserReport < SafetyKit::Internal::Type::BaseModel
|
|
2406
3121
|
# @!attribute event_name
|
|
2407
3122
|
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
2408
3123
|
# values in typed fields, content, resources_used, or metadata.
|
|
@@ -2410,6 +3125,13 @@ module SafetyKit
|
|
|
2410
3125
|
# @return [String]
|
|
2411
3126
|
required :event_name, String
|
|
2412
3127
|
|
|
3128
|
+
# @!attribute labels
|
|
3129
|
+
# One or more label categories supplied with the report.
|
|
3130
|
+
#
|
|
3131
|
+
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Label>]
|
|
3132
|
+
required :labels,
|
|
3133
|
+
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserReport::Label] }
|
|
3134
|
+
|
|
2413
3135
|
# @!attribute timestamp
|
|
2414
3136
|
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
2415
3137
|
#
|
|
@@ -2418,8 +3140,8 @@ module SafetyKit
|
|
|
2418
3140
|
|
|
2419
3141
|
# @!attribute type
|
|
2420
3142
|
#
|
|
2421
|
-
# @return [Symbol, :
|
|
2422
|
-
required :type, const: :
|
|
3143
|
+
# @return [Symbol, :user_report]
|
|
3144
|
+
required :type, const: :user_report
|
|
2423
3145
|
|
|
2424
3146
|
# @!attribute user_id
|
|
2425
3147
|
# Your stable canonical identifier for the user or account.
|
|
@@ -2432,9 +3154,9 @@ module SafetyKit
|
|
|
2432
3154
|
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
2433
3155
|
# analyze.
|
|
2434
3156
|
#
|
|
2435
|
-
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3157
|
+
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventImageContent>, nil]
|
|
2436
3158
|
optional :content,
|
|
2437
|
-
-> { SafetyKit::Internal::Type::ArrayOf[union: SafetyKit::Beta::EventCreateParams::Body::
|
|
3159
|
+
-> { SafetyKit::Internal::Type::ArrayOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content] }
|
|
2438
3160
|
|
|
2439
3161
|
# @!attribute content_id
|
|
2440
3162
|
# Your stable identifier for the content involved in this event, such as a
|
|
@@ -2443,56 +3165,98 @@ module SafetyKit
|
|
|
2443
3165
|
# @return [String, nil]
|
|
2444
3166
|
optional :content_id, String
|
|
2445
3167
|
|
|
3168
|
+
# @!attribute idempotency_key
|
|
3169
|
+
# Optional caller-provided key used to make retries of this individual event
|
|
3170
|
+
# idempotent. Reuse the same key only for retries of the same logical event.
|
|
3171
|
+
#
|
|
3172
|
+
# @return [String, nil]
|
|
3173
|
+
optional :idempotency_key, String
|
|
3174
|
+
|
|
2446
3175
|
# @!attribute metadata
|
|
2447
3176
|
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
2448
3177
|
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
2449
3178
|
#
|
|
2450
3179
|
# @return [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}, nil]
|
|
2451
3180
|
optional :metadata,
|
|
2452
|
-
-> { SafetyKit::Internal::Type::HashOf[union: SafetyKit::Beta::EventCreateParams::Body::
|
|
3181
|
+
-> { SafetyKit::Internal::Type::HashOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserReport::Metadata] }
|
|
2453
3182
|
|
|
2454
3183
|
# @!attribute resources_used
|
|
2455
3184
|
# Reusable resources observed during the event. Use this for emails, phone
|
|
2456
3185
|
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
2457
3186
|
# identifiers.
|
|
2458
3187
|
#
|
|
2459
|
-
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3188
|
+
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::ResourcesUsed>, nil]
|
|
2460
3189
|
optional :resources_used,
|
|
2461
|
-
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::
|
|
3190
|
+
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserReport::ResourcesUsed] }
|
|
3191
|
+
|
|
3192
|
+
# @!attribute target_content_id
|
|
3193
|
+
# Your stable identifier for the content being reported.
|
|
3194
|
+
#
|
|
3195
|
+
# @return [String, nil]
|
|
3196
|
+
optional :target_content_id, String
|
|
3197
|
+
|
|
3198
|
+
# @!attribute target_user_id
|
|
3199
|
+
# Your stable canonical identifier for the user being reported.
|
|
3200
|
+
#
|
|
3201
|
+
# @return [String, nil]
|
|
3202
|
+
optional :target_user_id, String
|
|
2462
3203
|
|
|
2463
|
-
# @!method initialize(event_name:, timestamp:, user_id:, content: nil, content_id: nil, metadata: nil, resources_used: nil, type: :
|
|
3204
|
+
# @!method initialize(event_name:, labels:, timestamp:, user_id:, content: nil, content_id: nil, idempotency_key: nil, metadata: nil, resources_used: nil, target_content_id: nil, target_user_id: nil, type: :user_report)
|
|
2464
3205
|
# Some parameter documentations has been truncated, see
|
|
2465
|
-
# {SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2466
|
-
#
|
|
3206
|
+
# {SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport} for
|
|
3207
|
+
# more details.
|
|
2467
3208
|
#
|
|
2468
|
-
# A user
|
|
2469
|
-
#
|
|
3209
|
+
# A user-submitted report. Use user_id for the reporter. Include target_user_id
|
|
3210
|
+
# when a user is reported, target_content_id when content is reported, and both
|
|
3211
|
+
# when the report is about content associated with a user. Use content and
|
|
3212
|
+
# content_id for the report itself.
|
|
2470
3213
|
#
|
|
2471
3214
|
# @param event_name [String] Stable, low-cardinality product action name. Use snake_case and put dynamic valu
|
|
2472
3215
|
#
|
|
3216
|
+
# @param labels [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Label>] One or more label categories supplied with the report.
|
|
3217
|
+
#
|
|
2473
3218
|
# @param timestamp [Time] The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
2474
3219
|
#
|
|
2475
3220
|
# @param user_id [String] Your stable canonical identifier for the user or account.
|
|
2476
3221
|
#
|
|
2477
|
-
# @param content [Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3222
|
+
# @param content [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventImageContent>] User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
2478
3223
|
#
|
|
2479
3224
|
# @param content_id [String] Your stable identifier for the content involved in this event, such as a message
|
|
2480
3225
|
#
|
|
3226
|
+
# @param idempotency_key [String] Optional caller-provided key used to make retries of this individual event idemp
|
|
3227
|
+
#
|
|
2481
3228
|
# @param metadata [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}] Non-PII product context for filtering, segmentation, and debugging. Values may b
|
|
2482
3229
|
#
|
|
2483
|
-
# @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3230
|
+
# @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::ResourcesUsed>] Reusable resources observed during the event. Use this for emails, phone numbers
|
|
2484
3231
|
#
|
|
2485
|
-
# @param
|
|
3232
|
+
# @param target_content_id [String] Your stable identifier for the content being reported.
|
|
3233
|
+
#
|
|
3234
|
+
# @param target_user_id [String] Your stable canonical identifier for the user being reported.
|
|
3235
|
+
#
|
|
3236
|
+
# @param type [Symbol, :user_report]
|
|
3237
|
+
|
|
3238
|
+
class Label < SafetyKit::Internal::Type::BaseModel
|
|
3239
|
+
# @!attribute label
|
|
3240
|
+
# Stable snake_case report label category.
|
|
3241
|
+
#
|
|
3242
|
+
# @return [String]
|
|
3243
|
+
required :label, String
|
|
3244
|
+
|
|
3245
|
+
# @!method initialize(label:)
|
|
3246
|
+
# Label category supplied with a user report.
|
|
3247
|
+
#
|
|
3248
|
+
# @param label [String] Stable snake_case report label category.
|
|
3249
|
+
end
|
|
2486
3250
|
|
|
2487
3251
|
# User-authored text content associated with an event.
|
|
2488
3252
|
module Content
|
|
2489
3253
|
extend SafetyKit::Internal::Type::Union
|
|
2490
3254
|
|
|
2491
3255
|
# User-authored text content associated with an event.
|
|
2492
|
-
variant -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
3256
|
+
variant -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventTextContent }
|
|
2493
3257
|
|
|
2494
3258
|
# User-uploaded image content associated with an event.
|
|
2495
|
-
variant -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
3259
|
+
variant -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventImageContent }
|
|
2496
3260
|
|
|
2497
3261
|
class EventTextContent < SafetyKit::Internal::Type::BaseModel
|
|
2498
3262
|
# @!attribute text
|
|
@@ -2504,9 +3268,9 @@ module SafetyKit
|
|
|
2504
3268
|
# @!attribute type
|
|
2505
3269
|
# Text content part.
|
|
2506
3270
|
#
|
|
2507
|
-
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3271
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventTextContent::Type]
|
|
2508
3272
|
required :type,
|
|
2509
|
-
enum: -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
3273
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventTextContent::Type }
|
|
2510
3274
|
|
|
2511
3275
|
# @!attribute key
|
|
2512
3276
|
# Stable field key for this content part.
|
|
@@ -2519,13 +3283,13 @@ module SafetyKit
|
|
|
2519
3283
|
#
|
|
2520
3284
|
# @param text [String] User-authored text SafetyKit should compare or analyze.
|
|
2521
3285
|
#
|
|
2522
|
-
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3286
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventTextContent::Type] Text content part.
|
|
2523
3287
|
#
|
|
2524
3288
|
# @param key [String] Stable field key for this content part.
|
|
2525
3289
|
|
|
2526
3290
|
# Text content part.
|
|
2527
3291
|
#
|
|
2528
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3292
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventTextContent#type
|
|
2529
3293
|
module Type
|
|
2530
3294
|
extend SafetyKit::Internal::Type::Enum
|
|
2531
3295
|
|
|
@@ -2540,16 +3304,16 @@ module SafetyKit
|
|
|
2540
3304
|
# @!attribute source
|
|
2541
3305
|
# Image source information.
|
|
2542
3306
|
#
|
|
2543
|
-
# @return [SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3307
|
+
# @return [SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventImageContent::Source]
|
|
2544
3308
|
required :source,
|
|
2545
|
-
-> { SafetyKit::Beta::EventCreateParams::Body::
|
|
3309
|
+
-> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventImageContent::Source }
|
|
2546
3310
|
|
|
2547
3311
|
# @!attribute type
|
|
2548
3312
|
# Image content part.
|
|
2549
3313
|
#
|
|
2550
|
-
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3314
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventImageContent::Type]
|
|
2551
3315
|
required :type,
|
|
2552
|
-
enum: -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
3316
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventImageContent::Type }
|
|
2553
3317
|
|
|
2554
3318
|
# @!attribute key
|
|
2555
3319
|
# Stable field key for this content part.
|
|
@@ -2560,20 +3324,20 @@ module SafetyKit
|
|
|
2560
3324
|
# @!method initialize(source:, type:, key: nil)
|
|
2561
3325
|
# User-uploaded image content associated with an event.
|
|
2562
3326
|
#
|
|
2563
|
-
# @param source [SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3327
|
+
# @param source [SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventImageContent::Source] Image source information.
|
|
2564
3328
|
#
|
|
2565
|
-
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3329
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventImageContent::Type] Image content part.
|
|
2566
3330
|
#
|
|
2567
3331
|
# @param key [String] Stable field key for this content part.
|
|
2568
3332
|
|
|
2569
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3333
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventImageContent#source
|
|
2570
3334
|
class Source < SafetyKit::Internal::Type::BaseModel
|
|
2571
3335
|
# @!attribute type
|
|
2572
3336
|
# URL image source.
|
|
2573
3337
|
#
|
|
2574
|
-
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3338
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventImageContent::Source::Type]
|
|
2575
3339
|
required :type,
|
|
2576
|
-
enum: -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
3340
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventImageContent::Source::Type }
|
|
2577
3341
|
|
|
2578
3342
|
# @!attribute url
|
|
2579
3343
|
# URL of the image SafetyKit should compare or analyze.
|
|
@@ -2584,13 +3348,13 @@ module SafetyKit
|
|
|
2584
3348
|
# @!method initialize(type:, url:)
|
|
2585
3349
|
# Image source information.
|
|
2586
3350
|
#
|
|
2587
|
-
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3351
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventImageContent::Source::Type] URL image source.
|
|
2588
3352
|
#
|
|
2589
3353
|
# @param url [String] URL of the image SafetyKit should compare or analyze.
|
|
2590
3354
|
|
|
2591
3355
|
# URL image source.
|
|
2592
3356
|
#
|
|
2593
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3357
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventImageContent::Source#type
|
|
2594
3358
|
module Type
|
|
2595
3359
|
extend SafetyKit::Internal::Type::Enum
|
|
2596
3360
|
|
|
@@ -2603,7 +3367,7 @@ module SafetyKit
|
|
|
2603
3367
|
|
|
2604
3368
|
# Image content part.
|
|
2605
3369
|
#
|
|
2606
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3370
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventImageContent#type
|
|
2607
3371
|
module Type
|
|
2608
3372
|
extend SafetyKit::Internal::Type::Enum
|
|
2609
3373
|
|
|
@@ -2615,7 +3379,7 @@ module SafetyKit
|
|
|
2615
3379
|
end
|
|
2616
3380
|
|
|
2617
3381
|
# @!method self.variants
|
|
2618
|
-
# @return [Array(SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3382
|
+
# @return [Array(SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Content::EventImageContent)]
|
|
2619
3383
|
end
|
|
2620
3384
|
|
|
2621
3385
|
module Metadata
|
|
@@ -2627,7 +3391,7 @@ module SafetyKit
|
|
|
2627
3391
|
|
|
2628
3392
|
variant SafetyKit::Internal::Type::Boolean
|
|
2629
3393
|
|
|
2630
|
-
variant -> { SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3394
|
+
variant -> { SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::Metadata::UnionMember3Array }
|
|
2631
3395
|
|
|
2632
3396
|
module UnionMember3
|
|
2633
3397
|
extend SafetyKit::Internal::Type::Union
|
|
@@ -2647,9 +3411,9 @@ module SafetyKit
|
|
|
2647
3411
|
|
|
2648
3412
|
# @type [SafetyKit::Internal::Type::Converter]
|
|
2649
3413
|
UnionMember3Array =
|
|
2650
|
-
SafetyKit::Internal::Type::ArrayOf[
|
|
2651
|
-
|
|
2652
|
-
]
|
|
3414
|
+
SafetyKit::Internal::Type::ArrayOf[union: -> {
|
|
3415
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember6::UserReport::Metadata::UnionMember3
|
|
3416
|
+
}]
|
|
2653
3417
|
end
|
|
2654
3418
|
|
|
2655
3419
|
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
@@ -2669,7 +3433,7 @@ module SafetyKit
|
|
|
2669
3433
|
|
|
2670
3434
|
# @!method initialize(type:, value:)
|
|
2671
3435
|
# Some parameter documentations has been truncated, see
|
|
2672
|
-
# {SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3436
|
+
# {SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport::ResourcesUsed}
|
|
2673
3437
|
# for more details.
|
|
2674
3438
|
#
|
|
2675
3439
|
# Real-world or account resource used during the event, such as an email, phone
|
|
@@ -2681,7 +3445,7 @@ module SafetyKit
|
|
|
2681
3445
|
end
|
|
2682
3446
|
end
|
|
2683
3447
|
|
|
2684
|
-
class
|
|
3448
|
+
class ModerationDecision < SafetyKit::Internal::Type::BaseModel
|
|
2685
3449
|
# @!attribute event_name
|
|
2686
3450
|
# Stable, low-cardinality product action name. Use snake_case and put dynamic
|
|
2687
3451
|
# values in typed fields, content, resources_used, or metadata.
|
|
@@ -2692,9 +3456,23 @@ module SafetyKit
|
|
|
2692
3456
|
# @!attribute labels
|
|
2693
3457
|
# One or more label categories supplied with the report.
|
|
2694
3458
|
#
|
|
2695
|
-
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3459
|
+
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Label>]
|
|
2696
3460
|
required :labels,
|
|
2697
|
-
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::
|
|
3461
|
+
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Label] }
|
|
3462
|
+
|
|
3463
|
+
# @!attribute source_id
|
|
3464
|
+
# Stable identifier within source_type. For system_auto_ban, use a versioned
|
|
3465
|
+
# system identifier; for manual_review, use the manual reviewer id.
|
|
3466
|
+
#
|
|
3467
|
+
# @return [String]
|
|
3468
|
+
required :source_id, String
|
|
3469
|
+
|
|
3470
|
+
# @!attribute source_type
|
|
3471
|
+
# Stable snake_case attribution namespace for the decision source, such as
|
|
3472
|
+
# system_auto_ban or manual_review.
|
|
3473
|
+
#
|
|
3474
|
+
# @return [String]
|
|
3475
|
+
required :source_type, String
|
|
2698
3476
|
|
|
2699
3477
|
# @!attribute timestamp
|
|
2700
3478
|
# The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
@@ -2704,23 +3482,17 @@ module SafetyKit
|
|
|
2704
3482
|
|
|
2705
3483
|
# @!attribute type
|
|
2706
3484
|
#
|
|
2707
|
-
# @return [Symbol, :
|
|
2708
|
-
required :type, const: :
|
|
2709
|
-
|
|
2710
|
-
# @!attribute user_id
|
|
2711
|
-
# Your stable canonical identifier for the user or account.
|
|
2712
|
-
#
|
|
2713
|
-
# @return [String]
|
|
2714
|
-
required :user_id, String
|
|
3485
|
+
# @return [Symbol, :moderation_decision]
|
|
3486
|
+
required :type, const: :moderation_decision
|
|
2715
3487
|
|
|
2716
3488
|
# @!attribute content
|
|
2717
3489
|
# User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
2718
3490
|
# listing text, image URLs, and similar content SafetyKit should compare or
|
|
2719
3491
|
# analyze.
|
|
2720
3492
|
#
|
|
2721
|
-
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3493
|
+
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventImageContent>, nil]
|
|
2722
3494
|
optional :content,
|
|
2723
|
-
-> { SafetyKit::Internal::Type::ArrayOf[union: SafetyKit::Beta::EventCreateParams::Body::
|
|
3495
|
+
-> { SafetyKit::Internal::Type::ArrayOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content] }
|
|
2724
3496
|
|
|
2725
3497
|
# @!attribute content_id
|
|
2726
3498
|
# Your stable identifier for the content involved in this event, such as a
|
|
@@ -2729,22 +3501,29 @@ module SafetyKit
|
|
|
2729
3501
|
# @return [String, nil]
|
|
2730
3502
|
optional :content_id, String
|
|
2731
3503
|
|
|
3504
|
+
# @!attribute idempotency_key
|
|
3505
|
+
# Optional caller-provided key used to make retries of this individual event
|
|
3506
|
+
# idempotent. Reuse the same key only for retries of the same logical event.
|
|
3507
|
+
#
|
|
3508
|
+
# @return [String, nil]
|
|
3509
|
+
optional :idempotency_key, String
|
|
3510
|
+
|
|
2732
3511
|
# @!attribute metadata
|
|
2733
3512
|
# Non-PII product context for filtering, segmentation, and debugging. Values may
|
|
2734
3513
|
# be strings, numbers, booleans, or arrays of those scalar values.
|
|
2735
3514
|
#
|
|
2736
3515
|
# @return [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}, nil]
|
|
2737
3516
|
optional :metadata,
|
|
2738
|
-
-> { SafetyKit::Internal::Type::HashOf[union: SafetyKit::Beta::EventCreateParams::Body::
|
|
3517
|
+
-> { SafetyKit::Internal::Type::HashOf[union: SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Metadata] }
|
|
2739
3518
|
|
|
2740
3519
|
# @!attribute resources_used
|
|
2741
3520
|
# Reusable resources observed during the event. Use this for emails, phone
|
|
2742
3521
|
# numbers, names, addresses, social handles, URLs, payment identifiers, or similar
|
|
2743
3522
|
# identifiers.
|
|
2744
3523
|
#
|
|
2745
|
-
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3524
|
+
# @return [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::ResourcesUsed>, nil]
|
|
2746
3525
|
optional :resources_used,
|
|
2747
|
-
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::
|
|
3526
|
+
-> { SafetyKit::Internal::Type::ArrayOf[SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::ResourcesUsed] }
|
|
2748
3527
|
|
|
2749
3528
|
# @!attribute target_content_id
|
|
2750
3529
|
# Your stable identifier for the content being reported.
|
|
@@ -2758,37 +3537,40 @@ module SafetyKit
|
|
|
2758
3537
|
# @return [String, nil]
|
|
2759
3538
|
optional :target_user_id, String
|
|
2760
3539
|
|
|
2761
|
-
# @!method initialize(event_name:, labels:,
|
|
3540
|
+
# @!method initialize(event_name:, labels:, source_id:, source_type:, timestamp:, content: nil, content_id: nil, idempotency_key: nil, metadata: nil, resources_used: nil, target_content_id: nil, target_user_id: nil, type: :moderation_decision)
|
|
2762
3541
|
# Some parameter documentations has been truncated, see
|
|
2763
|
-
# {SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
2764
|
-
# more details.
|
|
3542
|
+
# {SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision}
|
|
3543
|
+
# for more details.
|
|
2765
3544
|
#
|
|
2766
|
-
# A
|
|
2767
|
-
#
|
|
2768
|
-
#
|
|
2769
|
-
# content_id for the report itself.
|
|
3545
|
+
# A moderation label or decision from an automated enforcement system or manual
|
|
3546
|
+
# review workflow. Do not send user_id; use source_type and source_id for
|
|
3547
|
+
# attribution.
|
|
2770
3548
|
#
|
|
2771
3549
|
# @param event_name [String] Stable, low-cardinality product action name. Use snake_case and put dynamic valu
|
|
2772
3550
|
#
|
|
2773
|
-
# @param labels [Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3551
|
+
# @param labels [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Label>] One or more label categories supplied with the report.
|
|
2774
3552
|
#
|
|
2775
|
-
# @param
|
|
3553
|
+
# @param source_id [String] Stable identifier within source_type. For system_auto_ban, use a versioned syste
|
|
2776
3554
|
#
|
|
2777
|
-
# @param
|
|
3555
|
+
# @param source_type [String] Stable snake*case attribution namespace for the decision source, such as system*
|
|
2778
3556
|
#
|
|
2779
|
-
# @param
|
|
3557
|
+
# @param timestamp [Time] The time the event occurred in your system, as an ISO 8601 datetime string.
|
|
3558
|
+
#
|
|
3559
|
+
# @param content [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventImageContent>] User-authored or user-uploaded content parts. Use this for message bodies, bios,
|
|
2780
3560
|
#
|
|
2781
3561
|
# @param content_id [String] Your stable identifier for the content involved in this event, such as a message
|
|
2782
3562
|
#
|
|
3563
|
+
# @param idempotency_key [String] Optional caller-provided key used to make retries of this individual event idemp
|
|
3564
|
+
#
|
|
2783
3565
|
# @param metadata [Hash{Symbol=>String, Float, Boolean, Array<String, Float, Boolean>}] Non-PII product context for filtering, segmentation, and debugging. Values may b
|
|
2784
3566
|
#
|
|
2785
|
-
# @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3567
|
+
# @param resources_used [Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::ResourcesUsed>] Reusable resources observed during the event. Use this for emails, phone numbers
|
|
2786
3568
|
#
|
|
2787
3569
|
# @param target_content_id [String] Your stable identifier for the content being reported.
|
|
2788
3570
|
#
|
|
2789
3571
|
# @param target_user_id [String] Your stable canonical identifier for the user being reported.
|
|
2790
3572
|
#
|
|
2791
|
-
# @param type [Symbol, :
|
|
3573
|
+
# @param type [Symbol, :moderation_decision]
|
|
2792
3574
|
|
|
2793
3575
|
class Label < SafetyKit::Internal::Type::BaseModel
|
|
2794
3576
|
# @!attribute label
|
|
@@ -2808,10 +3590,10 @@ module SafetyKit
|
|
|
2808
3590
|
extend SafetyKit::Internal::Type::Union
|
|
2809
3591
|
|
|
2810
3592
|
# User-authored text content associated with an event.
|
|
2811
|
-
variant -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
3593
|
+
variant -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventTextContent }
|
|
2812
3594
|
|
|
2813
3595
|
# User-uploaded image content associated with an event.
|
|
2814
|
-
variant -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
3596
|
+
variant -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventImageContent }
|
|
2815
3597
|
|
|
2816
3598
|
class EventTextContent < SafetyKit::Internal::Type::BaseModel
|
|
2817
3599
|
# @!attribute text
|
|
@@ -2823,9 +3605,9 @@ module SafetyKit
|
|
|
2823
3605
|
# @!attribute type
|
|
2824
3606
|
# Text content part.
|
|
2825
3607
|
#
|
|
2826
|
-
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3608
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventTextContent::Type]
|
|
2827
3609
|
required :type,
|
|
2828
|
-
enum: -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
3610
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventTextContent::Type }
|
|
2829
3611
|
|
|
2830
3612
|
# @!attribute key
|
|
2831
3613
|
# Stable field key for this content part.
|
|
@@ -2838,13 +3620,13 @@ module SafetyKit
|
|
|
2838
3620
|
#
|
|
2839
3621
|
# @param text [String] User-authored text SafetyKit should compare or analyze.
|
|
2840
3622
|
#
|
|
2841
|
-
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3623
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventTextContent::Type] Text content part.
|
|
2842
3624
|
#
|
|
2843
3625
|
# @param key [String] Stable field key for this content part.
|
|
2844
3626
|
|
|
2845
3627
|
# Text content part.
|
|
2846
3628
|
#
|
|
2847
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3629
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventTextContent#type
|
|
2848
3630
|
module Type
|
|
2849
3631
|
extend SafetyKit::Internal::Type::Enum
|
|
2850
3632
|
|
|
@@ -2859,16 +3641,16 @@ module SafetyKit
|
|
|
2859
3641
|
# @!attribute source
|
|
2860
3642
|
# Image source information.
|
|
2861
3643
|
#
|
|
2862
|
-
# @return [SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3644
|
+
# @return [SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventImageContent::Source]
|
|
2863
3645
|
required :source,
|
|
2864
|
-
-> { SafetyKit::Beta::EventCreateParams::Body::
|
|
3646
|
+
-> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventImageContent::Source }
|
|
2865
3647
|
|
|
2866
3648
|
# @!attribute type
|
|
2867
3649
|
# Image content part.
|
|
2868
3650
|
#
|
|
2869
|
-
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3651
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventImageContent::Type]
|
|
2870
3652
|
required :type,
|
|
2871
|
-
enum: -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
3653
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventImageContent::Type }
|
|
2872
3654
|
|
|
2873
3655
|
# @!attribute key
|
|
2874
3656
|
# Stable field key for this content part.
|
|
@@ -2879,20 +3661,20 @@ module SafetyKit
|
|
|
2879
3661
|
# @!method initialize(source:, type:, key: nil)
|
|
2880
3662
|
# User-uploaded image content associated with an event.
|
|
2881
3663
|
#
|
|
2882
|
-
# @param source [SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3664
|
+
# @param source [SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventImageContent::Source] Image source information.
|
|
2883
3665
|
#
|
|
2884
|
-
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3666
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventImageContent::Type] Image content part.
|
|
2885
3667
|
#
|
|
2886
3668
|
# @param key [String] Stable field key for this content part.
|
|
2887
3669
|
|
|
2888
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3670
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventImageContent#source
|
|
2889
3671
|
class Source < SafetyKit::Internal::Type::BaseModel
|
|
2890
3672
|
# @!attribute type
|
|
2891
3673
|
# URL image source.
|
|
2892
3674
|
#
|
|
2893
|
-
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3675
|
+
# @return [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventImageContent::Source::Type]
|
|
2894
3676
|
required :type,
|
|
2895
|
-
enum: -> { SafetyKit::Beta::EventCreateParams::Body::
|
|
3677
|
+
enum: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventImageContent::Source::Type }
|
|
2896
3678
|
|
|
2897
3679
|
# @!attribute url
|
|
2898
3680
|
# URL of the image SafetyKit should compare or analyze.
|
|
@@ -2903,13 +3685,13 @@ module SafetyKit
|
|
|
2903
3685
|
# @!method initialize(type:, url:)
|
|
2904
3686
|
# Image source information.
|
|
2905
3687
|
#
|
|
2906
|
-
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3688
|
+
# @param type [Symbol, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventImageContent::Source::Type] URL image source.
|
|
2907
3689
|
#
|
|
2908
3690
|
# @param url [String] URL of the image SafetyKit should compare or analyze.
|
|
2909
3691
|
|
|
2910
3692
|
# URL image source.
|
|
2911
3693
|
#
|
|
2912
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3694
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventImageContent::Source#type
|
|
2913
3695
|
module Type
|
|
2914
3696
|
extend SafetyKit::Internal::Type::Enum
|
|
2915
3697
|
|
|
@@ -2922,7 +3704,7 @@ module SafetyKit
|
|
|
2922
3704
|
|
|
2923
3705
|
# Image content part.
|
|
2924
3706
|
#
|
|
2925
|
-
# @see SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3707
|
+
# @see SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventImageContent#type
|
|
2926
3708
|
module Type
|
|
2927
3709
|
extend SafetyKit::Internal::Type::Enum
|
|
2928
3710
|
|
|
@@ -2934,7 +3716,7 @@ module SafetyKit
|
|
|
2934
3716
|
end
|
|
2935
3717
|
|
|
2936
3718
|
# @!method self.variants
|
|
2937
|
-
# @return [Array(SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3719
|
+
# @return [Array(SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventTextContent, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Content::EventImageContent)]
|
|
2938
3720
|
end
|
|
2939
3721
|
|
|
2940
3722
|
module Metadata
|
|
@@ -2946,7 +3728,7 @@ module SafetyKit
|
|
|
2946
3728
|
|
|
2947
3729
|
variant SafetyKit::Internal::Type::Boolean
|
|
2948
3730
|
|
|
2949
|
-
variant -> { SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3731
|
+
variant -> { SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Metadata::UnionMember3Array }
|
|
2950
3732
|
|
|
2951
3733
|
module UnionMember3
|
|
2952
3734
|
extend SafetyKit::Internal::Type::Union
|
|
@@ -2966,9 +3748,9 @@ module SafetyKit
|
|
|
2966
3748
|
|
|
2967
3749
|
# @type [SafetyKit::Internal::Type::Converter]
|
|
2968
3750
|
UnionMember3Array =
|
|
2969
|
-
SafetyKit::Internal::Type::ArrayOf[
|
|
2970
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
2971
|
-
|
|
3751
|
+
SafetyKit::Internal::Type::ArrayOf[
|
|
3752
|
+
union: -> { SafetyKit::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::Metadata::UnionMember3 }
|
|
3753
|
+
]
|
|
2972
3754
|
end
|
|
2973
3755
|
|
|
2974
3756
|
class ResourcesUsed < SafetyKit::Internal::Type::BaseModel
|
|
@@ -2988,7 +3770,7 @@ module SafetyKit
|
|
|
2988
3770
|
|
|
2989
3771
|
# @!method initialize(type:, value:)
|
|
2990
3772
|
# Some parameter documentations has been truncated, see
|
|
2991
|
-
# {SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3773
|
+
# {SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision::ResourcesUsed}
|
|
2992
3774
|
# for more details.
|
|
2993
3775
|
#
|
|
2994
3776
|
# Real-world or account resource used during the event, such as an email, phone
|
|
@@ -3001,16 +3783,16 @@ module SafetyKit
|
|
|
3001
3783
|
end
|
|
3002
3784
|
|
|
3003
3785
|
# @!method self.variants
|
|
3004
|
-
# @return [Array(SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3786
|
+
# @return [Array(SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision)]
|
|
3005
3787
|
end
|
|
3006
3788
|
|
|
3007
3789
|
# @!method self.variants
|
|
3008
|
-
# @return [Array(SafetyKit::Models::Beta::EventCreateParams::Body::UserContactEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::ContentUploadedEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::CreateAccountEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::UpdateAccountEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::UserReportEventRequest, Array<SafetyKit::Models::Beta::EventCreateParams::Body::
|
|
3790
|
+
# @return [Array(SafetyKit::Models::Beta::EventCreateParams::Body::UserContactEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::ContentUploadedEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::CreateAccountEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::UpdateAccountEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::UserReportEventRequest, SafetyKit::Models::Beta::EventCreateParams::Body::ModerationDecisionEventRequest, Array<SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserContact, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ContentUploaded, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::CreateAccount, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UpdateAccount, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::UserReport, SafetyKit::Models::Beta::EventCreateParams::Body::UnionMember6::ModerationDecision>)]
|
|
3009
3791
|
|
|
3010
3792
|
# @type [SafetyKit::Internal::Type::Converter]
|
|
3011
|
-
|
|
3793
|
+
UnionMember6Array =
|
|
3012
3794
|
SafetyKit::Internal::Type::ArrayOf[union: -> {
|
|
3013
|
-
SafetyKit::Beta::EventCreateParams::Body::
|
|
3795
|
+
SafetyKit::Beta::EventCreateParams::Body::UnionMember6
|
|
3014
3796
|
}]
|
|
3015
3797
|
end
|
|
3016
3798
|
end
|