{"adapterRegistryPath": "/api/web/v1/plugins/nails/crawl-adapters", "apiVersion": "openeyes.nails.web.v1", "contract": {"contractVersion": 1, "name": "crawl-export", "recordRequiredFields": ["externalId", "observedAt", "metrics", "confidence", "taxonomy", "source", "rightsPolicy", "licenseRef", "contentHash", "perceptualHash", "riskLabels"], "requiredFields": ["contractVersion", "exportId", "snapshotId", "providerId", "market", "platform", "observedAt", "windowStart", "windowEnd", "crawler", "records"], "schemaDigest": "513cd0d6155b99eca8f8bf4eec65653ed800498d9e44eaa44fc8d41475f54419", "schemaId": "https://openeyes.local/plugins/nails/schemas/v1/crawl-export.schema.json"}, "dryRunPath": "/api/web/v1/plugins/nails/crawl-exports:dry-run", "inputModes": ["inline_json", "path"], "method": "GET", "network": false, "ok": true, "pluginId": "nails", "route": "/api/web/v1/plugins/nails/crawl-export-contract", "schema": {"$defs": {"rawMetric": {"additionalProperties": false, "properties": {"unit": {"maxLength": 64, "minLength": 1, "type": "string"}, "value": {"minimum": 0, "type": "number"}}, "required": ["value", "unit"], "type": "object"}, "record": {"additionalProperties": false, "properties": {"confidence": {"maximum": 1, "minimum": 0, "type": "number"}, "contentHash": {"pattern": "^[a-f0-9]{64}$", "type": "string"}, "externalId": {"pattern": "^[a-z0-9][a-z0-9._:-]{0,127}$", "type": "string"}, "licenseRef": {"maxLength": 512, "type": ["string", "null"]}, "metrics": {"additionalProperties": {"$ref": "#/$defs/rawMetric"}, "minProperties": 1, "required": ["likes"], "type": "object"}, "observedAt": {"$ref": "#/$defs/timestamp"}, "perceptualHash": {"pattern": "^[a-f0-9]{16,64}$", "type": "string"}, "rightsPolicy": {"$ref": "#/$defs/rightsPolicy"}, "riskLabels": {"items": {"pattern": "^[a-z][a-z0-9_.-]{0,63}$", "type": "string"}, "maxItems": 32, "type": "array", "uniqueItems": true}, "source": {"$ref": "#/$defs/source"}, "taxonomy": {"$ref": "#/$defs/taxonomy"}}, "required": ["externalId", "observedAt", "metrics", "confidence", "taxonomy", "source", "rightsPolicy", "licenseRef", "contentHash", "perceptualHash", "riskLabels"], "type": "object"}, "rightsPolicy": {"additionalProperties": false, "properties": {"analyze": {"enum": ["deny", "allow", "require_license"], "type": "string"}, "derive": {"enum": ["deny", "allow", "require_license"], "type": "string"}, "includeSource": {"enum": ["deny", "allow", "require_license"], "type": "string"}, "maliangExport": {"enum": ["deny", "allow", "require_license"], "type": "string"}, "publicProject": {"enum": ["deny", "allow", "require_license"], "type": "string"}}, "required": ["analyze", "derive", "includeSource", "maliangExport", "publicProject"], "type": "object"}, "source": {"additionalProperties": false, "properties": {"canonicalSourceRef": {"maxLength": 1024, "pattern": "^crawl://", "type": "string"}, "ownerRef": {"maxLength": 512, "pattern": "^owner:crawl:", "type": "string"}, "sourceRef": {"maxLength": 1024, "pattern": "^crawl://", "type": "string"}, "sourceUrl": {"anyOf": [{"maxLength": 2048, "pattern": "^https://", "type": "string"}, {"type": "null"}]}}, "required": ["sourceRef", "canonicalSourceRef", "ownerRef", "sourceUrl"], "type": "object"}, "taxonomy": {"additionalProperties": false, "properties": {"finish": {"$ref": "#/$defs/taxonomyValue"}, "length": {"$ref": "#/$defs/taxonomyValue"}, "material": {"$ref": "#/$defs/taxonomyValue"}, "motif": {"$ref": "#/$defs/taxonomyValue"}, "occasion": {"$ref": "#/$defs/taxonomyValue"}, "palette": {"$ref": "#/$defs/taxonomyValue"}, "priceBand": {"$ref": "#/$defs/taxonomyValue"}, "shape": {"$ref": "#/$defs/taxonomyValue"}, "technique": {"$ref": "#/$defs/taxonomyValue"}}, "required": ["palette", "shape", "length", "motif", "material", "finish", "technique", "occasion", "priceBand"], "type": "object"}, "taxonomyValue": {"additionalProperties": false, "allOf": [{"if": {"properties": {"value": {"const": "unknown"}}, "required": ["value"]}, "then": {"properties": {"rawValue": {"minLength": 1, "type": "string"}}}}], "properties": {"confidence": {"maximum": 1, "minimum": 0, "type": "number"}, "rawValue": {"maxLength": 512, "type": ["string", "null"]}, "value": {"maxLength": 128, "minLength": 1, "type": "string"}}, "required": ["value", "rawValue", "confidence"], "type": "object"}, "timestamp": {"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]+)?Z$", "type": "string"}}, "$id": "https://openeyes.local/plugins/nails/schemas/v1/crawl-export.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "properties": {"contractVersion": {"const": 1, "type": "integer"}, "crawler": {"additionalProperties": false, "properties": {"adapterId": {"pattern": "^[a-z][a-z0-9_.-]{1,96}$", "type": "string"}, "adapterVersion": {"maxLength": 128, "minLength": 1, "type": "string"}, "collectionMethod": {"const": "external_crawl", "type": "string"}}, "required": ["adapterId", "adapterVersion", "collectionMethod"], "type": "object"}, "exportId": {"pattern": "^crawl-export-[a-z0-9-]{1,96}$", "type": "string"}, "market": {"enum": ["CN", "GLOBAL"], "type": "string"}, "observedAt": {"$ref": "#/$defs/timestamp"}, "platform": {"pattern": "^[a-z][a-z0-9-]{1,63}$", "type": "string"}, "providerId": {"pattern": "^crawl-[a-z0-9-]{2,63}$", "type": "string"}, "records": {"items": {"$ref": "#/$defs/record"}, "maxItems": 10000, "minItems": 1, "type": "array"}, "snapshotId": {"pattern": "^snapshot-crawl-[a-z0-9-]{1,96}$", "type": "string"}, "windowEnd": {"$ref": "#/$defs/timestamp"}, "windowStart": {"$ref": "#/$defs/timestamp"}}, "required": ["contractVersion", "exportId", "snapshotId", "providerId", "market", "platform", "observedAt", "windowStart", "windowEnd", "crawler", "records"], "title": "Nails Crawl Export v1", "type": "object"}}