calmlens 0.25.0 → 0.27.3
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/README.md +14 -12
- data/lib/calmlens/assets.rb +101 -143
- data/lib/calmlens/cdn.rb +24 -7
- data/lib/calmlens/error_codes.rb +2 -8
- data/lib/calmlens/errors.rb +41 -8
- data/lib/calmlens/events.rb +25 -42
- data/lib/calmlens/folders.rb +33 -38
- data/lib/calmlens/hash_lists.rb +38 -53
- data/lib/calmlens/internal.rb +11 -1
- data/lib/calmlens/lenses.rb +33 -40
- data/lib/calmlens/model.rb +234 -0
- data/lib/calmlens/models.rb +741 -0
- data/lib/calmlens/option_keys.rb +0 -1
- data/lib/calmlens/policies.rb +44 -52
- data/lib/calmlens/project_configuration.rb +33 -35
- data/lib/calmlens/resource.rb +27 -50
- data/lib/calmlens/response.rb +29 -0
- data/lib/calmlens/server_client.rb +103 -15
- data/lib/calmlens/session.rb +105 -21
- data/lib/calmlens/testing/asset_filters.rb +1 -1
- data/lib/calmlens/testing/fake_api.rb +31 -72
- data/lib/calmlens/testing/mock_decision.rb +3 -3
- data/lib/calmlens/testing.rb +19 -21
- data/lib/calmlens/text.rb +6 -7
- data/lib/calmlens/upload_mime_types.rb +1 -0
- data/lib/calmlens/upload_tokens.rb +9 -3
- data/lib/calmlens/version.rb +1 -1
- data/lib/calmlens/webhooks.rb +16 -37
- data/lib/calmlens.rb +2 -0
- data/sig/calmlens.rbs +220 -148
- data/sig/error_codes.rbs +1 -4
- data/sig/models.rbs +567 -0
- data/sig/types.rbs +48 -934
- metadata +6 -3
data/sig/models.rbs
ADDED
|
@@ -0,0 +1,567 @@
|
|
|
1
|
+
# Generated by script/generate_models.rb from testdata/types.json; do not edit.
|
|
2
|
+
module CalmLens
|
|
3
|
+
type moderation_qualifier = "sexual-pornographic-media" | "hate-nazi-symbols-public-display" | "hate-nazi-insignia-public-display" | "hate-nazi-genocide-public-peace" | "hate-nazi-genocide-denial-or-approval" | "hate-adjudicated-nazi-crimes-denial" | "violence-high-impact" | "self-harm-age-restricted" | "personal-information-contact" | "personal-information-email" | "personal-information-phone" | "personal-information-government-id" | "personal-information-financial" | "personal-information-location" | "personal-information-identifiers" | "personal-information-credentials" | "personal-information-request" | "personal-information-self-disclosure" | "personal-information-third-party" | "personal-information-historical" | "personal-information-documentary" | "personal-information-educational" | "personal-information-fictional" | "personal-information-support-prevention" | "profanity-mild" | "profanity-strong" | "profanity-slurs" | "profanity-obfuscated" | "profanity-historical" | "profanity-documentary" | "profanity-educational" | "profanity-fictional" | "profanity-support-prevention" | "sexual-nudity" | "sexual-activity" | "sexual-explicit-language" | "sexual-assault-media" | "sexual-non-consensual" | "sexual-intimate-image-abuse" | "sexual-extreme" | "sexual-strangulation" | "sexual-incest" | "sexual-minors" | "sexual-solicitation" | "sexual-paid" | "sexual-adult-promotion" | "sexual-revealing-clothing" | "sexual-suggestive" | "sexual-non-erotic-nudity" | "sexual-text" | "sexual-historical" | "sexual-documentary" | "sexual-educational" | "sexual-discussion" | "sexual-fictional" | "sexual-artistic" | "sexual-support-prevention" | "violence-attack" | "violence-threat" | "violence-preparation" | "violence-encouragement" | "violence-wish" | "violence-coded-incitement" | "violence-extremism" | "violence-injury" | "violence-violent-death" | "violence-natural-death" | "violence-graphic" | "violence-decapitation-act" | "violence-gore" | "violence-weapon" | "violence-sport" | "violence-text" | "violence-historical" | "violence-documentary" | "violence-educational" | "violence-discussion" | "violence-fictional" | "violence-fantasy" | "violence-support-prevention" | "self-harm-thoughts" | "self-harm-preparation" | "self-harm-act" | "self-harm-methods" | "self-harm-encouragement" | "self-harm-historical" | "self-harm-documentary" | "self-harm-educational" | "self-harm-fictional" | "self-harm-support-prevention" | "harassment-abuse" | "harassment-mild" | "harassment-bullying" | "harassment-public-target" | "harassment-threat" | "harassment-sexual" | "harassment-encouragement" | "harassment-historical" | "harassment-documentary" | "harassment-educational" | "harassment-fictional" | "harassment-support-prevention" | "hate-abuse" | "hate-slurs" | "hate-dehumanization" | "hate-inferiority" | "hate-exclusion" | "hate-symbol" | "hate-hostility" | "hate-threat" | "hate-personal" | "hate-historical" | "hate-documentary" | "hate-educational" | "hate-fictional" | "hate-counterspeech" | "hate-support-prevention" | "criminal-activity-demonstration" | "criminal-activity-preparation" | "criminal-activity-request" | "criminal-activity-instructions" | "criminal-activity-promotion" | "criminal-activity-coded-incitement" | "criminal-activity-substances" | "criminal-activity-grooming" | "criminal-activity-csam" | "criminal-activity-alcohol" | "criminal-activity-tobacco" | "criminal-activity-gambling" | "criminal-activity-fraud" | "criminal-activity-sexual-solicitation" | "criminal-activity-graffiti" | "criminal-activity-historical" | "criminal-activity-documentary" | "criminal-activity-educational" | "criminal-activity-discussion" | "criminal-activity-fictional" | "criminal-activity-support-prevention"
|
|
4
|
+
type event_type = "asset.uploaded" | "asset.classified" | "asset.region-restricted" | "asset.allowed" | "asset.limited" | "asset.age-restricted" | "asset.blocked" | "asset.purged" | "asset.failed" | "asset.progress-updated" | "asset.deleted" | "asset.content-removed" | "asset.retried" | "asset.review-requested" | "asset.review-completed" | "asset.hash-matched" | "usage.free-uploads-exhausted" | "usage.uploads-paused" | "upload-preset.daily-limit-reached" | "project.member-joined" | "project.member-removed" | "project.member-left" | "project.member-role-changed" | "project.invitation-sent" | "project.transferred" | "api-key.created" | "api-key.revoked" | "api-key.deleted" | "connector.disabled"
|
|
5
|
+
type event_fact_key = "asset-name" | "asset-type" | "file-format" | "test" | "parent-asset" | "flagged-categories" | "moderation-status" | "automated-status" | "region" | "rule" | "status" | "reviewer-name" | "note" | "child-asset" | "child-status" | "previous-status" | "failure-reason" | "completed-sections" | "total-sections" | "batch-id" | "review-reason" | "uncertain-categories" | "review-id" | "decision" | "applied-to-asset" | "hash-list-id" | "hash-list-name" | "distance" | "match-action" | "limit" | "used" | "organisation-id" | "reason" | "resumes-at" | "preset-id" | "preset-name" | "daily-limit" | "member-user-id" | "member-name" | "role" | "previous-role" | "invitee-email" | "previous-organisation-id" | "previous-organisation-name" | "organisation-name" | "method" | "api-keys-revoked" | "connectors-paused" | "key-id" | "key-name" | "created-by-name" | "revoked-by-name" | "deleted-by-name" | "connector-id" | "connector-name" | "connector-type" | "consecutive-failures" | "last-error"
|
|
6
|
+
class Asset < Model
|
|
7
|
+
def id: () -> String
|
|
8
|
+
def project_id: () -> String
|
|
9
|
+
def parent_id: () -> String?
|
|
10
|
+
def folder_id: () -> String?
|
|
11
|
+
def upload_preset_id: () -> String?
|
|
12
|
+
def created_at: () -> Integer
|
|
13
|
+
def updated_at: () -> Integer?
|
|
14
|
+
def type: () -> asset_type
|
|
15
|
+
def name: () -> String
|
|
16
|
+
def description: () -> String?
|
|
17
|
+
def external_id: () -> String?
|
|
18
|
+
def external_url: () -> String?
|
|
19
|
+
def author_id: () -> String?
|
|
20
|
+
def context: () -> Asset::Context?
|
|
21
|
+
def parent_pages: () -> Array[Integer]
|
|
22
|
+
def metadata: () -> Array[MetadataItem]
|
|
23
|
+
def tags: () -> Array[String]
|
|
24
|
+
def visibility: () -> asset_visibility
|
|
25
|
+
def upload: () -> Asset::Upload
|
|
26
|
+
def classification: () -> Classification
|
|
27
|
+
def content: () -> Asset::Content
|
|
28
|
+
end
|
|
29
|
+
class AssetBatch < Model
|
|
30
|
+
def batch_id: () -> String
|
|
31
|
+
def status: () -> "queued"
|
|
32
|
+
def asset_count: () -> Integer
|
|
33
|
+
end
|
|
34
|
+
class AssetPage < Page[Asset]
|
|
35
|
+
def items: () -> Array[Asset]
|
|
36
|
+
def next_cursor: () -> String?
|
|
37
|
+
def has_more: () -> bool
|
|
38
|
+
end
|
|
39
|
+
class AssetSearchResult < Model
|
|
40
|
+
def query: () -> String
|
|
41
|
+
def items: () -> Array[AssetSearchResult::Item]
|
|
42
|
+
def semantic_status: () -> ("disabled" | "ready" | "indexing" | "unavailable")
|
|
43
|
+
end
|
|
44
|
+
class AssetTimelinePage < Page[MediaSegment]
|
|
45
|
+
def items: () -> Array[MediaSegment]
|
|
46
|
+
def next_cursor: () -> String?
|
|
47
|
+
def has_more: () -> bool
|
|
48
|
+
end
|
|
49
|
+
class CategoryPolicyScore < Model
|
|
50
|
+
def score: () -> number
|
|
51
|
+
def action: () -> flagged_content_action
|
|
52
|
+
def settings: () -> CategoryPolicySettings?
|
|
53
|
+
def source: () -> CategoryPolicyScore::Source?
|
|
54
|
+
end
|
|
55
|
+
class CategoryPolicySettings < Model
|
|
56
|
+
def action: () -> flagged_content_action
|
|
57
|
+
def allowances: () -> Array[PolicyRule]
|
|
58
|
+
def restrictions: () -> Array[PolicyRule]
|
|
59
|
+
end
|
|
60
|
+
class CategoryReport < Model
|
|
61
|
+
def status: () -> ("evaluated" | "partial" | "not-evaluated")
|
|
62
|
+
def likelihood: () -> likelihood?
|
|
63
|
+
def score: () -> number?
|
|
64
|
+
def qualifiers: () -> (Hash[moderation_qualifier, QualifierResult])?
|
|
65
|
+
def reason: () -> not_evaluated_reason?
|
|
66
|
+
end
|
|
67
|
+
class CategoryReports < Model
|
|
68
|
+
def sexual: () -> CategoryReport
|
|
69
|
+
def violence: () -> CategoryReport
|
|
70
|
+
def self_harm: () -> CategoryReport
|
|
71
|
+
def harassment: () -> CategoryReport
|
|
72
|
+
def hate: () -> CategoryReport
|
|
73
|
+
def criminal_activity: () -> CategoryReport
|
|
74
|
+
def personal_information: () -> CategoryReport
|
|
75
|
+
def profanity: () -> CategoryReport
|
|
76
|
+
end
|
|
77
|
+
class CategorySettings < Model
|
|
78
|
+
def sexual: () -> CategoryPolicySettings
|
|
79
|
+
def violence: () -> CategoryPolicySettings
|
|
80
|
+
def self_harm: () -> CategoryPolicySettings
|
|
81
|
+
def harassment: () -> CategoryPolicySettings
|
|
82
|
+
def hate: () -> CategoryPolicySettings
|
|
83
|
+
def criminal_activity: () -> CategoryPolicySettings
|
|
84
|
+
def personal_information: () -> CategoryPolicySettings
|
|
85
|
+
def profanity: () -> CategoryPolicySettings
|
|
86
|
+
end
|
|
87
|
+
class Classification < Model
|
|
88
|
+
def status: () -> asset_classification_status
|
|
89
|
+
def failure_reason: () -> asset_classification_failure_reason?
|
|
90
|
+
def updated_at: () -> Integer?
|
|
91
|
+
def completed_at: () -> Integer?
|
|
92
|
+
def progress: () -> Classification::Progress?
|
|
93
|
+
def test_input: () -> bool
|
|
94
|
+
def moderation: () -> Moderation
|
|
95
|
+
def ocr: () -> Classification::Ocr?
|
|
96
|
+
def person_detection: () -> Classification::PersonDetection?
|
|
97
|
+
def face_detection: () -> Classification::FaceDetection?
|
|
98
|
+
def link_detection: () -> Classification::LinkDetection?
|
|
99
|
+
end
|
|
100
|
+
class Event < Model
|
|
101
|
+
def id: () -> String
|
|
102
|
+
def project_id: () -> String
|
|
103
|
+
def actor: () -> Event::Actor
|
|
104
|
+
def type: () -> event_type
|
|
105
|
+
def severity: () -> event_severity
|
|
106
|
+
def title: () -> String
|
|
107
|
+
def description: () -> String?
|
|
108
|
+
def asset_id: () -> String?
|
|
109
|
+
def asset_sequence: () -> Integer?
|
|
110
|
+
def asset: () -> Event::Asset?
|
|
111
|
+
def facts: () -> Array[Event::Fact]
|
|
112
|
+
def created_at: () -> Integer
|
|
113
|
+
end
|
|
114
|
+
class EventPage < Page[Event]
|
|
115
|
+
def items: () -> Array[Event]
|
|
116
|
+
def next_cursor: () -> String
|
|
117
|
+
def has_more: () -> bool
|
|
118
|
+
def excluded_types: () -> Array[event_type]
|
|
119
|
+
end
|
|
120
|
+
class Folder < Model
|
|
121
|
+
def id: () -> String
|
|
122
|
+
def project_id: () -> String
|
|
123
|
+
def parent_id: () -> String?
|
|
124
|
+
def name: () -> String
|
|
125
|
+
def created_at: () -> Integer
|
|
126
|
+
def updated_at: () -> Integer?
|
|
127
|
+
end
|
|
128
|
+
class FolderPage < Page[Folder]
|
|
129
|
+
def items: () -> Array[Folder]
|
|
130
|
+
def next_cursor: () -> String?
|
|
131
|
+
def has_more: () -> bool
|
|
132
|
+
def ancestors: () -> Array[Folder]
|
|
133
|
+
end
|
|
134
|
+
class HashList < Model
|
|
135
|
+
def id: () -> String
|
|
136
|
+
def project_id: () -> String
|
|
137
|
+
def name: () -> String
|
|
138
|
+
def description: () -> String?
|
|
139
|
+
def action: () -> hash_list_action
|
|
140
|
+
def created_at: () -> Integer
|
|
141
|
+
def updated_at: () -> Integer?
|
|
142
|
+
end
|
|
143
|
+
class HashListEntry < Model
|
|
144
|
+
def id: () -> String
|
|
145
|
+
def project_id: () -> String
|
|
146
|
+
def hash_list_id: () -> String
|
|
147
|
+
def quality: () -> Integer?
|
|
148
|
+
def label: () -> String?
|
|
149
|
+
def asset_id: () -> String?
|
|
150
|
+
def created_at: () -> Integer
|
|
151
|
+
end
|
|
152
|
+
class HashListEntryPage < Page[HashListEntry]
|
|
153
|
+
def items: () -> Array[HashListEntry]
|
|
154
|
+
def next_cursor: () -> String?
|
|
155
|
+
def has_more: () -> bool
|
|
156
|
+
end
|
|
157
|
+
class HashListPage < Page[HashList]
|
|
158
|
+
def items: () -> Array[HashList]
|
|
159
|
+
def next_cursor: () -> String?
|
|
160
|
+
def has_more: () -> bool
|
|
161
|
+
end
|
|
162
|
+
class Lens < Model
|
|
163
|
+
def id: () -> String
|
|
164
|
+
def project_id: () -> String?
|
|
165
|
+
def identifier: () -> String
|
|
166
|
+
def name: () -> String
|
|
167
|
+
def description: () -> String?
|
|
168
|
+
def type: () -> lens_type
|
|
169
|
+
def active: () -> bool
|
|
170
|
+
def transform: () -> (Hash[String, json_value])?
|
|
171
|
+
def created_at: () -> Integer
|
|
172
|
+
def updated_at: () -> Integer?
|
|
173
|
+
end
|
|
174
|
+
class LensPage < Page[Lens]
|
|
175
|
+
def items: () -> Array[Lens]
|
|
176
|
+
def next_cursor: () -> String?
|
|
177
|
+
def has_more: () -> bool
|
|
178
|
+
end
|
|
179
|
+
class MediaSegment < Model
|
|
180
|
+
def source: () -> ("frame" | "speech" | "frame-text" | "clip")
|
|
181
|
+
def start_seconds: () -> number
|
|
182
|
+
def end_seconds: () -> number
|
|
183
|
+
def categories: () -> CategoryReports
|
|
184
|
+
end
|
|
185
|
+
class MetadataFieldsResource < Model
|
|
186
|
+
def project_id: () -> String
|
|
187
|
+
def revision: () -> Integer
|
|
188
|
+
def fields: () -> Array[MetadataFieldsResource::Field]
|
|
189
|
+
end
|
|
190
|
+
class MetadataItem < Model
|
|
191
|
+
def id: () -> String
|
|
192
|
+
def value: () -> json_value?
|
|
193
|
+
end
|
|
194
|
+
class Moderation < Model
|
|
195
|
+
def decision: () -> asset_moderation_decision?
|
|
196
|
+
def manual_reviews: () -> Array[Moderation::ManualReview]
|
|
197
|
+
def automated_status: () -> asset_moderation_decision?
|
|
198
|
+
def source: () -> ("policy" | "children" | "hash-list" | "mandatory-rule")?
|
|
199
|
+
def policy: () -> Moderation::Policy?
|
|
200
|
+
def pending_review: () -> Moderation::PendingReview?
|
|
201
|
+
def rule: () -> String?
|
|
202
|
+
def explanation_complete: () -> bool?
|
|
203
|
+
def categories: () -> (Hash[classification_category, CategoryPolicyScore])?
|
|
204
|
+
def flagged_categories: () -> Array[classification_category]
|
|
205
|
+
def regions: () -> Array[Moderation::Region]
|
|
206
|
+
def raw: () -> Moderation::Raw?
|
|
207
|
+
def timeline: () -> Moderation::Timeline?
|
|
208
|
+
end
|
|
209
|
+
class Policy < Model
|
|
210
|
+
def id: () -> String
|
|
211
|
+
def name: () -> String
|
|
212
|
+
def description: () -> String
|
|
213
|
+
def settings: () -> PolicySettings
|
|
214
|
+
def revision: () -> Integer
|
|
215
|
+
def preset: () -> Policy::Preset?
|
|
216
|
+
def project_ids: () -> Array[String]
|
|
217
|
+
def created_at: () -> Integer
|
|
218
|
+
def updated_at: () -> Integer?
|
|
219
|
+
end
|
|
220
|
+
class PolicyPage < Page[Policy]
|
|
221
|
+
def items: () -> Array[Policy]
|
|
222
|
+
def next_cursor: () -> String?
|
|
223
|
+
def has_more: () -> bool
|
|
224
|
+
end
|
|
225
|
+
class PolicyRule < Model
|
|
226
|
+
def name: () -> String?
|
|
227
|
+
def when: () -> Array[moderation_qualifier]
|
|
228
|
+
def unless: () -> Array[moderation_qualifier]?
|
|
229
|
+
def action: () -> flagged_content_action
|
|
230
|
+
end
|
|
231
|
+
class PolicySettings < Model
|
|
232
|
+
def category_settings: () -> CategorySettings
|
|
233
|
+
end
|
|
234
|
+
class ProjectSettingsResource < Model
|
|
235
|
+
def project_id: () -> String
|
|
236
|
+
def revision: () -> Integer
|
|
237
|
+
def settings: () -> ProjectSettingsResource::Settings
|
|
238
|
+
end
|
|
239
|
+
class QualifierResult < Model
|
|
240
|
+
def status: () -> ("evaluated" | "not-evaluated")
|
|
241
|
+
def some_score: () -> number?
|
|
242
|
+
def all_score: () -> number?
|
|
243
|
+
def likelihood: () -> likelihood?
|
|
244
|
+
def reason: () -> not_evaluated_reason?
|
|
245
|
+
end
|
|
246
|
+
class SignedAssetUrl < Model
|
|
247
|
+
def url: () -> String
|
|
248
|
+
def expires_at: () -> Integer
|
|
249
|
+
end
|
|
250
|
+
class UploadPreset < Model
|
|
251
|
+
def id: () -> String
|
|
252
|
+
def project_id: () -> String
|
|
253
|
+
def created_by_user_id: () -> String?
|
|
254
|
+
def key: () -> String
|
|
255
|
+
def revision: () -> Integer
|
|
256
|
+
def name: () -> String
|
|
257
|
+
def access: () -> upload_preset_access
|
|
258
|
+
def enabled: () -> bool
|
|
259
|
+
def allowed_content_types: () -> Array[String]?
|
|
260
|
+
def max_size_in_bytes: () -> Integer?
|
|
261
|
+
def folder_id: () -> String?
|
|
262
|
+
def policy_id: () -> String?
|
|
263
|
+
def visibility: () -> asset_visibility
|
|
264
|
+
def processing_options: () -> UploadPreset::ProcessingOptions?
|
|
265
|
+
def reveal_decision: () -> bool
|
|
266
|
+
def daily_upload_limit: () -> Integer?
|
|
267
|
+
def allowed_origins: () -> Array[String]?
|
|
268
|
+
def created_at: () -> Integer
|
|
269
|
+
def updated_at: () -> Integer?
|
|
270
|
+
end
|
|
271
|
+
class UploadPresetPage < Page[UploadPreset]
|
|
272
|
+
def items: () -> Array[UploadPreset]
|
|
273
|
+
def next_cursor: () -> String?
|
|
274
|
+
def has_more: () -> bool
|
|
275
|
+
end
|
|
276
|
+
class UploadPresetsEnsured < Model
|
|
277
|
+
def upload_presets: () -> Array[UploadPreset]
|
|
278
|
+
end
|
|
279
|
+
class Asset::Content < Model
|
|
280
|
+
def status: () -> asset_content_status
|
|
281
|
+
def removal_reason: () -> asset_content_removal_reason?
|
|
282
|
+
def updated_at: () -> Integer?
|
|
283
|
+
def safety_hold: () -> Asset::Content::SafetyHold?
|
|
284
|
+
def format: () -> String?
|
|
285
|
+
def extension: () -> String?
|
|
286
|
+
def size_in_bytes: () -> Integer?
|
|
287
|
+
def checksums: () -> Asset::Content::Checksums?
|
|
288
|
+
def width: () -> Integer?
|
|
289
|
+
def height: () -> Integer?
|
|
290
|
+
def duration_seconds: () -> number?
|
|
291
|
+
def page_count: () -> Integer?
|
|
292
|
+
def perceptual_hash: () -> String?
|
|
293
|
+
def perceptual_hash_quality: () -> Integer?
|
|
294
|
+
def metadata: () -> Asset::Content::FileMetadata?
|
|
295
|
+
def extracted_text: () -> Asset::Content::ExtractedText?
|
|
296
|
+
def rendered: () -> Asset::Content::Rendered?
|
|
297
|
+
def hls: () -> Asset::Content::Hls?
|
|
298
|
+
def preview: () -> Asset::Content::Preview?
|
|
299
|
+
end
|
|
300
|
+
class Asset::Context < Model
|
|
301
|
+
def items: () -> Array[Asset::Context::Item]
|
|
302
|
+
end
|
|
303
|
+
class Asset::Upload < Model
|
|
304
|
+
def status: () -> ("uploading" | "completed")
|
|
305
|
+
def updated_at: () -> Integer?
|
|
306
|
+
def parts_received: () -> Integer?
|
|
307
|
+
end
|
|
308
|
+
class AssetSearchResult::Item < Model
|
|
309
|
+
def asset: () -> Asset
|
|
310
|
+
def score: () -> number
|
|
311
|
+
def matched_fields: () -> Array[asset_search_match_field]
|
|
312
|
+
end
|
|
313
|
+
class CategoryPolicyScore::Source < Model
|
|
314
|
+
def kind: () -> ("default" | "below-threshold" | "allowance" | "restriction")
|
|
315
|
+
def indexes: () -> Array[Integer]?
|
|
316
|
+
def condition_score: () -> number?
|
|
317
|
+
end
|
|
318
|
+
class Classification::FaceDetection < Model
|
|
319
|
+
def status: () -> ("evaluated" | "not-evaluated")
|
|
320
|
+
def faces: () -> Array[Classification::FaceDetection::Face]?
|
|
321
|
+
def reason: () -> feature_not_evaluated_reason?
|
|
322
|
+
end
|
|
323
|
+
class Classification::LinkDetection < Model
|
|
324
|
+
def status: () -> ("evaluated" | "not-evaluated")
|
|
325
|
+
def qr_codes: () -> Array[Classification::LinkDetection::QrCode]?
|
|
326
|
+
def links: () -> Array[Classification::LinkDetection::Link]?
|
|
327
|
+
def reason: () -> feature_not_evaluated_reason?
|
|
328
|
+
end
|
|
329
|
+
class Classification::Ocr < Model
|
|
330
|
+
def status: () -> ("evaluated" | "not-evaluated")
|
|
331
|
+
def text_regions: () -> Array[Classification::Ocr::TextRegion]?
|
|
332
|
+
def reason: () -> feature_not_evaluated_reason?
|
|
333
|
+
end
|
|
334
|
+
class Classification::PersonDetection < Model
|
|
335
|
+
def status: () -> ("evaluated" | "not-evaluated")
|
|
336
|
+
def people: () -> Array[Classification::PersonDetection::Person]?
|
|
337
|
+
def reason: () -> feature_not_evaluated_reason?
|
|
338
|
+
end
|
|
339
|
+
class Classification::Progress < Model
|
|
340
|
+
def completed_sections: () -> Integer
|
|
341
|
+
def total_sections: () -> Integer
|
|
342
|
+
end
|
|
343
|
+
class Event::Actor < Model
|
|
344
|
+
def type: () -> actor_type
|
|
345
|
+
def id: () -> String?
|
|
346
|
+
end
|
|
347
|
+
class Event::Asset < Model
|
|
348
|
+
def id: () -> String
|
|
349
|
+
def external_id: () -> String?
|
|
350
|
+
def upload_preset_id: () -> String?
|
|
351
|
+
def upload: () -> Event::Asset::Upload
|
|
352
|
+
def classification: () -> Event::Asset::Classification
|
|
353
|
+
def content: () -> Event::Asset::Content
|
|
354
|
+
end
|
|
355
|
+
class Event::Fact < Model
|
|
356
|
+
def key: () -> event_fact_key
|
|
357
|
+
def value: () -> (Array[classification_category] | String | Integer | bool)?
|
|
358
|
+
def url: () -> String?
|
|
359
|
+
end
|
|
360
|
+
class MetadataFieldsResource::Field < Model
|
|
361
|
+
def id: () -> String
|
|
362
|
+
def title: () -> String
|
|
363
|
+
def description: () -> String?
|
|
364
|
+
def type: () -> metadata_field_type
|
|
365
|
+
def icon: () -> metadata_field_icon
|
|
366
|
+
def color: () -> String
|
|
367
|
+
end
|
|
368
|
+
class Moderation::ManualReview < Model
|
|
369
|
+
def id: () -> String
|
|
370
|
+
def decision: () -> asset_moderation_decision
|
|
371
|
+
def note: () -> String?
|
|
372
|
+
def decided_by: () -> Moderation::ManualReview::DecidedBy
|
|
373
|
+
def reviewed_at: () -> Integer
|
|
374
|
+
def applied: () -> bool
|
|
375
|
+
end
|
|
376
|
+
class Moderation::PendingReview < Model
|
|
377
|
+
def requested_at: () -> Integer
|
|
378
|
+
def reason: () -> ("sampled" | "uncertain")
|
|
379
|
+
def uncertain_categories: () -> Array[classification_category]
|
|
380
|
+
end
|
|
381
|
+
class Moderation::Policy < Model
|
|
382
|
+
def id: () -> String
|
|
383
|
+
def revision: () -> Integer
|
|
384
|
+
def preset: () -> Moderation::Policy::Preset?
|
|
385
|
+
end
|
|
386
|
+
class Moderation::Raw < Model
|
|
387
|
+
def categories: () -> CategoryReports
|
|
388
|
+
def hash_matches: () -> Array[Moderation::Raw::HashMatch]
|
|
389
|
+
end
|
|
390
|
+
class Moderation::Region < Model
|
|
391
|
+
def region: () -> moderation_region
|
|
392
|
+
def status: () -> ("limited" | "age-restricted" | "blocked" | "purged")
|
|
393
|
+
def rule: () -> String
|
|
394
|
+
def category: () -> classification_category?
|
|
395
|
+
end
|
|
396
|
+
class Moderation::Timeline < Model
|
|
397
|
+
def segment_count: () -> Integer
|
|
398
|
+
end
|
|
399
|
+
class Policy::Preset < Model
|
|
400
|
+
def id: () -> policy_preset_id
|
|
401
|
+
def version: () -> Integer
|
|
402
|
+
def latest_version: () -> Integer
|
|
403
|
+
def mode: () -> policy_preset_mode
|
|
404
|
+
end
|
|
405
|
+
class ProjectSettingsResource::Settings < Model
|
|
406
|
+
def retain_content: () -> bool
|
|
407
|
+
def opt_out_jurisdictions: () -> Array[opt_out_jurisdiction]
|
|
408
|
+
def block_unmoderated_assets: () -> bool
|
|
409
|
+
def store_sensitive_metadata: () -> bool
|
|
410
|
+
def link_checking_enabled: () -> bool
|
|
411
|
+
def streaming_enabled: () -> bool
|
|
412
|
+
def ai_media_search_enabled: () -> bool
|
|
413
|
+
def remote_url_rule: () -> ProjectSettingsResource::Settings::RemoteUrlRule?
|
|
414
|
+
def human_review: () -> ProjectSettingsResource::Settings::HumanReview
|
|
415
|
+
end
|
|
416
|
+
class UploadPreset::ProcessingOptions < Model
|
|
417
|
+
def retain_content: () -> bool?
|
|
418
|
+
def store_sensitive_metadata: () -> bool?
|
|
419
|
+
def features: () -> UploadPreset::ProcessingOptions::Features?
|
|
420
|
+
end
|
|
421
|
+
class Asset::Content::Checksums < Model
|
|
422
|
+
def md5: () -> String?
|
|
423
|
+
def sha1: () -> String?
|
|
424
|
+
def sha256: () -> String?
|
|
425
|
+
def sha384: () -> String?
|
|
426
|
+
def sha512: () -> String?
|
|
427
|
+
end
|
|
428
|
+
class Asset::Content::ExtractedText < Model
|
|
429
|
+
def type: () -> ("string" | "document")
|
|
430
|
+
def content: () -> String?
|
|
431
|
+
def id: () -> String?
|
|
432
|
+
end
|
|
433
|
+
class Asset::Content::FileMetadata < Model
|
|
434
|
+
def captured_at: () -> String?
|
|
435
|
+
def camera_make: () -> String?
|
|
436
|
+
def camera_model: () -> String?
|
|
437
|
+
def lens_model: () -> String?
|
|
438
|
+
def software: () -> String?
|
|
439
|
+
def creator: () -> String?
|
|
440
|
+
def copyright: () -> String?
|
|
441
|
+
def digital_source_type: () -> String?
|
|
442
|
+
def contains_location: () -> bool
|
|
443
|
+
def location: () -> Asset::Content::FileMetadata::Location?
|
|
444
|
+
end
|
|
445
|
+
class Asset::Content::Hls < Model
|
|
446
|
+
def status: () -> ("preparing" | "ready" | "unavailable")
|
|
447
|
+
def reason: () -> asset_hls_unavailable_reason?
|
|
448
|
+
def renditions: () -> Array[Asset::Content::Hls::Rendition]
|
|
449
|
+
end
|
|
450
|
+
class Asset::Content::Preview < Model
|
|
451
|
+
def width: () -> Integer?
|
|
452
|
+
def height: () -> Integer?
|
|
453
|
+
def thumbhash: () -> String?
|
|
454
|
+
def average_color: () -> String?
|
|
455
|
+
end
|
|
456
|
+
class Asset::Content::Rendered < Model
|
|
457
|
+
def kind: () -> asset_rendered_kind
|
|
458
|
+
def format: () -> String
|
|
459
|
+
def width: () -> Integer?
|
|
460
|
+
def height: () -> Integer?
|
|
461
|
+
def peaks: () -> Array[number]?
|
|
462
|
+
end
|
|
463
|
+
class Asset::Content::SafetyHold < Model
|
|
464
|
+
def placed_at: () -> Integer
|
|
465
|
+
def reason: () -> "suspected-illegal-content"
|
|
466
|
+
def disposed_at: () -> Integer?
|
|
467
|
+
end
|
|
468
|
+
class Asset::Context::Item < Model
|
|
469
|
+
def text: () -> String
|
|
470
|
+
def author_id: () -> String?
|
|
471
|
+
end
|
|
472
|
+
class Classification::FaceDetection::Face < Model
|
|
473
|
+
def box: () -> Classification::Ocr::TextRegion::Box
|
|
474
|
+
def confidence: () -> number
|
|
475
|
+
def age_range: () -> Classification::FaceDetection::Face::AgeRange?
|
|
476
|
+
end
|
|
477
|
+
class Classification::LinkDetection::Link < Model
|
|
478
|
+
def url: () -> String
|
|
479
|
+
def source: () -> ("qr-code" | "text")
|
|
480
|
+
end
|
|
481
|
+
class Classification::LinkDetection::QrCode < Model
|
|
482
|
+
def value: () -> String
|
|
483
|
+
def box: () -> Classification::Ocr::TextRegion::Box
|
|
484
|
+
end
|
|
485
|
+
class Classification::Ocr::TextRegion < Model
|
|
486
|
+
def box: () -> Classification::Ocr::TextRegion::Box
|
|
487
|
+
def personal_information: () -> bool
|
|
488
|
+
end
|
|
489
|
+
class Classification::PersonDetection::Person < Model
|
|
490
|
+
def box: () -> Classification::Ocr::TextRegion::Box
|
|
491
|
+
def confidence: () -> number
|
|
492
|
+
end
|
|
493
|
+
class Event::Asset::Classification < Model
|
|
494
|
+
def status: () -> asset_classification_status
|
|
495
|
+
def test_input: () -> bool
|
|
496
|
+
def moderation: () -> Event::Asset::Classification::Moderation
|
|
497
|
+
end
|
|
498
|
+
class Event::Asset::Content < Model
|
|
499
|
+
def status: () -> asset_content_status
|
|
500
|
+
end
|
|
501
|
+
class Event::Asset::Upload < Model
|
|
502
|
+
def status: () -> ("uploading" | "completed")
|
|
503
|
+
end
|
|
504
|
+
class Moderation::ManualReview::DecidedBy < Model
|
|
505
|
+
def type: () -> ("user" | "api-key")
|
|
506
|
+
def id: () -> String?
|
|
507
|
+
end
|
|
508
|
+
class Moderation::Policy::Preset < Model
|
|
509
|
+
def id: () -> policy_preset_id
|
|
510
|
+
def version: () -> Integer
|
|
511
|
+
end
|
|
512
|
+
class Moderation::Raw::HashMatch < Model
|
|
513
|
+
def source: () -> "hash-list"
|
|
514
|
+
def hash_list_id: () -> String
|
|
515
|
+
def hash_list_entry_id: () -> String
|
|
516
|
+
def distance: () -> Integer
|
|
517
|
+
def action: () -> hash_list_action
|
|
518
|
+
end
|
|
519
|
+
class ProjectSettingsResource::Settings::HumanReview < Model
|
|
520
|
+
def allowed_sample_percent: () -> number
|
|
521
|
+
def restricted_sample_percent: () -> number
|
|
522
|
+
def uncertainty_margin_percent: () -> number
|
|
523
|
+
def review_missing_evidence: () -> bool
|
|
524
|
+
end
|
|
525
|
+
class ProjectSettingsResource::Settings::RemoteUrlRule < Model
|
|
526
|
+
def mode: () -> ("allow" | "deny")
|
|
527
|
+
def domains: () -> Array[String]
|
|
528
|
+
end
|
|
529
|
+
class UploadPreset::ProcessingOptions::Feature < Model
|
|
530
|
+
def enabled: () -> bool
|
|
531
|
+
end
|
|
532
|
+
class UploadPreset::ProcessingOptions::Features < Model
|
|
533
|
+
def ocr: () -> UploadPreset::ProcessingOptions::Feature?
|
|
534
|
+
def person_detection: () -> UploadPreset::ProcessingOptions::Feature?
|
|
535
|
+
def face_detection: () -> UploadPreset::ProcessingOptions::Features::FaceDetection?
|
|
536
|
+
def link_detection: () -> UploadPreset::ProcessingOptions::Feature?
|
|
537
|
+
def streaming: () -> UploadPreset::ProcessingOptions::Feature?
|
|
538
|
+
end
|
|
539
|
+
class Asset::Content::FileMetadata::Location < Model
|
|
540
|
+
def latitude: () -> number
|
|
541
|
+
def longitude: () -> number
|
|
542
|
+
end
|
|
543
|
+
class Asset::Content::Hls::Rendition < Model
|
|
544
|
+
def kind: () -> ("video" | "audio")
|
|
545
|
+
def width: () -> Integer?
|
|
546
|
+
def height: () -> Integer?
|
|
547
|
+
def bandwidth: () -> Integer
|
|
548
|
+
def codecs: () -> String
|
|
549
|
+
end
|
|
550
|
+
class Classification::FaceDetection::Face::AgeRange < Model
|
|
551
|
+
def low: () -> Integer
|
|
552
|
+
def high: () -> Integer
|
|
553
|
+
end
|
|
554
|
+
class Classification::Ocr::TextRegion::Box < Model
|
|
555
|
+
def left: () -> number
|
|
556
|
+
def top: () -> number
|
|
557
|
+
def width: () -> number
|
|
558
|
+
def height: () -> number
|
|
559
|
+
end
|
|
560
|
+
class Event::Asset::Classification::Moderation < Model
|
|
561
|
+
def decision: () -> asset_moderation_decision?
|
|
562
|
+
end
|
|
563
|
+
class UploadPreset::ProcessingOptions::Features::FaceDetection < Model
|
|
564
|
+
def enabled: () -> bool
|
|
565
|
+
def age_estimation: () -> bool?
|
|
566
|
+
end
|
|
567
|
+
end
|