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
|
@@ -0,0 +1,741 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Generated by script/generate_models.rb from testdata/types.json; do not edit.
|
|
4
|
+
module CalmLens
|
|
5
|
+
class Asset < Model; end
|
|
6
|
+
class AssetBatch < Model; end
|
|
7
|
+
class AssetPage < Page; end
|
|
8
|
+
class AssetSearchResult < Model; end
|
|
9
|
+
class AssetTimelinePage < Page; end
|
|
10
|
+
class CategoryPolicyScore < Model; end
|
|
11
|
+
class CategoryPolicySettings < Model; end
|
|
12
|
+
class CategoryReport < Model; end
|
|
13
|
+
class CategoryReports < Model; end
|
|
14
|
+
class CategorySettings < Model; end
|
|
15
|
+
class Classification < Model; end
|
|
16
|
+
class Event < Model; end
|
|
17
|
+
class EventPage < Page; end
|
|
18
|
+
class Folder < Model; end
|
|
19
|
+
class FolderPage < Page; end
|
|
20
|
+
class HashList < Model; end
|
|
21
|
+
class HashListEntry < Model; end
|
|
22
|
+
class HashListEntryPage < Page; end
|
|
23
|
+
class HashListPage < Page; end
|
|
24
|
+
class Lens < Model; end
|
|
25
|
+
class LensPage < Page; end
|
|
26
|
+
class MediaSegment < Model; end
|
|
27
|
+
class MetadataFieldsResource < Model; end
|
|
28
|
+
class MetadataItem < Model; end
|
|
29
|
+
class Moderation < Model; end
|
|
30
|
+
class Policy < Model; end
|
|
31
|
+
class PolicyPage < Page; end
|
|
32
|
+
class PolicyRule < Model; end
|
|
33
|
+
class PolicySettings < Model; end
|
|
34
|
+
class ProjectSettingsResource < Model; end
|
|
35
|
+
class QualifierResult < Model; end
|
|
36
|
+
class SignedAssetUrl < Model; end
|
|
37
|
+
class UploadPreset < Model; end
|
|
38
|
+
class UploadPresetPage < Page; end
|
|
39
|
+
class UploadPresetsEnsured < Model; end
|
|
40
|
+
class Asset::Content < Model; end
|
|
41
|
+
class Asset::Context < Model; end
|
|
42
|
+
class Asset::Upload < Model; end
|
|
43
|
+
class AssetSearchResult::Item < Model; end
|
|
44
|
+
class CategoryPolicyScore::Source < Model; end
|
|
45
|
+
class Classification::FaceDetection < Model; end
|
|
46
|
+
class Classification::LinkDetection < Model; end
|
|
47
|
+
class Classification::Ocr < Model; end
|
|
48
|
+
class Classification::PersonDetection < Model; end
|
|
49
|
+
class Classification::Progress < Model; end
|
|
50
|
+
class Event::Actor < Model; end
|
|
51
|
+
class Event::Asset < Model; end
|
|
52
|
+
class Event::Fact < Model; end
|
|
53
|
+
class MetadataFieldsResource::Field < Model; end
|
|
54
|
+
class Moderation::ManualReview < Model; end
|
|
55
|
+
class Moderation::PendingReview < Model; end
|
|
56
|
+
class Moderation::Policy < Model; end
|
|
57
|
+
class Moderation::Raw < Model; end
|
|
58
|
+
class Moderation::Region < Model; end
|
|
59
|
+
class Moderation::Timeline < Model; end
|
|
60
|
+
class Policy::Preset < Model; end
|
|
61
|
+
class ProjectSettingsResource::Settings < Model; end
|
|
62
|
+
class UploadPreset::ProcessingOptions < Model; end
|
|
63
|
+
class Asset::Content::Checksums < Model; end
|
|
64
|
+
class Asset::Content::ExtractedText < Model; end
|
|
65
|
+
class Asset::Content::FileMetadata < Model; end
|
|
66
|
+
class Asset::Content::Hls < Model; end
|
|
67
|
+
class Asset::Content::Preview < Model; end
|
|
68
|
+
class Asset::Content::Rendered < Model; end
|
|
69
|
+
class Asset::Content::SafetyHold < Model; end
|
|
70
|
+
class Asset::Context::Item < Model; end
|
|
71
|
+
class Classification::FaceDetection::Face < Model; end
|
|
72
|
+
class Classification::LinkDetection::Link < Model; end
|
|
73
|
+
class Classification::LinkDetection::QrCode < Model; end
|
|
74
|
+
class Classification::Ocr::TextRegion < Model; end
|
|
75
|
+
class Classification::PersonDetection::Person < Model; end
|
|
76
|
+
class Event::Asset::Classification < Model; end
|
|
77
|
+
class Event::Asset::Content < Model; end
|
|
78
|
+
class Event::Asset::Upload < Model; end
|
|
79
|
+
class Moderation::ManualReview::DecidedBy < Model; end
|
|
80
|
+
class Moderation::Policy::Preset < Model; end
|
|
81
|
+
class Moderation::Raw::HashMatch < Model; end
|
|
82
|
+
class ProjectSettingsResource::Settings::HumanReview < Model; end
|
|
83
|
+
class ProjectSettingsResource::Settings::RemoteUrlRule < Model; end
|
|
84
|
+
class UploadPreset::ProcessingOptions::Feature < Model; end
|
|
85
|
+
class UploadPreset::ProcessingOptions::Features < Model; end
|
|
86
|
+
class Asset::Content::FileMetadata::Location < Model; end
|
|
87
|
+
class Asset::Content::Hls::Rendition < Model; end
|
|
88
|
+
class Classification::FaceDetection::Face::AgeRange < Model; end
|
|
89
|
+
class Classification::Ocr::TextRegion::Box < Model; end
|
|
90
|
+
class Event::Asset::Classification::Moderation < Model; end
|
|
91
|
+
class UploadPreset::ProcessingOptions::Features::FaceDetection < Model; end
|
|
92
|
+
|
|
93
|
+
Asset.declare(
|
|
94
|
+
id: ["id", nil],
|
|
95
|
+
project_id: ["projectId", nil],
|
|
96
|
+
parent_id: ["parentId", nil],
|
|
97
|
+
folder_id: ["folderId", nil],
|
|
98
|
+
upload_preset_id: ["uploadPresetId", nil],
|
|
99
|
+
created_at: ["createdAt", nil],
|
|
100
|
+
updated_at: ["updatedAt", nil],
|
|
101
|
+
type: ["type", nil],
|
|
102
|
+
name: ["name", nil],
|
|
103
|
+
description: ["description", nil],
|
|
104
|
+
external_id: ["externalId", nil],
|
|
105
|
+
external_url: ["externalUrl", nil],
|
|
106
|
+
author_id: ["authorId", nil],
|
|
107
|
+
context: ["context", [:model, "CalmLens::Asset::Context"]],
|
|
108
|
+
parent_pages: ["parentPages", [:array, nil]],
|
|
109
|
+
metadata: ["metadata", [:array, [:model, "CalmLens::MetadataItem"]]],
|
|
110
|
+
tags: ["tags", [:array, nil]],
|
|
111
|
+
visibility: ["visibility", nil],
|
|
112
|
+
upload: ["upload", [:model, "CalmLens::Asset::Upload"]],
|
|
113
|
+
classification: ["classification", [:model, "CalmLens::Classification"]],
|
|
114
|
+
content: ["content", [:model, "CalmLens::Asset::Content"]]
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
AssetBatch.declare(
|
|
118
|
+
batch_id: ["batchId", nil],
|
|
119
|
+
status: ["status", nil],
|
|
120
|
+
asset_count: ["assetCount", nil]
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
AssetPage.declare(
|
|
124
|
+
items: ["items", [:array, [:model, "CalmLens::Asset"]]],
|
|
125
|
+
next_cursor: ["nextCursor", nil],
|
|
126
|
+
has_more: ["hasMore", nil]
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
AssetSearchResult.declare(
|
|
130
|
+
query: ["query", nil],
|
|
131
|
+
items: ["items", [:array, [:model, "CalmLens::AssetSearchResult::Item"]]],
|
|
132
|
+
semantic_status: ["semanticStatus", nil]
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
AssetTimelinePage.declare(
|
|
136
|
+
items: ["items", [:array, [:model, "CalmLens::MediaSegment"]]],
|
|
137
|
+
next_cursor: ["nextCursor", nil],
|
|
138
|
+
has_more: ["hasMore", nil]
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
CategoryPolicyScore.declare(
|
|
142
|
+
score: ["score", nil],
|
|
143
|
+
action: ["action", nil],
|
|
144
|
+
settings: ["settings", [:model, "CalmLens::CategoryPolicySettings"]],
|
|
145
|
+
source: ["source", [:model, "CalmLens::CategoryPolicyScore::Source"]]
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
CategoryPolicySettings.declare(
|
|
149
|
+
action: ["action", nil],
|
|
150
|
+
allowances: ["allowances", [:array, [:model, "CalmLens::PolicyRule"]]],
|
|
151
|
+
restrictions: ["restrictions", [:array, [:model, "CalmLens::PolicyRule"]]]
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
CategoryReport.declare(
|
|
155
|
+
status: ["status", nil],
|
|
156
|
+
likelihood: ["likelihood", nil],
|
|
157
|
+
score: ["score", nil],
|
|
158
|
+
qualifiers: ["qualifiers", [:map, [:model, "CalmLens::QualifierResult"]]],
|
|
159
|
+
reason: ["reason", nil]
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
CategoryReports.declare(
|
|
163
|
+
sexual: ["sexual", [:model, "CalmLens::CategoryReport"]],
|
|
164
|
+
violence: ["violence", [:model, "CalmLens::CategoryReport"]],
|
|
165
|
+
self_harm: ["self-harm", [:model, "CalmLens::CategoryReport"]],
|
|
166
|
+
harassment: ["harassment", [:model, "CalmLens::CategoryReport"]],
|
|
167
|
+
hate: ["hate", [:model, "CalmLens::CategoryReport"]],
|
|
168
|
+
criminal_activity: ["criminal-activity", [:model, "CalmLens::CategoryReport"]],
|
|
169
|
+
personal_information: ["personal-information", [:model, "CalmLens::CategoryReport"]],
|
|
170
|
+
profanity: ["profanity", [:model, "CalmLens::CategoryReport"]]
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
CategorySettings.declare(
|
|
174
|
+
sexual: ["sexual", [:model, "CalmLens::CategoryPolicySettings"]],
|
|
175
|
+
violence: ["violence", [:model, "CalmLens::CategoryPolicySettings"]],
|
|
176
|
+
self_harm: ["self-harm", [:model, "CalmLens::CategoryPolicySettings"]],
|
|
177
|
+
harassment: ["harassment", [:model, "CalmLens::CategoryPolicySettings"]],
|
|
178
|
+
hate: ["hate", [:model, "CalmLens::CategoryPolicySettings"]],
|
|
179
|
+
criminal_activity: ["criminal-activity", [:model, "CalmLens::CategoryPolicySettings"]],
|
|
180
|
+
personal_information: ["personal-information", [:model, "CalmLens::CategoryPolicySettings"]],
|
|
181
|
+
profanity: ["profanity", [:model, "CalmLens::CategoryPolicySettings"]]
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
Classification.declare(
|
|
185
|
+
status: ["status", nil],
|
|
186
|
+
failure_reason: ["failureReason", nil],
|
|
187
|
+
updated_at: ["updatedAt", nil],
|
|
188
|
+
completed_at: ["completedAt", nil],
|
|
189
|
+
progress: ["progress", [:model, "CalmLens::Classification::Progress"]],
|
|
190
|
+
test_input: ["testInput", nil],
|
|
191
|
+
moderation: ["moderation", [:model, "CalmLens::Moderation"]],
|
|
192
|
+
ocr: ["ocr", [:model, "CalmLens::Classification::Ocr"]],
|
|
193
|
+
person_detection: ["personDetection", [:model, "CalmLens::Classification::PersonDetection"]],
|
|
194
|
+
face_detection: ["faceDetection", [:model, "CalmLens::Classification::FaceDetection"]],
|
|
195
|
+
link_detection: ["linkDetection", [:model, "CalmLens::Classification::LinkDetection"]]
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
Event.declare(
|
|
199
|
+
id: ["id", nil],
|
|
200
|
+
project_id: ["projectId", nil],
|
|
201
|
+
actor: ["actor", [:model, "CalmLens::Event::Actor"]],
|
|
202
|
+
type: ["type", nil],
|
|
203
|
+
severity: ["severity", nil],
|
|
204
|
+
title: ["title", nil],
|
|
205
|
+
description: ["description", nil],
|
|
206
|
+
asset_id: ["assetId", nil],
|
|
207
|
+
asset_sequence: ["assetSequence", nil],
|
|
208
|
+
asset: ["asset", [:model, "CalmLens::Event::Asset"]],
|
|
209
|
+
facts: ["facts", [:array, [:model, "CalmLens::Event::Fact"]]],
|
|
210
|
+
created_at: ["createdAt", nil]
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
EventPage.declare(
|
|
214
|
+
items: ["items", [:array, [:model, "CalmLens::Event"]]],
|
|
215
|
+
next_cursor: ["nextCursor", nil],
|
|
216
|
+
has_more: ["hasMore", nil],
|
|
217
|
+
excluded_types: ["excludedTypes", [:array, nil]]
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
Folder.declare(
|
|
221
|
+
id: ["id", nil],
|
|
222
|
+
project_id: ["projectId", nil],
|
|
223
|
+
parent_id: ["parentId", nil],
|
|
224
|
+
name: ["name", nil],
|
|
225
|
+
created_at: ["createdAt", nil],
|
|
226
|
+
updated_at: ["updatedAt", nil]
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
FolderPage.declare(
|
|
230
|
+
items: ["items", [:array, [:model, "CalmLens::Folder"]]],
|
|
231
|
+
next_cursor: ["nextCursor", nil],
|
|
232
|
+
has_more: ["hasMore", nil],
|
|
233
|
+
ancestors: ["ancestors", [:array, [:model, "CalmLens::Folder"]]]
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
HashList.declare(
|
|
237
|
+
id: ["id", nil],
|
|
238
|
+
project_id: ["projectId", nil],
|
|
239
|
+
name: ["name", nil],
|
|
240
|
+
description: ["description", nil],
|
|
241
|
+
action: ["action", nil],
|
|
242
|
+
created_at: ["createdAt", nil],
|
|
243
|
+
updated_at: ["updatedAt", nil]
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
HashListEntry.declare(
|
|
247
|
+
id: ["id", nil],
|
|
248
|
+
project_id: ["projectId", nil],
|
|
249
|
+
hash_list_id: ["hashListId", nil],
|
|
250
|
+
hash: ["hash", nil],
|
|
251
|
+
quality: ["quality", nil],
|
|
252
|
+
label: ["label", nil],
|
|
253
|
+
asset_id: ["assetId", nil],
|
|
254
|
+
created_at: ["createdAt", nil]
|
|
255
|
+
)
|
|
256
|
+
|
|
257
|
+
HashListEntryPage.declare(
|
|
258
|
+
items: ["items", [:array, [:model, "CalmLens::HashListEntry"]]],
|
|
259
|
+
next_cursor: ["nextCursor", nil],
|
|
260
|
+
has_more: ["hasMore", nil]
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
HashListPage.declare(
|
|
264
|
+
items: ["items", [:array, [:model, "CalmLens::HashList"]]],
|
|
265
|
+
next_cursor: ["nextCursor", nil],
|
|
266
|
+
has_more: ["hasMore", nil]
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
Lens.declare(
|
|
270
|
+
id: ["id", nil],
|
|
271
|
+
project_id: ["projectId", nil],
|
|
272
|
+
identifier: ["identifier", nil],
|
|
273
|
+
name: ["name", nil],
|
|
274
|
+
description: ["description", nil],
|
|
275
|
+
type: ["type", nil],
|
|
276
|
+
active: ["active", nil],
|
|
277
|
+
transform: ["transform", nil],
|
|
278
|
+
created_at: ["createdAt", nil],
|
|
279
|
+
updated_at: ["updatedAt", nil]
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
LensPage.declare(
|
|
283
|
+
items: ["items", [:array, [:model, "CalmLens::Lens"]]],
|
|
284
|
+
next_cursor: ["nextCursor", nil],
|
|
285
|
+
has_more: ["hasMore", nil]
|
|
286
|
+
)
|
|
287
|
+
|
|
288
|
+
MediaSegment.declare(
|
|
289
|
+
source: ["source", nil],
|
|
290
|
+
start_seconds: ["startSeconds", nil],
|
|
291
|
+
end_seconds: ["endSeconds", nil],
|
|
292
|
+
categories: ["categories", [:model, "CalmLens::CategoryReports"]]
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
MetadataFieldsResource.declare(
|
|
296
|
+
project_id: ["projectId", nil],
|
|
297
|
+
revision: ["revision", nil],
|
|
298
|
+
fields: ["fields", [:array, [:model, "CalmLens::MetadataFieldsResource::Field"]]]
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
MetadataItem.declare(
|
|
302
|
+
id: ["id", nil],
|
|
303
|
+
value: ["value", nil]
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
Moderation.declare(
|
|
307
|
+
decision: ["decision", nil],
|
|
308
|
+
manual_reviews: ["manualReviews", [:array, [:model, "CalmLens::Moderation::ManualReview"]]],
|
|
309
|
+
automated_status: ["automatedStatus", nil],
|
|
310
|
+
source: ["source", nil],
|
|
311
|
+
policy: ["policy", [:model, "CalmLens::Moderation::Policy"]],
|
|
312
|
+
pending_review: ["pendingReview", [:model, "CalmLens::Moderation::PendingReview"]],
|
|
313
|
+
rule: ["rule", nil],
|
|
314
|
+
explanation_complete: ["explanationComplete", nil],
|
|
315
|
+
categories: ["categories", [:map, [:model, "CalmLens::CategoryPolicyScore"]]],
|
|
316
|
+
flagged_categories: ["flaggedCategories", [:array, nil]],
|
|
317
|
+
regions: ["regions", [:array, [:model, "CalmLens::Moderation::Region"]]],
|
|
318
|
+
raw: ["raw", [:model, "CalmLens::Moderation::Raw"]],
|
|
319
|
+
timeline: ["timeline", [:model, "CalmLens::Moderation::Timeline"]]
|
|
320
|
+
)
|
|
321
|
+
|
|
322
|
+
Policy.declare(
|
|
323
|
+
id: ["id", nil],
|
|
324
|
+
name: ["name", nil],
|
|
325
|
+
description: ["description", nil],
|
|
326
|
+
settings: ["settings", [:model, "CalmLens::PolicySettings"]],
|
|
327
|
+
revision: ["revision", nil],
|
|
328
|
+
preset: ["preset", [:model, "CalmLens::Policy::Preset"]],
|
|
329
|
+
project_ids: ["projectIds", [:array, nil]],
|
|
330
|
+
created_at: ["createdAt", nil],
|
|
331
|
+
updated_at: ["updatedAt", nil]
|
|
332
|
+
)
|
|
333
|
+
|
|
334
|
+
PolicyPage.declare(
|
|
335
|
+
items: ["items", [:array, [:model, "CalmLens::Policy"]]],
|
|
336
|
+
next_cursor: ["nextCursor", nil],
|
|
337
|
+
has_more: ["hasMore", nil]
|
|
338
|
+
)
|
|
339
|
+
|
|
340
|
+
PolicyRule.declare(
|
|
341
|
+
name: ["name", nil],
|
|
342
|
+
when: ["when", [:array, nil]],
|
|
343
|
+
unless: ["unless", [:array, nil]],
|
|
344
|
+
action: ["action", nil]
|
|
345
|
+
)
|
|
346
|
+
|
|
347
|
+
PolicySettings.declare(
|
|
348
|
+
category_settings: ["categorySettings", [:model, "CalmLens::CategorySettings"]]
|
|
349
|
+
)
|
|
350
|
+
|
|
351
|
+
ProjectSettingsResource.declare(
|
|
352
|
+
project_id: ["projectId", nil],
|
|
353
|
+
revision: ["revision", nil],
|
|
354
|
+
settings: ["settings", [:model, "CalmLens::ProjectSettingsResource::Settings"]]
|
|
355
|
+
)
|
|
356
|
+
|
|
357
|
+
QualifierResult.declare(
|
|
358
|
+
status: ["status", nil],
|
|
359
|
+
some_score: ["someScore", nil],
|
|
360
|
+
all_score: ["allScore", nil],
|
|
361
|
+
likelihood: ["likelihood", nil],
|
|
362
|
+
reason: ["reason", nil]
|
|
363
|
+
)
|
|
364
|
+
|
|
365
|
+
SignedAssetUrl.declare(
|
|
366
|
+
url: ["url", nil],
|
|
367
|
+
expires_at: ["expiresAt", nil]
|
|
368
|
+
)
|
|
369
|
+
|
|
370
|
+
UploadPreset.declare(
|
|
371
|
+
id: ["id", nil],
|
|
372
|
+
project_id: ["projectId", nil],
|
|
373
|
+
created_by_user_id: ["createdByUserId", nil],
|
|
374
|
+
key: ["key", nil],
|
|
375
|
+
revision: ["revision", nil],
|
|
376
|
+
name: ["name", nil],
|
|
377
|
+
access: ["access", nil],
|
|
378
|
+
enabled: ["enabled", nil],
|
|
379
|
+
allowed_content_types: ["allowedContentTypes", [:array, nil]],
|
|
380
|
+
max_size_in_bytes: ["maxSizeInBytes", nil],
|
|
381
|
+
folder_id: ["folderId", nil],
|
|
382
|
+
policy_id: ["policyId", nil],
|
|
383
|
+
visibility: ["visibility", nil],
|
|
384
|
+
processing_options: ["processingOptions", [:model, "CalmLens::UploadPreset::ProcessingOptions"]],
|
|
385
|
+
reveal_decision: ["revealDecision", nil],
|
|
386
|
+
daily_upload_limit: ["dailyUploadLimit", nil],
|
|
387
|
+
allowed_origins: ["allowedOrigins", [:array, nil]],
|
|
388
|
+
created_at: ["createdAt", nil],
|
|
389
|
+
updated_at: ["updatedAt", nil]
|
|
390
|
+
)
|
|
391
|
+
|
|
392
|
+
UploadPresetPage.declare(
|
|
393
|
+
items: ["items", [:array, [:model, "CalmLens::UploadPreset"]]],
|
|
394
|
+
next_cursor: ["nextCursor", nil],
|
|
395
|
+
has_more: ["hasMore", nil]
|
|
396
|
+
)
|
|
397
|
+
|
|
398
|
+
UploadPresetsEnsured.declare(
|
|
399
|
+
upload_presets: ["uploadPresets", [:array, [:model, "CalmLens::UploadPreset"]]]
|
|
400
|
+
)
|
|
401
|
+
|
|
402
|
+
Asset::Content.declare(
|
|
403
|
+
status: ["status", nil],
|
|
404
|
+
removal_reason: ["removalReason", nil],
|
|
405
|
+
updated_at: ["updatedAt", nil],
|
|
406
|
+
safety_hold: ["safetyHold", [:model, "CalmLens::Asset::Content::SafetyHold"]],
|
|
407
|
+
format: ["format", nil],
|
|
408
|
+
extension: ["extension", nil],
|
|
409
|
+
size_in_bytes: ["sizeInBytes", nil],
|
|
410
|
+
checksums: ["checksums", [:model, "CalmLens::Asset::Content::Checksums"]],
|
|
411
|
+
width: ["width", nil],
|
|
412
|
+
height: ["height", nil],
|
|
413
|
+
duration_seconds: ["durationSeconds", nil],
|
|
414
|
+
page_count: ["pageCount", nil],
|
|
415
|
+
perceptual_hash: ["perceptualHash", nil],
|
|
416
|
+
perceptual_hash_quality: ["perceptualHashQuality", nil],
|
|
417
|
+
metadata: ["metadata", [:model, "CalmLens::Asset::Content::FileMetadata"]],
|
|
418
|
+
extracted_text: ["extractedText", [:model, "CalmLens::Asset::Content::ExtractedText"]],
|
|
419
|
+
rendered: ["rendered", [:model, "CalmLens::Asset::Content::Rendered"]],
|
|
420
|
+
hls: ["hls", [:model, "CalmLens::Asset::Content::Hls"]],
|
|
421
|
+
preview: ["preview", [:model, "CalmLens::Asset::Content::Preview"]]
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
Asset::Context.declare(
|
|
425
|
+
items: ["items", [:array, [:model, "CalmLens::Asset::Context::Item"]]]
|
|
426
|
+
)
|
|
427
|
+
|
|
428
|
+
Asset::Upload.declare(
|
|
429
|
+
status: ["status", nil],
|
|
430
|
+
updated_at: ["updatedAt", nil],
|
|
431
|
+
parts_received: ["partsReceived", nil]
|
|
432
|
+
)
|
|
433
|
+
|
|
434
|
+
AssetSearchResult::Item.declare(
|
|
435
|
+
asset: ["asset", [:model, "CalmLens::Asset"]],
|
|
436
|
+
score: ["score", nil],
|
|
437
|
+
matched_fields: ["matchedFields", [:array, nil]]
|
|
438
|
+
)
|
|
439
|
+
|
|
440
|
+
CategoryPolicyScore::Source.declare(
|
|
441
|
+
kind: ["kind", nil],
|
|
442
|
+
indexes: ["indexes", [:array, nil]],
|
|
443
|
+
condition_score: ["conditionScore", nil]
|
|
444
|
+
)
|
|
445
|
+
|
|
446
|
+
Classification::FaceDetection.declare(
|
|
447
|
+
status: ["status", nil],
|
|
448
|
+
faces: ["faces", [:array, [:model, "CalmLens::Classification::FaceDetection::Face"]]],
|
|
449
|
+
reason: ["reason", nil]
|
|
450
|
+
)
|
|
451
|
+
|
|
452
|
+
Classification::LinkDetection.declare(
|
|
453
|
+
status: ["status", nil],
|
|
454
|
+
qr_codes: ["qrCodes", [:array, [:model, "CalmLens::Classification::LinkDetection::QrCode"]]],
|
|
455
|
+
links: ["links", [:array, [:model, "CalmLens::Classification::LinkDetection::Link"]]],
|
|
456
|
+
reason: ["reason", nil]
|
|
457
|
+
)
|
|
458
|
+
|
|
459
|
+
Classification::Ocr.declare(
|
|
460
|
+
status: ["status", nil],
|
|
461
|
+
text_regions: ["textRegions", [:array, [:model, "CalmLens::Classification::Ocr::TextRegion"]]],
|
|
462
|
+
reason: ["reason", nil]
|
|
463
|
+
)
|
|
464
|
+
|
|
465
|
+
Classification::PersonDetection.declare(
|
|
466
|
+
status: ["status", nil],
|
|
467
|
+
people: ["people", [:array, [:model, "CalmLens::Classification::PersonDetection::Person"]]],
|
|
468
|
+
reason: ["reason", nil]
|
|
469
|
+
)
|
|
470
|
+
|
|
471
|
+
Classification::Progress.declare(
|
|
472
|
+
completed_sections: ["completedSections", nil],
|
|
473
|
+
total_sections: ["totalSections", nil]
|
|
474
|
+
)
|
|
475
|
+
|
|
476
|
+
Event::Actor.declare(
|
|
477
|
+
type: ["type", nil],
|
|
478
|
+
id: ["id", nil]
|
|
479
|
+
)
|
|
480
|
+
|
|
481
|
+
Event::Asset.declare(
|
|
482
|
+
id: ["id", nil],
|
|
483
|
+
external_id: ["externalId", nil],
|
|
484
|
+
upload_preset_id: ["uploadPresetId", nil],
|
|
485
|
+
upload: ["upload", [:model, "CalmLens::Event::Asset::Upload"]],
|
|
486
|
+
classification: ["classification", [:model, "CalmLens::Event::Asset::Classification"]],
|
|
487
|
+
content: ["content", [:model, "CalmLens::Event::Asset::Content"]]
|
|
488
|
+
)
|
|
489
|
+
|
|
490
|
+
Event::Fact.declare(
|
|
491
|
+
key: ["key", nil],
|
|
492
|
+
value: ["value", [:array, nil]],
|
|
493
|
+
url: ["url", nil]
|
|
494
|
+
)
|
|
495
|
+
|
|
496
|
+
MetadataFieldsResource::Field.declare(
|
|
497
|
+
id: ["id", nil],
|
|
498
|
+
title: ["title", nil],
|
|
499
|
+
description: ["description", nil],
|
|
500
|
+
type: ["type", nil],
|
|
501
|
+
icon: ["icon", nil],
|
|
502
|
+
color: ["color", nil]
|
|
503
|
+
)
|
|
504
|
+
|
|
505
|
+
Moderation::ManualReview.declare(
|
|
506
|
+
id: ["id", nil],
|
|
507
|
+
decision: ["decision", nil],
|
|
508
|
+
note: ["note", nil],
|
|
509
|
+
decided_by: ["decidedBy", [:model, "CalmLens::Moderation::ManualReview::DecidedBy"]],
|
|
510
|
+
reviewed_at: ["reviewedAt", nil],
|
|
511
|
+
applied: ["applied", nil]
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
Moderation::PendingReview.declare(
|
|
515
|
+
requested_at: ["requestedAt", nil],
|
|
516
|
+
reason: ["reason", nil],
|
|
517
|
+
uncertain_categories: ["uncertainCategories", [:array, nil]]
|
|
518
|
+
)
|
|
519
|
+
|
|
520
|
+
Moderation::Policy.declare(
|
|
521
|
+
id: ["id", nil],
|
|
522
|
+
revision: ["revision", nil],
|
|
523
|
+
preset: ["preset", [:model, "CalmLens::Moderation::Policy::Preset"]]
|
|
524
|
+
)
|
|
525
|
+
|
|
526
|
+
Moderation::Raw.declare(
|
|
527
|
+
categories: ["categories", [:model, "CalmLens::CategoryReports"]],
|
|
528
|
+
hash_matches: ["hashMatches", [:array, [:model, "CalmLens::Moderation::Raw::HashMatch"]]]
|
|
529
|
+
)
|
|
530
|
+
|
|
531
|
+
Moderation::Region.declare(
|
|
532
|
+
region: ["region", nil],
|
|
533
|
+
status: ["status", nil],
|
|
534
|
+
rule: ["rule", nil],
|
|
535
|
+
category: ["category", nil]
|
|
536
|
+
)
|
|
537
|
+
|
|
538
|
+
Moderation::Timeline.declare(
|
|
539
|
+
segment_count: ["segmentCount", nil]
|
|
540
|
+
)
|
|
541
|
+
|
|
542
|
+
Policy::Preset.declare(
|
|
543
|
+
id: ["id", nil],
|
|
544
|
+
version: ["version", nil],
|
|
545
|
+
latest_version: ["latestVersion", nil],
|
|
546
|
+
mode: ["mode", nil]
|
|
547
|
+
)
|
|
548
|
+
|
|
549
|
+
ProjectSettingsResource::Settings.declare(
|
|
550
|
+
retain_content: ["retainContent", nil],
|
|
551
|
+
opt_out_jurisdictions: ["optOutJurisdictions", [:array, nil]],
|
|
552
|
+
block_unmoderated_assets: ["blockUnmoderatedAssets", nil],
|
|
553
|
+
store_sensitive_metadata: ["storeSensitiveMetadata", nil],
|
|
554
|
+
link_checking_enabled: ["linkCheckingEnabled", nil],
|
|
555
|
+
streaming_enabled: ["streamingEnabled", nil],
|
|
556
|
+
ai_media_search_enabled: ["aiMediaSearchEnabled", nil],
|
|
557
|
+
remote_url_rule: ["remoteUrlRule", [:model, "CalmLens::ProjectSettingsResource::Settings::RemoteUrlRule"]],
|
|
558
|
+
human_review: ["humanReview", [:model, "CalmLens::ProjectSettingsResource::Settings::HumanReview"]]
|
|
559
|
+
)
|
|
560
|
+
|
|
561
|
+
UploadPreset::ProcessingOptions.declare(
|
|
562
|
+
retain_content: ["retainContent", nil],
|
|
563
|
+
store_sensitive_metadata: ["storeSensitiveMetadata", nil],
|
|
564
|
+
features: ["features", [:model, "CalmLens::UploadPreset::ProcessingOptions::Features"]]
|
|
565
|
+
)
|
|
566
|
+
|
|
567
|
+
Asset::Content::Checksums.declare(
|
|
568
|
+
md5: ["md5", nil],
|
|
569
|
+
sha1: ["sha1", nil],
|
|
570
|
+
sha256: ["sha256", nil],
|
|
571
|
+
sha384: ["sha384", nil],
|
|
572
|
+
sha512: ["sha512", nil]
|
|
573
|
+
)
|
|
574
|
+
|
|
575
|
+
Asset::Content::ExtractedText.declare(
|
|
576
|
+
type: ["type", nil],
|
|
577
|
+
content: ["content", nil],
|
|
578
|
+
id: ["id", nil]
|
|
579
|
+
)
|
|
580
|
+
|
|
581
|
+
Asset::Content::FileMetadata.declare(
|
|
582
|
+
captured_at: ["capturedAt", nil],
|
|
583
|
+
camera_make: ["cameraMake", nil],
|
|
584
|
+
camera_model: ["cameraModel", nil],
|
|
585
|
+
lens_model: ["lensModel", nil],
|
|
586
|
+
software: ["software", nil],
|
|
587
|
+
creator: ["creator", nil],
|
|
588
|
+
copyright: ["copyright", nil],
|
|
589
|
+
digital_source_type: ["digitalSourceType", nil],
|
|
590
|
+
contains_location: ["containsLocation", nil],
|
|
591
|
+
location: ["location", [:model, "CalmLens::Asset::Content::FileMetadata::Location"]]
|
|
592
|
+
)
|
|
593
|
+
|
|
594
|
+
Asset::Content::Hls.declare(
|
|
595
|
+
status: ["status", nil],
|
|
596
|
+
reason: ["reason", nil],
|
|
597
|
+
renditions: ["renditions", [:array, [:model, "CalmLens::Asset::Content::Hls::Rendition"]]]
|
|
598
|
+
)
|
|
599
|
+
|
|
600
|
+
Asset::Content::Preview.declare(
|
|
601
|
+
width: ["width", nil],
|
|
602
|
+
height: ["height", nil],
|
|
603
|
+
thumbhash: ["thumbhash", nil],
|
|
604
|
+
average_color: ["averageColor", nil]
|
|
605
|
+
)
|
|
606
|
+
|
|
607
|
+
Asset::Content::Rendered.declare(
|
|
608
|
+
kind: ["kind", nil],
|
|
609
|
+
format: ["format", nil],
|
|
610
|
+
width: ["width", nil],
|
|
611
|
+
height: ["height", nil],
|
|
612
|
+
peaks: ["peaks", [:array, nil]]
|
|
613
|
+
)
|
|
614
|
+
|
|
615
|
+
Asset::Content::SafetyHold.declare(
|
|
616
|
+
placed_at: ["placedAt", nil],
|
|
617
|
+
reason: ["reason", nil],
|
|
618
|
+
disposed_at: ["disposedAt", nil]
|
|
619
|
+
)
|
|
620
|
+
|
|
621
|
+
Asset::Context::Item.declare(
|
|
622
|
+
text: ["text", nil],
|
|
623
|
+
author_id: ["authorId", nil]
|
|
624
|
+
)
|
|
625
|
+
|
|
626
|
+
Classification::FaceDetection::Face.declare(
|
|
627
|
+
box: ["box", [:model, "CalmLens::Classification::Ocr::TextRegion::Box"]],
|
|
628
|
+
confidence: ["confidence", nil],
|
|
629
|
+
age_range: ["ageRange", [:model, "CalmLens::Classification::FaceDetection::Face::AgeRange"]]
|
|
630
|
+
)
|
|
631
|
+
|
|
632
|
+
Classification::LinkDetection::Link.declare(
|
|
633
|
+
url: ["url", nil],
|
|
634
|
+
source: ["source", nil]
|
|
635
|
+
)
|
|
636
|
+
|
|
637
|
+
Classification::LinkDetection::QrCode.declare(
|
|
638
|
+
value: ["value", nil],
|
|
639
|
+
box: ["box", [:model, "CalmLens::Classification::Ocr::TextRegion::Box"]]
|
|
640
|
+
)
|
|
641
|
+
|
|
642
|
+
Classification::Ocr::TextRegion.declare(
|
|
643
|
+
box: ["box", [:model, "CalmLens::Classification::Ocr::TextRegion::Box"]],
|
|
644
|
+
personal_information: ["personalInformation", nil]
|
|
645
|
+
)
|
|
646
|
+
|
|
647
|
+
Classification::PersonDetection::Person.declare(
|
|
648
|
+
box: ["box", [:model, "CalmLens::Classification::Ocr::TextRegion::Box"]],
|
|
649
|
+
confidence: ["confidence", nil]
|
|
650
|
+
)
|
|
651
|
+
|
|
652
|
+
Event::Asset::Classification.declare(
|
|
653
|
+
status: ["status", nil],
|
|
654
|
+
test_input: ["testInput", nil],
|
|
655
|
+
moderation: ["moderation", [:model, "CalmLens::Event::Asset::Classification::Moderation"]]
|
|
656
|
+
)
|
|
657
|
+
|
|
658
|
+
Event::Asset::Content.declare(
|
|
659
|
+
status: ["status", nil]
|
|
660
|
+
)
|
|
661
|
+
|
|
662
|
+
Event::Asset::Upload.declare(
|
|
663
|
+
status: ["status", nil]
|
|
664
|
+
)
|
|
665
|
+
|
|
666
|
+
Moderation::ManualReview::DecidedBy.declare(
|
|
667
|
+
type: ["type", nil],
|
|
668
|
+
id: ["id", nil]
|
|
669
|
+
)
|
|
670
|
+
|
|
671
|
+
Moderation::Policy::Preset.declare(
|
|
672
|
+
id: ["id", nil],
|
|
673
|
+
version: ["version", nil]
|
|
674
|
+
)
|
|
675
|
+
|
|
676
|
+
Moderation::Raw::HashMatch.declare(
|
|
677
|
+
source: ["source", nil],
|
|
678
|
+
hash_list_id: ["hashListId", nil],
|
|
679
|
+
hash_list_entry_id: ["hashListEntryId", nil],
|
|
680
|
+
distance: ["distance", nil],
|
|
681
|
+
action: ["action", nil]
|
|
682
|
+
)
|
|
683
|
+
|
|
684
|
+
ProjectSettingsResource::Settings::HumanReview.declare(
|
|
685
|
+
allowed_sample_percent: ["allowedSamplePercent", nil],
|
|
686
|
+
restricted_sample_percent: ["restrictedSamplePercent", nil],
|
|
687
|
+
uncertainty_margin_percent: ["uncertaintyMarginPercent", nil],
|
|
688
|
+
review_missing_evidence: ["reviewMissingEvidence", nil]
|
|
689
|
+
)
|
|
690
|
+
|
|
691
|
+
ProjectSettingsResource::Settings::RemoteUrlRule.declare(
|
|
692
|
+
mode: ["mode", nil],
|
|
693
|
+
domains: ["domains", [:array, nil]]
|
|
694
|
+
)
|
|
695
|
+
|
|
696
|
+
UploadPreset::ProcessingOptions::Feature.declare(
|
|
697
|
+
enabled: ["enabled", nil]
|
|
698
|
+
)
|
|
699
|
+
|
|
700
|
+
UploadPreset::ProcessingOptions::Features.declare(
|
|
701
|
+
ocr: ["ocr", [:model, "CalmLens::UploadPreset::ProcessingOptions::Feature"]],
|
|
702
|
+
person_detection: ["personDetection", [:model, "CalmLens::UploadPreset::ProcessingOptions::Feature"]],
|
|
703
|
+
face_detection: ["faceDetection", [:model, "CalmLens::UploadPreset::ProcessingOptions::Features::FaceDetection"]],
|
|
704
|
+
link_detection: ["linkDetection", [:model, "CalmLens::UploadPreset::ProcessingOptions::Feature"]],
|
|
705
|
+
streaming: ["streaming", [:model, "CalmLens::UploadPreset::ProcessingOptions::Feature"]]
|
|
706
|
+
)
|
|
707
|
+
|
|
708
|
+
Asset::Content::FileMetadata::Location.declare(
|
|
709
|
+
latitude: ["latitude", nil],
|
|
710
|
+
longitude: ["longitude", nil]
|
|
711
|
+
)
|
|
712
|
+
|
|
713
|
+
Asset::Content::Hls::Rendition.declare(
|
|
714
|
+
kind: ["kind", nil],
|
|
715
|
+
width: ["width", nil],
|
|
716
|
+
height: ["height", nil],
|
|
717
|
+
bandwidth: ["bandwidth", nil],
|
|
718
|
+
codecs: ["codecs", nil]
|
|
719
|
+
)
|
|
720
|
+
|
|
721
|
+
Classification::FaceDetection::Face::AgeRange.declare(
|
|
722
|
+
low: ["low", nil],
|
|
723
|
+
high: ["high", nil]
|
|
724
|
+
)
|
|
725
|
+
|
|
726
|
+
Classification::Ocr::TextRegion::Box.declare(
|
|
727
|
+
left: ["left", nil],
|
|
728
|
+
top: ["top", nil],
|
|
729
|
+
width: ["width", nil],
|
|
730
|
+
height: ["height", nil]
|
|
731
|
+
)
|
|
732
|
+
|
|
733
|
+
Event::Asset::Classification::Moderation.declare(
|
|
734
|
+
decision: ["decision", nil]
|
|
735
|
+
)
|
|
736
|
+
|
|
737
|
+
UploadPreset::ProcessingOptions::Features::FaceDetection.declare(
|
|
738
|
+
enabled: ["enabled", nil],
|
|
739
|
+
age_estimation: ["ageEstimation", nil]
|
|
740
|
+
)
|
|
741
|
+
end
|